| Age | Commit message (Collapse) | Author | |
|---|---|---|---|
| 2015-04-04 | py: Implement delete for property and descriptors. | Damien George | |
| Without this patch deleting a property, or class with descriptor, will call the setter with a NULL value and lead to a crash. | |||
| 2015-04-04 | py: Some trivial cosmetic changes, for code style consistency. | Damien George | |
| 2015-03-31 | objtype: Add special unary methods __pos__, __neg__, __invert__. | Paul Sokolovsky | |
| Conditional on MICROPY_PY_ALL_SPECIAL_METHODS. | |||
| 2015-03-26 | py: Add optional support for descriptors' __get__ and __set__ methods. | stijn | |
| Disabled by default. Enabled on unix and windows ports. | |||
| 2015-03-21 | py: Combine duplicated code that converts members from a lookup. | Damien George | |
| 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. | |||
| 2015-03-20 | objtype: More comment clarification for attribute lookup. | Paul Sokolovsky | |
| 2015-03-17 | objtype: Clarify comment why we call mp_load_method_maybe() for native sub-obj. | Paul Sokolovsky | |
| 2015-03-16 | objtype: Refactor dealing with native sub-objects for clarity. | Paul Sokolovsky | |
| 2015-03-16 | objtype: mp_obj_class_lookup: Remove implausible condition. | Paul Sokolovsky | |
| We already have branch for lookup->is_type == true, so here it's guaranteed to be false. | |||
| 2015-03-16 | objtype: Clarify comment for mp_obj_class_lookup(). | Paul Sokolovsky | |
| 2015-03-16 | objtype: Clarify code by consistently using common subexpression. | Paul Sokolovsky | |
| 2015-02-22 | py: Add few more special methods. | Paul Sokolovsky | |
| 2015-02-15 | py: Simplify and remove redundant code for __iter__ method lookup. | Damien George | |
| 2015-02-14 | py: Cleanup duplication in instance_is_callable/instance_call. | stijn | |
| 2015-02-09 | py: Don't unnecessarily create a bound method. | Damien George | |
| 2015-02-09 | py: Allow subclass of native object to delegate to the native buffer_p. | Damien George | |
| Addresses issue #1109. | |||
| 2015-02-08 | py: Fix instance lookup, since object is not a real type. | Damien George | |
| 2015-01-31 | py: Add MICROPY_PY_ALL_SPECIAL_METHODS and __iadd__ special method under it. | Paul Sokolovsky | |
| 2015-01-27 | py: Specify unary/binary op name in TypeError error message. | Damien George | |
| Eg, "() + 1" now tells you that __add__ is not supported for tuple and int types (before it just said the generic "binary operator"). We reuse the table of names for slot lookup because it would be a waste of code space to store the pretty name for each operator. | |||
| 2015-01-20 | py: Use mp_arg_check_num in some _make_new functions. | Damien George | |
| Reduces stmhal code size by about 250 bytes. | |||
| 2015-01-20 | py, unix: Allow to compile with -Wunused-parameter. | Damien George | |
| See issue #699. | |||
| 2015-01-11 | py: Remove unnecessary BINARY_OP_EQUAL code that just checks pointers. | Damien George | |
| Previous patch c38dc3ccc76d1a9bf867704f43ea5d15da3fea7b 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. | |||
| 2015-01-08 | tests: Add test for when instance member overrides class member. | Damien George | |
| 2015-01-07 | py: Add option to cache map lookup results in bytecode. | Damien George | |
| 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. | |||
| 2015-01-01 | py: Move to guarded includes, everywhere in py/ core. | Damien George | |
| Addresses issue #1022. | |||
| 2014-12-28 | showbc: Print operation mnemonic in BINARY_OP. | Paul Sokolovsky | |
| 2014-11-06 | py: Use shorter, static error msgs when ERROR_REPORTING_TERSE enabled. | Damien George | |
| 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. | |||
| 2014-11-05 | py: Fix some macros defines; cleanup some includes. | Damien George | |
| 2014-11-03 | py: Explicitly set uninitialised struct member to false. | Damien George | |
| Uninitialised struct members get a default value of 0/false, so this is not strictly needed. But it actually decreases code size because when all members are initialised the compiler doesn't need to insert a call to memset to clear everything. In other words, setting 1 extra member to 0 uses less code than calling memset. ROM savings in bytes: 32-bit unix: 100; bare-arm: 44; stmhal: 52. | |||
| 2014-11-03 | py: Fix builtin callable so it checks user-defined instances correctly. | Damien George | |
| Addresses issue #953. | |||
| 2014-10-23 | py: Use MP_OBJ_NULL instead of NULL in a few places. | Damien George | |
| 2014-08-30 | py: Make tuple and list use mp_int_t/mp_uint_t. | Damien George | |
| Part of code cleanup, to resolve issue #50. | |||
| 2014-08-30 | Change some parts of the core API to use mp_uint_t instead of uint/int. | Damien George | |
| Addressing issue #50, still some way to go yet. | |||
| 2014-08-26 | py: Add dispatch for user defined ==, >, <=, >=. | Damien George | |
| Addresses issue #827. | |||
| 2014-08-24 | py: Fix bug where GC collected native/viper/asm function data. | Damien George | |
| Because (for Thumb) a function pointer has the LSB set, pointers to dynamic functions in RAM (eg native, viper or asm functions) were not being traced by the GC. This patch is a comprehensive fix for this. Addresses issue #820. | |||
| 2014-07-05 | py: Automatically ake __new__ a staticmethod. | Damien George | |
| Addresses issue #622. | |||
| 2014-07-03 | Rename machine_(u)int_t to mp_(u)int_t. | Damien George | |
| See discussion in issue #50. | |||
| 2014-06-10 | py: Implement __contains__ special method. | Damien George | |
| 2014-06-08 | objtype: Fix passing of class param to inherited classmethods. | Paul Sokolovsky | |
| This is getting more and more tangled, but that's old news. | |||
| 2014-06-08 | objtype: Optimize stack usage mp_obj_class_lookup(). | Paul Sokolovsky | |
| As before, instead of pushing constant values on stack again and again, just pass around pointer to a structure. | |||
| 2014-06-08 | objtype: Enable __lt__ method support for instances. | Paul Sokolovsky | |
| 2014-06-06 | Change comments (mainly URLs) to no longer specifically say Python 3.3 | Chris Angelico | |
| 2014-06-03 | py: Allow tail call optimisation in mp_call_function_n_kw. | Damien George | |
| This saves 4 words of stack space per Python call. | |||
| 2014-06-01 | Rename bultins config variables to MICROPY_PY_BUILTINS_*. | Damien George | |
| This renames: MICROPY_PY_FROZENSET -> MICROPY_PY_BUILTINS_FROZENSET MICROPY_PY_PROPERTY -> MICROPY_PY_BUILTINS_PROPERTY MICROPY_PY_SLICE -> MICROPY_PY_BUILTINS_SLICE MICROPY_ENABLE_FLOAT -> MICROPY_PY_BUILTINS_FLOAT See issue #35 for discussion. | |||
| 2014-05-24 | Rename configuration variables controling Python features. | Damien George | |
| Now of the form MICROPY_PY_*. See issue #35. | |||
| 2014-05-22 | py: Initial attempts to actually allow implementing __new__ in Python. | Paul Sokolovsky | |
| Caveat is that __new__ should recurse to base class __new__, and ultimately, object.__new__ is what handles instance allocation. | |||
| 2014-05-21 | objtype: super: Fall back to "object" lookup as last resort. | Paul Sokolovsky | |
| Also, define object.__init__() (semantically empty, purely CPython compat measure). Addresses #520. | |||
| 2014-05-21 | objtype: super: Add stop condition for looking up in base types. | Paul Sokolovsky | |
| 2014-05-21 | py: Rename MP_OBJ_NOT_SUPPORTED to MP_OBJ_NULL. | Damien George | |
| See issue #608 for justification. | |||
| 2014-05-19 | objtype: Separate __new__ and __init__ methods. | Paul Sokolovsky | |
| Now schedule is: for native types, we call ->make_new() C-level method, which should perform actions of __new__ and __init__ (note that this is not compliant, but is efficient), but for user types, __new__ and __init__ are called as expected. Also, make sure we convert scalar attribute value to a bound-pair tight in mp_obj_class_lookup() method, which avoids converting it again and again in its callers. | |||
