| Commit message (Collapse) | Author | Age |
|
|
|
|
| |
There were several different spellings of MicroPython present in comments,
when there should be only one.
|
|
|
|
| |
Saves 168 bytes on bare-arm.
|
| |
|
|
|
|
|
| |
This function should be able to parse integers with any value for the
base, because it is called by int('xxx', base).
|
|
|
|
|
|
| |
All float constants in the core should use this macro to prevent
unnecessary creation of double-precision floats, which makes code less
efficient.
|
|
|
|
|
| |
Saves the following number of bytes of code space: 176 for bare-arm, 352
for minimal, 272 for unix x86-64, 140 for stmhal, 120 for esp8266.
|
|
|
|
|
|
| |
Pow is already a dependency when compiling with floats, so may as well
use it here to reduce code size and speed up the conversion for most
cases.
|
| |
|
|
|
|
|
| |
size_t is the proper type to count number of bytes in a string. The base
argument does not need to be a full mp_uint_t, int is enough.
|
|
|
|
|
|
|
|
|
| |
This allows the mp_obj_t type to be configured to something other than a
pointer-sized primitive type.
This patch also includes additional changes to allow the code to compile
when sizeof(mp_uint_t) != sizeof(void*), such as using size_t instead of
mp_uint_t, and various casts.
|
|
|
|
|
|
|
| |
This patch adds more fine grained error message control for errors when
parsing integers (now has terse, normal and detailed). When detailed is
enabled, the error now escapes bytes when printing them so they can be
more easily seen.
|
| |
|
|
|
|
| |
Addresses issue #1347
|
|
|
|
| |
"raise" is a common word that was found to exist in a vendor's stdlib.
|
| |
|
|
|
|
|
|
|
|
|
| |
Previous to this patch, a big-int, float or imag constant was interned
(made into a qstr) and then parsed at runtime to create an object each
time it was needed. This is wasteful in RAM and not efficient. Now,
these constants are parsed straight away in the parser and turned into
objects. This allows constants with large numbers of digits (so
addresses issue #1103) and takes us a step closer to #722.
|
|
|
|
| |
Addresses issue #1022.
|
|
|
|
|
|
|
|
| |
Going from MICROPY_ERROR_REPORTING_NORMAL to
MICROPY_ERROR_REPORTING_TERSE now saves 2020 bytes ROM for ARM Thumb2,
and 2200 bytes ROM for 32-bit x86.
This is about a 2.5% code size reduction for bare-arm.
|
| |
|
|
|
|
| |
See discussion in issue #50.
|
|
|
|
|
|
| |
It defines types used by all other headers.
Fixes #691.
|
|
|
|
|
| |
One thing is wanting to do 1 / 2 and get something else but 0, and quite
another - doing rocket science ;-).
|
|
|
|
|
|
| |
char can be signedness, and using signedness types is dangerous - it can
lead to negative offsets when doing table lookups. We apparently should just
ban char usage.
|
|
|
|
|
|
|
|
|
|
| |
This renames:
MICROPY_PY_FROZENSET -> MICROPY_PY_BUILTINS_FROZENSET
MICROPY_PY_PROPERTY -> MICROPY_PY_BUILTINS_PROPERTY
MICROPY_PY_SLICE -> MICROPY_PY_BUILTINS_SLICE
MICROPY_ENABLE_FLOAT -> MICROPY_PY_BUILTINS_FLOAT
See issue #35 for discussion.
|
|
|
|
| |
Also unifies use of SMALL_INT_FITS macro across parser and runtime.
|
|
|
|
| |
Addresses issue #627.
|
|
|
|
|
|
|
| |
Blanket wide to all .c and .h files. Some files originating from ST are
difficult to deal with (license wise) so it was left out of those.
Also merged modpyb.h, modos.h, modstm.h and modtime.h in stmhal/.
|
|
|
|
|
| |
This prevents micropython printing exception messages like
ImportError: ImportError: No module named 'foo'
|
|
|
|
|
|
| |
This does not affect code size or performance when debugging turned off.
To address issue #420.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
Remove unnecessary includes. Add includes that improve portability.
|
|
|
|
|
|
| |
Implement not, shl and shr in mpz library. Add function to create mpzs
on the stack, used for memory efficiency when rhs is a small int.
Factor out code to parse base-prefix of number into a dedicated function.
|
|
|