Commit message (Collapse) | Author | Age | |
---|---|---|---|
* | py: Increase fixed size of stack-info in native emitter. | Damien George | 2015-03-26 |
| | | | | This is a temporary fix. | ||
* | py, compiler: When just bytecode, make explicit calls instead of table. | Damien George | 2015-03-26 |
| | | | | | | | | | | | | | | | | | | When just the bytecode emitter is needed there is no need to have a dynamic method table for the emitter back-end, and we can instead directly call the mp_emit_bc_XXX functions. This gives a significant reduction in code size and a very slight performance boost for the compiler. This patch saves 1160 bytes code on Thumb2 and 972 bytes on x86, when native emitters are disabled. Overall savings in code over the last 3 commits are: bare-arm: 1664 bytes. minimal: 2136 bytes. stmhal: 584 bytes (it has native emitter enabled). cc3200: 1736 bytes. | ||
* | py, compiler: Remove emit_pass1 code, using emit_bc to do its job. | Damien George | 2015-03-26 |
| | | | | | | | | | | | | | | | First pass for the compiler is computing the scope (eg if an identifier is local or not) and originally had an entire table of methods dedicated to this, most of which did nothing. With changes from previous commit, this set of methods can be removed and the methods from the bytecode emitter used instead, with very little modification -- this is what is done in this commit. This factoring has little to no impact on the speed of the compiler (tested by compiling 3763 Python scripts and timing it). This factoring reduces code size by about 270-300 bytes on Thumb2 archs, and 400 bytes on x86. | ||
* | py, compiler: Refactor load/store/delete_id logic to reduce code size. | Damien George | 2015-03-26 |
| | | | | Saves around 230 bytes on Thumb2 and 750 bytes on x86. | ||
* | objdict: Cast mp_obj_t to concrete types explicitly. | Paul Sokolovsky | 2015-03-26 |
| | | | | Continuation of refactoring applied previously to objlist. | ||
* | py: Fix bug in compiler which allowed through illegal augmented assign. | Damien George | 2015-03-25 |
| | | | | It allowed such things as (a, b) += c. | ||
* | py: Clean up some logic in VM to remove assert(0)'s. | Damien George | 2015-03-25 |
| | | | | Saves around 30 bytes code on Thumb2 archs. | ||
* | py: Simplify some logic in compiler; add comments about CPython compat. | Damien George | 2015-03-25 |
| | |||
* | py: Cast mp_obj_t to concrete types explicitly. | Paul Sokolovsky | 2015-03-25 |
| | | | | | | | | | | | mp_obj_t internal representation doesn't have to be a pointer to object, it can be anything. There's also a support for back-conversion in the form of MP_OBJ_UNCAST. This is kind of optimization/status quo preserver to minimize patching the existing code and avoid doing potentially expensive MP_OBJ_CAST over and over. But then one may imagine implementations where MP_OBJ_UNCAST is very expensive. But such implementations are unlikely interesting in practice. | ||
* | objnamedtuple: Accept field list as a string. | Paul Sokolovsky | 2015-03-23 |
| | | | | | This change is required to unbreak some CPython stdlib modules (as included into micropython-lib). | ||
* | objstr: Expose mp_obj_str_split() for reuse in other modules. | Paul Sokolovsky | 2015-03-23 |
| | |||
* | objnamedtuple: Check that 2nd arg to namedtuple() is a list. | Paul Sokolovsky | 2015-03-22 |
| | |||
* | py: Combine duplicated code that converts members from a lookup. | Damien George | 2015-03-21 |
| | | | | | | | | | | | | Despite initial guess, this code factoring does not hamper performance. In fact it seems to improve speed by a little: running pystone(1.2) on pyboard (which gives a very stable result) this patch takes pystones from 1729.51 up to 1742.16. Also, pystones on x64 increase by around the same proportion (but it's much noisier). Taking a look at the generated machine code, stack usage with this patch is unchanged, and call is tail-optimised with all arguments in registers. Code size decreases by about 50 bytes on Thumb2 archs. | ||
* | py: Allow retrieving a function's __name__. | stijn | 2015-03-20 |
| | | | | Disabled by default. Enabled on unix and stmhal ports. | ||
* | runtime: mp_load_method_maybe(): Don't use confusing "base" term. | Paul Sokolovsky | 2015-03-21 |
| | | | | | | | "Base" should rather refer to "base type"."Base object for attribute lookup" should rather be just "object". Also, a case of common subexpression elimination. | ||
* | objlist: list_reverse(): Fix typesafety error. | Paul Sokolovsky | 2015-03-20 |
| | |||
* | py: Clarify API for map/set lookup when removing&adding at once. | Damien George | 2015-03-20 |
| | | | | Addresses issue #1160. | ||
* | py: Implement core of OrderedDict type. | Paul Sokolovsky | 2015-03-20 |
| | | | | | | | | | | | | 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. | ||
* | py: Implement DELETE_GLOBAL in showbc.c. | Damien George | 2015-03-20 |
| | |||
* | objtype: More comment clarification for attribute lookup. | Paul Sokolovsky | 2015-03-20 |
| | |||
* | py: Allow to compile with extra warnings (sign-compare, unused-param). | Damien George | 2015-03-19 |
| | |||
* | objtype: Clarify comment why we call mp_load_method_maybe() for native sub-obj. | Paul Sokolovsky | 2015-03-17 |
| | |||
* | objtype: Refactor dealing with native sub-objects for clarity. | Paul Sokolovsky | 2015-03-16 |
| | |||
* | objtype: mp_obj_class_lookup: Remove implausible condition. | Paul Sokolovsky | 2015-03-16 |
| | | | | | We already have branch for lookup->is_type == true, so here it's guaranteed to be false. | ||
* | objtype: Clarify comment for mp_obj_class_lookup(). | Paul Sokolovsky | 2015-03-16 |
| | |||
* | objtype: Clarify code by consistently using common subexpression. | Paul Sokolovsky | 2015-03-16 |
| | |||
* | py: Fix printing of error message when parsing malformed integer. | Damien George | 2015-03-16 |
| | |||
* | py, extmod: Remove include of unnecessary system headers. | Damien George | 2015-03-14 |
| | |||
* | py: In pfenv_vprintf, adjust type from mp_uint_t to unsigned int. | Damien George | 2015-03-14 |
| | |||
* | py: Remove unnecessary and unused sgn argument from pfenv_print_mp_int. | Damien George | 2015-03-14 |
| | |||
* | py: Fix builtin abs so it works for bools and bignum. | Damien George | 2015-03-14 |
| | |||
* | py: Add MICROPY_COMP_{DOUBLE,TRIPLE}_TUPLE_ASSIGN config options. | Damien George | 2015-03-14 |
| | | | | | | 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. | ||
* | py: In compiler, put macro guard around potentially unused asm vars. | Damien George | 2015-03-14 |
| | |||
* | py: Make some mpz functions static and remove unused ones. | Damien George | 2015-03-12 |
| | |||
* | py: Add support for start/stop/step attributes of builtin range object. | Peter D. Gray | 2015-03-11 |
| | |||
* | objmemoryview: Introduce mp_obj_new_memoryview(). | Paul Sokolovsky | 2015-03-06 |
| | | | | | This follows existing pattern for object constructor API and allows to create memoryview objects e.g. in external modules. | ||
* | objarray: Support array('O'), array of objects, as extension to CPython. | Paul Sokolovsky | 2015-03-05 |
| | | | | Might be useful at least for memoryview hacks. | ||
* | objarray: Fix typo in null TYPECODE_MASK. | Paul Sokolovsky | 2015-03-04 |
| | |||
* | py: Add MICROPY_MALLOC_USES_ALLOCATED_SIZE to allow simpler malloc API. | Damien George | 2015-03-03 |
| | |||
* | runtime: Typo fixes in comments. | Paul Sokolovsky | 2015-03-03 |
| | |||
* | py: In inline assembler, reset labels on code-size pass. | Damien George | 2015-03-03 |
| | |||
* | py: Simplify some inline-assembler error messages, but retain meaning. | Damien George | 2015-03-03 |
| | | | | | Just to reduce code size. Messages are still to the point and unambiguous. | ||
* | py: Give error for duplicate label in inline assembler. | Damien George | 2015-03-03 |
| | |||
* | py: Guard against redef of nlr_push with DEBUG + MICROPY_NLR_SETJMP. | stijn | 2015-03-03 |
| | |||
* | py: In inline assembler, fix branch out-of-range error reporting. | Damien George | 2015-03-02 |
| | | | | | Should only give an error on the last pass of the assembler, since that's when we are certain about the branch size. | ||
* | py: Use SMALL_INT creation macro in builtin sum. | Damien George | 2015-03-02 |
| | |||
* | py: For inline assembler, add bcc_n and bcc_w ops. | Damien George | 2015-03-02 |
| | | | | Addresses issue #1143. | ||
* | py: Clean up and comment out unused functions in mpz. | Damien George | 2015-03-02 |
| | |||
* | py: Set compiler scope before folding constants so error messages work. | Damien George | 2015-03-01 |
| | | | | Addresses issue #1140. | ||
* | py: Combine complie functions for or_test/and_test to reduce code size. | Damien George | 2015-02-28 |
| | | | | Saves around 60 bytes code on Thumb2 archs. |