2015-05-28 14:25:07 +00:00
|
|
|
# mp_printf
|
|
|
|
|
-123 +123 123
|
|
|
|
|
-0123
|
|
|
|
|
123
|
2017-12-19 15:01:17 +11:00
|
|
|
123
|
2015-05-28 14:25:07 +00:00
|
|
|
1ABCDEF
|
2020-10-22 10:38:03 +02:00
|
|
|
ab abc ' abc' ' True' 'Tru'
|
2015-05-28 14:25:07 +00:00
|
|
|
|
|
|
|
|
false true
|
|
|
|
|
(null)
|
2016-02-01 15:08:42 +00:00
|
|
|
-2147483648
|
|
|
|
|
2147483648
|
|
|
|
|
80000000
|
|
|
|
|
80000000
|
2017-06-30 12:25:42 +10:00
|
|
|
abc
|
2019-05-03 23:21:28 +10:00
|
|
|
%
|
2018-03-01 22:49:15 +11:00
|
|
|
# GC
|
|
|
|
|
0
|
|
|
|
|
0
|
2021-09-15 10:54:48 -05:00
|
|
|
# GC part 2
|
|
|
|
|
pass
|
2022-05-04 12:12:11 +10:00
|
|
|
# tracked allocation
|
|
|
|
|
m_tracked_head = 0
|
|
|
|
|
0 1
|
|
|
|
|
1 1
|
|
|
|
|
2 1
|
|
|
|
|
3 1
|
|
|
|
|
4 1
|
|
|
|
|
5 1
|
|
|
|
|
6 1
|
|
|
|
|
7 1
|
|
|
|
|
0 1
|
|
|
|
|
1 1
|
|
|
|
|
2 1
|
|
|
|
|
3 1
|
|
|
|
|
4 1
|
|
|
|
|
5 1
|
|
|
|
|
6 1
|
|
|
|
|
7 1
|
|
|
|
|
m_tracked_head = 0
|
2015-05-12 23:34:10 +01:00
|
|
|
# vstr
|
|
|
|
|
tests
|
|
|
|
|
sts
|
|
|
|
|
|
|
|
|
|
test
|
|
|
|
|
tes
|
2017-09-01 08:05:24 +10:00
|
|
|
RuntimeError:
|
|
|
|
|
RuntimeError:
|
2015-05-12 23:34:10 +01:00
|
|
|
# repl
|
2015-05-08 09:18:38 +01:00
|
|
|
ame__
|
2022-08-18 16:57:45 +10:00
|
|
|
port
|
2021-04-03 16:56:02 -04:00
|
|
|
|
2023-06-08 16:01:38 +10:00
|
|
|
builtins micropython _asyncio _thread
|
2022-08-18 16:57:45 +10:00
|
|
|
array binascii btree cexample
|
|
|
|
|
cmath collections cppexample cryptolib
|
2023-06-26 13:52:10 +10:00
|
|
|
deflate errno example_package
|
|
|
|
|
ffi framebuf gc hashlib
|
|
|
|
|
heapq io json machine
|
2023-07-21 13:39:36 +10:00
|
|
|
math os platform random
|
2024-02-01 12:07:06 +00:00
|
|
|
re select socket struct
|
|
|
|
|
sys termios time tls
|
2023-10-13 14:53:02 +11:00
|
|
|
uctypes vfs websocket
|
2022-08-18 16:57:45 +10:00
|
|
|
me
|
2021-04-03 16:56:02 -04:00
|
|
|
|
2023-06-06 22:15:44 +10:00
|
|
|
micropython machine math
|
2015-05-08 09:18:38 +01:00
|
|
|
|
2019-05-06 12:16:29 -07:00
|
|
|
argv atexit byteorder exc_info
|
2022-10-07 02:13:58 +11:00
|
|
|
executable exit getsizeof implementation
|
2023-12-04 15:54:59 +01:00
|
|
|
intern maxsize modules path
|
|
|
|
|
platform print_exception ps1
|
|
|
|
|
ps2 stderr stdin stdout
|
|
|
|
|
tracebacklimit version version_info
|
2015-05-08 09:18:38 +01:00
|
|
|
ementation
|
2015-05-12 23:34:10 +01:00
|
|
|
# attrtuple
|
|
|
|
|
(start=1, stop=2, step=3)
|
2015-09-03 23:06:18 +01:00
|
|
|
# str
|
|
|
|
|
1
|
2018-02-08 11:14:30 +11:00
|
|
|
# bytearray
|
|
|
|
|
data
|
2015-10-01 18:49:37 +01:00
|
|
|
# mpz
|
|
|
|
|
1
|
|
|
|
|
12345678
|
|
|
|
|
0
|
|
|
|
|
0
|
2018-02-25 23:43:16 +11:00
|
|
|
0
|
|
|
|
|
0
|
|
|
|
|
0
|
|
|
|
|
1
|
|
|
|
|
12345
|
|
|
|
|
6
|
py/objint: Try to convert big-int back to small-int after binary op.
Before this change, long/mpz ints propagated into all future calculations,
even if their value could fit in a small-int object. With this change, the
result of a big-int binary op will now be converted to a small-int object
if the value fits in a small-int.
For example, a relatively common operation like `x = a * b // c` where
a,b,c all small ints would always result in a long/mpz int, even if it
didn't need to, and then this would impact all future calculations with
x.
This adds +24 bytes on PYBV11 but avoids heap allocations and potential
surprises (e.g. `big-big` is now a small `0`, and can safely be accessed
with MP_OBJ_SMALL_INT_VALUE).
Performance tests are unchanged on PYBV10, except for `bm_pidigits.py`
which makes heavy use of big-ints and gains about 8% in speed.
Unix coverage tests have been updated to cover mpz code that is now
unreachable by normal Python code (removing the unreachable code would lead
to some surprising gaps in the internal C functions and the functionality
may be needed in the future, so it is kept because it has minimal
overhead).
This work was funded through GitHub Sponsors.
Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
2022-10-06 13:44:54 +11:00
|
|
|
-1
|
2016-12-29 18:07:38 +11:00
|
|
|
# runtime utils
|
2017-10-21 13:55:02 +03:00
|
|
|
TypeError: unsupported type for __abs__: 'str'
|
|
|
|
|
TypeError: unsupported types for __divmod__: 'str', 'str'
|
py/objint: Try to convert big-int back to small-int after binary op.
Before this change, long/mpz ints propagated into all future calculations,
even if their value could fit in a small-int object. With this change, the
result of a big-int binary op will now be converted to a small-int object
if the value fits in a small-int.
For example, a relatively common operation like `x = a * b // c` where
a,b,c all small ints would always result in a long/mpz int, even if it
didn't need to, and then this would impact all future calculations with
x.
This adds +24 bytes on PYBV11 but avoids heap allocations and potential
surprises (e.g. `big-big` is now a small `0`, and can safely be accessed
with MP_OBJ_SMALL_INT_VALUE).
Performance tests are unchanged on PYBV10, except for `bm_pidigits.py`
which makes heavy use of big-ints and gains about 8% in speed.
Unix coverage tests have been updated to cover mpz code that is now
unreachable by normal Python code (removing the unreachable code would lead
to some surprising gaps in the internal C functions and the functionality
may be needed in the future, so it is kept because it has minimal
overhead).
This work was funded through GitHub Sponsors.
Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
2022-10-06 13:44:54 +11:00
|
|
|
0
|
2020-01-14 23:45:56 +11:00
|
|
|
1
|
|
|
|
|
2
|
|
|
|
|
OverflowError: overflow converting long int to machine word
|
|
|
|
|
OverflowError: overflow converting long int to machine word
|
2020-01-23 13:18:34 +11:00
|
|
|
ValueError:
|
2017-01-04 14:23:29 +11:00
|
|
|
Warning: test
|
2017-01-05 11:12:05 +11:00
|
|
|
# format float
|
|
|
|
|
?
|
|
|
|
|
+1e+00
|
|
|
|
|
+1e+00
|
2017-03-14 17:58:43 +11:00
|
|
|
# binary
|
2018-03-01 15:47:17 +11:00
|
|
|
123
|
2017-03-14 17:58:43 +11:00
|
|
|
456
|
2018-02-27 16:17:10 +11:00
|
|
|
# VM
|
|
|
|
|
2 1
|
2017-03-16 18:05:33 +11:00
|
|
|
# scheduler
|
|
|
|
|
sched(0)=1
|
|
|
|
|
sched(1)=1
|
|
|
|
|
sched(2)=1
|
|
|
|
|
sched(3)=1
|
|
|
|
|
sched(4)=0
|
|
|
|
|
unlocked
|
|
|
|
|
0
|
2019-03-21 11:52:10 +11:00
|
|
|
1
|
|
|
|
|
2
|
|
|
|
|
3
|
2020-02-06 20:26:29 +11:00
|
|
|
KeyboardInterrupt:
|
|
|
|
|
KeyboardInterrupt:
|
|
|
|
|
10
|
2019-09-30 11:29:52 +10:00
|
|
|
# ringbuf
|
|
|
|
|
99 0
|
|
|
|
|
98 1
|
|
|
|
|
22
|
|
|
|
|
99 0
|
|
|
|
|
97 2
|
|
|
|
|
aa55
|
|
|
|
|
99 0
|
|
|
|
|
0 99
|
|
|
|
|
-1
|
|
|
|
|
1 98
|
|
|
|
|
-1
|
|
|
|
|
2 97
|
|
|
|
|
0
|
|
|
|
|
cc99
|
|
|
|
|
99 0
|
|
|
|
|
0
|
|
|
|
|
11bb
|
|
|
|
|
0
|
|
|
|
|
22ff
|
|
|
|
|
-1
|
|
|
|
|
-1
|
2020-01-14 00:02:01 +11:00
|
|
|
# pairheap
|
|
|
|
|
create: 0 0 0 0
|
|
|
|
|
pop all: 0 1 2 3
|
|
|
|
|
create: 7 6 5 4 3 2 1 0
|
|
|
|
|
pop all: 0 1 2 3 4 5 6 7
|
|
|
|
|
create: 1 - - 1 1 1 1 1 1
|
|
|
|
|
pop all: 1 2
|
|
|
|
|
create: 1 1 1 1 2 2
|
|
|
|
|
pop all: 2 4
|
|
|
|
|
create: 1 1 1 1 1
|
|
|
|
|
pop all: 1 3 4
|
|
|
|
|
create: 3 3 3 1 1 1
|
|
|
|
|
pop all: 1 2 4 5
|
2020-01-22 20:44:52 +01:00
|
|
|
# mp_obj_is_type
|
|
|
|
|
1 1
|
|
|
|
|
0 0
|
|
|
|
|
1 1
|
|
|
|
|
1 1
|
|
|
|
|
0 0
|
|
|
|
|
1 1
|
|
|
|
|
# end coverage.c
|
2017-01-16 15:04:53 +11:00
|
|
|
0123456789 b'0123456789'
|
2016-09-02 15:07:42 +10:00
|
|
|
7300
|
|
|
|
|
7300
|
|
|
|
|
7300
|
|
|
|
|
7300
|
2017-01-16 15:04:53 +11:00
|
|
|
None
|
|
|
|
|
None
|
|
|
|
|
None
|
|
|
|
|
None
|
|
|
|
|
None
|
|
|
|
|
None
|
|
|
|
|
b'123'
|
|
|
|
|
b'123'
|
|
|
|
|
b'123'
|
|
|
|
|
OSError
|
|
|
|
|
0
|
|
|
|
|
None
|
2017-01-17 13:12:50 +11:00
|
|
|
None
|
2020-10-08 16:52:25 +02:00
|
|
|
cpp None
|
2020-10-21 11:13:47 +02:00
|
|
|
(3, 'hellocpp')
|
2017-01-05 14:58:08 +11:00
|
|
|
frzstr1
|
2019-07-08 11:26:20 +02:00
|
|
|
frzstr1.py
|
2017-01-05 14:58:08 +11:00
|
|
|
frzmpy1
|
2019-07-08 11:26:20 +02:00
|
|
|
frzmpy1.py
|
2017-01-08 22:45:55 +11:00
|
|
|
frzstr_pkg1.__init__
|
2019-07-08 11:26:20 +02:00
|
|
|
frzstr_pkg1/__init__.py 1
|
2017-01-08 22:45:55 +11:00
|
|
|
frzmpy_pkg1.__init__
|
2019-07-08 11:26:20 +02:00
|
|
|
frzmpy_pkg1/__init__.py 1
|
2017-01-08 22:45:55 +11:00
|
|
|
frzstr_pkg2.mod
|
|
|
|
|
1
|
|
|
|
|
frzmpy_pkg2.mod
|
|
|
|
|
1
|
2017-01-16 16:47:02 +11:00
|
|
|
ZeroDivisionError
|
2022-02-28 18:51:45 +11:00
|
|
|
\
|
|
|
|
|
|
|
|
|
|
X
|
|
|
|
|
'\x1b'
|
|
|
|
|
b'\x00\xff'
|
2024-02-12 23:07:48 +11:00
|
|
|
frzmpy4 1
|
|
|
|
|
frzmpy4 2
|
2019-09-25 17:53:30 +12:00
|
|
|
NULL
|
2022-09-19 12:05:39 +10:00
|
|
|
uPy
|
|
|
|
|
a long string that is not interned
|
|
|
|
|
a string that has unicode αβγ chars
|
|
|
|
|
b'bytes 1234\x01'
|
|
|
|
|
123456789
|
|
|
|
|
0
|
|
|
|
|
1
|
|
|
|
|
2
|
|
|
|
|
3
|
|
|
|
|
frozentest.py
|
2023-05-12 17:03:14 +10:00
|
|
|
example_package.__init__
|
|
|
|
|
<module 'example_package.foo.bar'>
|
|
|
|
|
example_package.foo.bar.f
|
|
|
|
|
<module 'example_package'> <module 'example_package.foo'> <module 'example_package.foo.bar'>
|
|
|
|
|
example_package.f
|
|
|
|
|
example_package.foo.f
|
|
|
|
|
example_package.foo.bar.f
|
|
|
|
|
True
|
|
|
|
|
example_package.foo.f
|
|
|
|
|
True
|