Commit message (Collapse) | Author | Age | |
---|---|---|---|
* | py: Allow to compile with -Wstrict-prototypes. | Damien George | 2015-01-12 |
| | |||
* | py: Allow to compile with -Wredundant-decls. | Damien George | 2015-01-12 |
| | |||
* | py, unix, lib: Allow to compile with -Wold-style-definition. | Damien George | 2015-01-12 |
| | |||
* | py: Can compile with -Wmissing-declarations and -Wmissing-prototypes. | Damien George | 2015-01-12 |
| | |||
* | py: Make a function static and comment out those not used. | Damien George | 2015-01-12 |
| | |||
* | py, unix: Allow to compile with -Wdouble-promotion. | Damien George | 2015-01-12 |
| | | | | Ref issue #699. | ||
* | py/makeqstrdata.py: Make it work again with both Python2 and Python3. | Damien George | 2015-01-11 |
| | |||
* | py: Add MICROPY_QSTR_BYTES_IN_LEN config option, defaulting to 1. | Damien George | 2015-01-11 |
| | | | | | | | | | | | | | | | | | | 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. | ||
* | py: Add qstr cfg capability; generate QSTR_NULL and QSTR_ from script. | Damien George | 2015-01-11 |
| | |||
* | py: Remove unnecessary BINARY_OP_EQUAL code that just checks pointers. | Damien George | 2015-01-11 |
| | | | | | | | 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. | ||
* | py: Implement fallback for equality check for all types. | Damien George | 2015-01-11 |
| | | | | | Return "not equal" for objects that don't implement equality check. This is as per Python specs. | ||
* | py: Add (commented out) code to gc_dump_alloc_table for qstr info. | Damien George | 2015-01-11 |
| | |||
* | py/makeqstrdata.py: Add more allowed qstr characters; escape quot. | Damien George | 2015-01-11 |
| | |||
* | py: Fix hard-coded hash for empty qstr (was 0x0000 now 0x1505). | Damien George | 2015-01-11 |
| | |||
* | py: Add config option MICROPY_COMP_MODULE_CONST for module consts. | Damien George | 2015-01-10 |
| | | | | | | 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. | ||
* | py: Fix handling of "0" mpz in some functions. | Damien George | 2015-01-09 |
| | |||
* | py: Make mem_info print correct remaining stack bytes. | Damien George | 2015-01-09 |
| | |||
* | py: Add MICROPY_PY_MICROPYTHON_MEM_INFO to enable mem-info funcs. | Damien George | 2015-01-09 |
| | | | | | | 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}. | ||
* | py: Disable stack checking by default; enable on most ports. | Damien George | 2015-01-09 |
| | |||
* | tests: Add test for when instance member overrides class member. | Damien George | 2015-01-08 |
| | |||
* | py: Fix nlr mp_state_ctx symbol error for Mac. | Damien George | 2015-01-08 |
| | |||
* | Remove obsolete bss-related code/build features | stijn | 2015-01-08 |
| | | | | | 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 | ||
* | py: Add option to cache map lookup results in bytecode. | Damien George | 2015-01-07 |
| | | | | | | | | | | | | | | | 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. | ||
* | py: Put all global state together in state structures. | Damien George | 2015-01-07 |
| | | | | | | 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. | ||
* | py: Temporary fix for conversion of float to int when fits in small int. | Damien George | 2015-01-07 |
| | | | | Addresses issue #1044 (see also #1040). Could do with a better fix. | ||
* | showbc: Show conditional jump destination as unsigned value. | Paul Sokolovsky | 2015-01-07 |
| | | | | | | | | 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. | ||
* | objarray: Make sure that longint works as bytearray size. | Paul Sokolovsky | 2015-01-04 |
| | |||
* | modbuiltins.c: Fix NULL vs MP_OBJ_NULL usage. | Paul Sokolovsky | 2015-01-04 |
| | |||
* | objstr: Common subexpression elimination for vstr_str(field_name). | Paul Sokolovsky | 2015-01-04 |
| | |||
* | objstr: Implement kwargs support for str.format(). | Paul Sokolovsky | 2015-01-04 |
| | |||
* | py: Raise exception if trying to convert inf/nan to int. | Damien George | 2015-01-02 |
| | |||
* | py: Fix float to int conversion for large exponents. | David Steinberg | 2015-01-02 |
| | |||
* | msvc: Fix unresolved mp_arg_error_terse_mismatch since 7f23384 | stijn | 2015-01-02 |
| | | | | | | | | The compiler treats `if (MICROPY_ERROR_REPORTING == MICROPY_ERROR_REPORTING_TERSE)` as a normal statement and generates assembly for it in degug mode as if MICROPY_ERROR_REPORTING is an actual symbol instead of a preprocessor definition. As such linking fails because mp_arg_error_terse_mismatch is not defined when MICROPY_ERROR_REPORTING_TERSE is detailed or normal. | ||
* | py: Make GC's STACK_SIZE definition a proper MICROPY_ config variable. | Damien George | 2015-01-01 |
| | |||
* | py: Fix windows external name error for nlr_top. | Damien George | 2015-01-01 |
| | |||
* | py: Move global variable nlr_top to one place, in a .c file. | Damien George | 2015-01-01 |
| | | | | | This reduces dependency on assembler, and allows to consolidate global variables in the future. | ||
* | py: Move to guarded includes, everywhere in py/ core. | Damien George | 2015-01-01 |
| | | | | Addresses issue #1022. | ||
* | emitnative: Disable warning in delete_fast for now (breaks test). | Paul Sokolovsky | 2015-01-01 |
| | |||
* | py: Add basic framework for issuing compile/runtime warnings. | Paul Sokolovsky | 2015-01-01 |
| | |||
* | py: Add guarded includes for asm-based headers. | Damien George | 2015-01-01 |
| | |||
* | py: Change namedtuple error messages to reduce code size. | Damien George | 2015-01-01 |
| | | | | | | We are not word-for-word compatible with CPython exceptions, so we are free to make them short but informative in order to reduce code size. Also, try to make messages the same as existing ones where possible. | ||
* | py: Make terse_arg_mismatch a global function and use it elsewhere. | Damien George | 2015-01-01 |
| | | | | Reduces code size when MICROPY_ERROR_REPORTING_TERSE is selected. | ||
* | objnamedtuple: Make sure to initialize type structure completely. | Paul Sokolovsky | 2015-01-01 |
| | |||
* | py: Allow keyword arguments for namedtuple | stijn | 2015-01-01 |
| | |||
* | py: Use sequence of strings for named tuple initialization | stijn | 2015-01-01 |
| | | | | | | - remove single string initialization style - take list of strings instead - store list in the type for fast lookup | ||
* | py: Fix rshift and not of zero/one edge cases in mpz. | Damien George | 2014-12-31 |
| | | | | Addresses issue #1027. | ||
* | objstr: Fix %d-formatting of floats. | Paul Sokolovsky | 2014-12-31 |
| | |||
* | py: mp_obj_new_int_from_float() supported only for MICROPY_PY_BUILTINS_FLOAT. | Paul Sokolovsky | 2014-12-30 |
| | |||
* | py: Implement mp_obj_new_int_from_float() for MICROPY_LONGINT_IMPL_NONE. | Paul Sokolovsky | 2014-12-30 |
| | |||
* | py: Partially fix float to int conversion. | Paul Sokolovsky | 2014-12-30 |
| | | | | | | | This fixes conversion when float type has more mantissa bits than small int, and float value has small exponent. This is for example the case of 32-bit platform using doubles, and converting value of time.time(). Conversion of floats with larg exponnet is still not handled correctly. |