Commit message (Collapse) | Author | Age | |
---|---|---|---|
* | py: Make heap printing compatible with 16-bit word size. | Damien George | 2015-04-03 |
| | |||
* | py: Allow MPZ_DIG_SIZE to be optionally configured by a port. | Damien George | 2015-04-03 |
| | |||
* | py: Allow configurable object representation, with 2 different options. | Damien George | 2015-04-03 |
| | |||
* | py: Add finer configuration of static funcs when not in stackless mode. | Damien George | 2015-04-02 |
| | | | | Also rename call_args_t to mp_call_args_t. | ||
* | vm: Support strict stackless mode, with proper exception reporting. | Paul Sokolovsky | 2015-04-03 |
| | | | | | | I.e. in this mode, C stack will never be used to call a Python function, but if there's no free heap for a call, it will be reported as RuntimeError (as expected), not MemoryError. | ||
* | vm: Implement stackless for CALL_FUNCTION_VAR_KW & CALL_METHOD_VAR_KW. | Paul Sokolovsky | 2015-04-03 |
| | |||
* | runtime: Split mp_call_prepare_args_n_kw_var() from mp_call_method_n_kw_var(). | Paul Sokolovsky | 2015-04-03 |
| | | | | | Allow for reuse for stackless design, where preparing args is separate from calling. | ||
* | vm: Stackless support for MP_BC_CALL_METHOD. | Paul Sokolovsky | 2015-04-03 |
| | |||
* | vm: If there's no heap to call function in stackless manner, call via C stack. | Paul Sokolovsky | 2015-04-03 |
| | |||
* | vm: Initial support for calling bytecode functions w/o C stack ("stackless"). | Paul Sokolovsky | 2015-04-03 |
| | |||
* | makeqstrdata.py: Add support for strings with backslash escapes. | Paul Sokolovsky | 2015-04-02 |
| | |||
* | py: Fix emitnative's creation of small ints so it uses the macro. | Damien George | 2015-04-01 |
| | |||
* | objtype: Add special unary methods __pos__, __neg__, __invert__. | Paul Sokolovsky | 2015-03-31 |
| | | | | Conditional on MICROPY_PY_ALL_SPECIAL_METHODS. | ||
* | modbuiltins: round(): Accept second arg, and at least support it to be 0. | Paul Sokolovsky | 2015-03-31 |
| | | | | | Per https://docs.python.org/3/library/functions.html#round, 2-args format guaranteedly returns float. | ||
* | py: Add optional support for descriptors' __get__ and __set__ methods. | stijn | 2015-03-26 |
| | | | | Disabled by default. Enabled on unix and windows ports. | ||
* | 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 |
| |