- 18 Dec, 2015 5 commits
-
-
Damien George authored
Ideally we'd use %zu for size_t args, but that's unlikely to be supported by all runtimes, and we would then need to implement it in mp_printf. So simplest and most portable option is to use %u and cast the argument to uint(=unsigned int). Note: reason for the change is that UINT_FMT can be %llu (size suitable for mp_uint_t) which is wider than size_t and prints incorrect results.
-
Damien George authored
MICROPY_ENABLE_COMPILER can be used to enable/disable the entire compiler, which is useful when only loading of pre-compiled bytecode is supported. It is enabled by default. MICROPY_PY_BUILTINS_EVAL_EXEC controls support of eval and exec builtin functions. By default they are only included if MICROPY_ENABLE_COMPILER is enabled. Disabling both options saves about 40k of code size on 32-bit x86.
-
Damien George authored
-
Damien George authored
Saves 88 bytes on Thumb2, and 200 bytes on x86-64 archs.
-
Paul Sokolovsky authored
To let unix port implement "machine" functionality on Python level, and keep consistent naming in other ports (baremetal ports will use magic module "symlinking" to still load it on "import machine"). Fixes #1701.
-
- 17 Dec, 2015 17 commits
-
-
Paul Sokolovsky authored
Compiles with mingw32, tested to work erratically under Wine due to not fully implemented emulation in it.
-
Paul Sokolovsky authored
-
Paul Sokolovsky authored
-
Damien George authored
-
Paul Sokolovsky authored
This solves long-standing non-deterministic bug, which manifested itself on x86 32-bit (at least of reported cases) - segfault on Ctrl+C (i.e. SIGINT).
-
Damien George authored
-
Damien George authored
-
Damien George authored
-
Damien George authored
For builds where mp_uint_t is larger than size_t, it doesn't make sense to use such a wide type for qstrs. There can only be as many qstrs as there is address space on the machine, so size_t is the correct type to use. Saves about 3000 bytes of code size when building unix/ port with MICROPY_OBJ_REPR_D.
-
Damien George authored
-
Damien George authored
-
Damien George authored
-
Damien George authored
Only enabled for MICROPY_OBJ_REPR_D.
-
Damien George authored
size_t is the correct type to use to count things related to the size of the address space. Using size_t (instead of mp_uint_t) is important for the efficiency of ports that configure mp_uint_t to larger than the machine word size.
-
Damien George authored
-
Damien George authored
The GC should search for pointers within the heap. This patch makes a difference when an object is larger than a pointer (eg 64-bit NaN boxing).
-
Damien George authored
-
- 16 Dec, 2015 7 commits
-
-
danicampora authored
-
Damien George authored
-
pohmelie authored
-
Damien George authored
-
Damien George authored
Ports will need to #define _DIRENT_HAVE_D_INO (0) to disable d_ino use.
-
Paul Sokolovsky authored
Similar to recently added feature in unix port: if event triggers for an objects, its polling flags are automatically reset, so it won't be polled until they are set again explicitly.
-
Tobias Badertscher authored
This includes SPI4, SPI5 and SPI6.
-
- 15 Dec, 2015 1 commit
-
-
Paul Sokolovsky authored
-
- 14 Dec, 2015 3 commits
-
-
stijn authored
-
Paul Sokolovsky authored
ilistdir() returns iterator which yields triples of (name, type, ino) where ino is inode number for entry's data, type of entry (file/dir/etc.), and name of file/dir. listdir() can be easily implemented in terms of this iterator (which is otherwise more efficient in terms of memory use and may save expensive call to stat() for each returned entry). CPython has os.scandir() which also returns an iterator, but it yields more complex objects of DirEntry type. scandir() can also be easily implemented in terms of ilistdir().
-
Paul Sokolovsky authored
This allows to have single itertaor type for various internal iterator types (save rodata space by not having repeating almost-empty type structures). It works by looking "iternext" method stored in particular object instance (should be first object field after "base").
-
- 13 Dec, 2015 2 commits
-
-
Paul Sokolovsky authored
Following "don't rely on FFI for basic functionality" approach.
-
Paul Sokolovsky authored
-
- 12 Dec, 2015 5 commits
-
-
Dave Hylands authored
This leaves behind the common functionality in extmod/machine_mem.c which can be used by all ports.
-
Paul Sokolovsky authored
Was reported to break MacOSX build.
-
Damien George authored
This makes it much easier to understand which arg is which, less error prone, and simpler to add a new arg.
-
Michael Buesch authored
These functions will raise 'ValueError: math domain error' on invalid input.
-
Damien George authored
Previously, SPI was configured by a board defining MICROPY_HW_ENABLE_SPIx to 0 or 1. Now, the board should define MICROPY_HW_SPIx_SCK, MISO, MOSI and NSS. This makes it the same as how I2C is configured.
-