- 20 Jan, 2015 2 commits
-
-
Damien George authored
See issue #699.
-
Paul Sokolovsky authored
Only modules (not packages) supported now. Source modules can be converted to frozen module structures using tools/make-frozen.py script.
-
- 16 Jan, 2015 2 commits
-
-
Damien George authored
See issue #699.
-
Damien George authored
Saves 24 bytes in bare-arm.
-
- 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 5 commits
-
-
Damien George authored
This helps compiler produce smaller code. Saves 124 bytes on stmhal and bare-arm.
-
Damien George authored
-
Damien George authored
Previously was allocating at end of PASS_COMPUTE, and this pass was being run twice, so memory was being allocated twice.
-
Damien George authored
Bytecode also needs a pass to compute the stack size. This is because the state size of the bytecode function is encoded as a variable uint, so we must know the value of this uint before we encode it (otherwise the size of the generated code changes from one pass to the next). Having an entire pass for this seems wasteful (in time). Alternative is to allocate fixed space for the state size (would need 3-4 bytes to be general, when 1 byte is usually sufficient) which uses a bit of extra RAM per bytecode function, and makes the code less elegant in places where this uint is encoded/decoded. So, for now, opt for an extra pass.
-
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.
-
- 13 Jan, 2015 4 commits
-
-
Damien George authored
-
Damien George authored
-
Damien George authored
Previously to this patch all constant string/bytes objects were interned by the compiler, and this lead to crashes when the qstr was too long (noticeable now that qstr length storage defaults to 1 byte). With this patch, long string/bytes objects are never interned, and are referenced directly as constant objects within generated code using load_const_obj.
-
Damien George authored
This allows to directly load a Python object to the Python stack. See issue #722 for background.
-
- 12 Jan, 2015 6 commits
-
-
Damien George authored
-
Damien George authored
-
Damien George authored
-
Damien George authored
-
Damien George authored
-
Damien George authored
Ref issue #699.
-
- 11 Jan, 2015 8 commits
-
-
Damien George authored
-
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.
-
Damien George authored
-
Damien George authored
Previous patch c38dc3cc allowed any object to be compared with any other, using pointer comparison for a fallback. As such, existing code which checked for this case is no longer needed.
-
Damien George authored
Return "not equal" for objects that don't implement equality check. This is as per Python specs.
-
Damien George authored
-
Damien George authored
-
Damien George authored
-
- 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 4 commits
-
-
Damien George authored
-
Damien George authored
-
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
-
- 08 Jan, 2015 3 commits
-
-
Damien George authored
-
Damien George authored
-
stijn authored
GC for unix/windows builds doesn't make use of the bss section anymore, so we do not need the (sometimes complicated) build features and code related to it
-
- 07 Jan, 2015 3 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.
-
Damien George authored
Addresses issue #1044 (see also #1040). Could do with a better fix.
-
- 06 Jan, 2015 1 commit
-
-
Paul Sokolovsky authored
This is consistent with how BC_JUMP was handled before. We never show jumps destinations relative to jump instrucion itself, only relative to beginning of function. Another useful way to show them as absolute (real memory address), and this change makes result expected and consistent with how BC_JUMP is shown.
-