- 26 Mar, 2015 1 commit
-
-
stijn authored
Disabled by default. Enabled on unix and windows ports.
-
- 20 Mar, 2015 2 commits
-
-
stijn authored
Disabled by default. Enabled on unix and stmhal ports.
-
Paul Sokolovsky authored
Given that there's already support for "fixed table" maps, which are essentially ordered maps, the implementation of OrderedDict just extends "fixed table" maps by adding an "is ordered" flag and add/remove operations, and reuses 95% of objdict code, just making methods tolerant to both dict and OrderedDict. Some things are missing so far, like CPython-compatible repr and comparison. OrderedDict is Disabled by default; enabled on unix and stmhal ports.
-
- 14 Mar, 2015 1 commit
-
-
Damien George authored
These allow to fine-tune the compiler to select whether it optimises tuple assignments of the form a, b = c, d and a, b, c = d, e, f. Sensible defaults are provided.
-
- 11 Mar, 2015 1 commit
-
-
Peter D. Gray authored
-
- 03 Mar, 2015 1 commit
-
-
Damien George authored
-
- 27 Feb, 2015 1 commit
-
-
Paul Sokolovsky authored
This is rarely used feature which takes enough code to implement, so is controlled by MICROPY_PY_ARRAY_SLICE_ASSIGN config setting, default off. But otherwise it may be useful, as allows to update arbitrary-sized data buffers in-place. Slice is yet to implement, and actually, slice assignment implemented in such a way that RHS of assignment should be array of the exact same item typecode as LHS. CPython has it more relaxed, where RHS can be any sequence of compatible types (e.g. it's possible to assign list of int's to a bytearray slice). Overall, when all "slice write" features are implemented, it may cost ~1KB of code.
-
- 23 Feb, 2015 1 commit
-
-
nhtshot authored
This function is only used when DEBUG_PRINTERS and USE_RULE_NAME are enabled.
-
- 22 Feb, 2015 1 commit
-
-
Damien George authored
The implementation of these functions is very large (order 4k) and they are rarely used, so we don't enable them by default. They are however enabled in stmhal and unix, since we have the room.
-
- 08 Feb, 2015 1 commit
-
-
Damien George authored
-
- 30 Jan, 2015 1 commit
-
-
Paul Sokolovsky authored
-
- 20 Jan, 2015 1 commit
-
-
Paul Sokolovsky authored
Only modules (not packages) supported now. Source modules can be converted to frozen module structures using tools/make-frozen.py script.
-
- 15 Jan, 2015 1 commit
-
-
Paul Sokolovsky authored
pyexec_friendly_repl_process_char() and friends, useful for ports which integrate into existing cooperative multitasking system. Unlike readline() refactor before, this was implemented in less formal, trial&error process, minor functionality regressions are still known (like soft&hard reset support). So, original loop-based pyexec_friendly_repl() is left intact, specific implementation selectable by config setting.
-
- 14 Jan, 2015 1 commit
-
-
Damien George authored
Native code has GC-heap pointers in it so it must be scanned. But on unix port memory for native functions is mmap'd, and so it must have explicit code to scan it for root pointers.
-
- 11 Jan, 2015 1 commit
-
-
Damien George authored
This new config option sets how many fixed-number-of-bytes to use to store the length of each qstr. Previously this was hard coded to 2, but, as per issue #1056, this is considered overkill since no-one needs identifiers longer than 255 bytes. With this patch the number of bytes for the length is configurable, and defaults to 1 byte. The configuration option filters through to the makeqstrdata.py script. Code size savings going from 2 to 1 byte: - unix x64 down by 592 bytes - stmhal down by 1148 bytes - bare-arm down by 284 bytes Also has RAM savings, and will be slightly more efficient in execution.
-
- 10 Jan, 2015 1 commit
-
-
Damien George authored
Compiler optimises lookup of module.CONST when enabled (an existing feature). Disabled by default; enabled for unix, windows, stmhal. Costs about 100 bytes ROM on stmhal.
-
- 09 Jan, 2015 2 commits
-
-
Damien George authored
This allows to enable mem-info functions in micropython module, even if MICROPY_MEM_STATS is not enabled. In this case, you get mem_info and qstr_info but not mem_{total,current,peak}.
-
Damien George authored
-
- 07 Jan, 2015 2 commits
-
-
Damien George authored
This is a simple optimisation inspired by JITing technology: we cache in the bytecode (using 1 byte) the offset of the last successful lookup in a map. This allows us next time round to check in that location in the hash table (mp_map_t) for the desired entry, and if it's there use that entry straight away. Otherwise fallback to a normal map lookup. Works for LOAD_NAME, LOAD_GLOBAL, LOAD_ATTR and STORE_ATTR opcodes. On a few tests it gives >90% cache hit and greatly improves speed of code. Disabled by default. Enabled for unix and stmhal ports.
-
Damien George authored
This patch consolidates all global variables in py/ core into one place, in a global structure. Root pointers are all located together to make GC tracing easier and more efficient.
-
- 01 Jan, 2015 2 commits
-
-
Damien George authored
-
Paul Sokolovsky authored
-
- 29 Dec, 2014 1 commit
-
-
Damien George authored
-
- 28 Dec, 2014 1 commit
-
-
Paul Sokolovsky authored
-
- 19 Dec, 2014 1 commit
-
-
Damien George authored
Adds just 60 bytes to stmhal binary. Addresses issue #362.
-
- 09 Dec, 2014 1 commit
-
-
Damien George authored
This patch adds a configuration option (MICROPY_CAN_OVERRIDE_BUILTINS) which, when enabled, allows to override all names within the builtins module. A builtins override dict is created the first time the user assigns to a name in the builtins model, and then that dict is searched first on subsequent lookups. Note that this implementation doesn't allow deleting of names. This patch also does some refactoring of builtins code, creating the modbuiltins.c file. Addresses issue #959.
-
- 29 Nov, 2014 1 commit
-
-
Paul Sokolovsky authored
-
- 22 Nov, 2014 1 commit
-
-
Paul Sokolovsky authored
-
- 06 Nov, 2014 1 commit
-
-
Damien George authored
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.
-
- 05 Nov, 2014 1 commit
-
-
Damien George authored
-
- 04 Nov, 2014 1 commit
-
-
Paul Sokolovsky authored
For this, introduce MICROPY_MODULE_DICT_SIZE config setting.
-
- 29 Oct, 2014 1 commit
-
-
Paul Sokolovsky authored
Use it like: make CFLAGS_EXTRA='-DMP_CONFIGFILE="<mpconfigport_my.h>"'
-
- 25 Oct, 2014 1 commit
-
-
Damien George authored
This should be pretty compliant with CPython, except perhaps for some corner cases to do with globals/locals context. Addresses issue #879.
-
- 23 Oct, 2014 1 commit
-
-
Damien George authored
-
- 22 Oct, 2014 1 commit
-
-
Damien George authored
-
- 15 Oct, 2014 1 commit
-
-
Damien George authored
-
- 13 Oct, 2014 1 commit
-
-
Paul Sokolovsky authored
-
- 12 Oct, 2014 2 commits
-
-
Paul Sokolovsky authored
-
Damien George authored
With this patch a port can enable module weak link support and provide a dict of qstr->module mapping. This mapping is looked up only if an import fails to find the requested module in the filesystem. This allows to have the builtin module named, eg, usocket, and provide a weak link of "socket" to the same module, but this weak link can be overridden if a file by the name "socket.py" is found in the import path.
-
- 11 Oct, 2014 1 commit
-
-