summaryrefslogtreecommitdiff
path: root/py
AgeCommit message (Collapse)Author
2015-01-12py: Make a function static and comment out those not used.Damien George
2015-01-12py, unix: Allow to compile with -Wdouble-promotion.Damien George
Ref issue #699.
2015-01-11py/makeqstrdata.py: Make it work again with both Python2 and Python3.Damien George
2015-01-11py: Add MICROPY_QSTR_BYTES_IN_LEN config option, defaulting to 1.Damien George
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.
2015-01-11py: Add qstr cfg capability; generate QSTR_NULL and QSTR_ from script.Damien George
2015-01-11py: 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-11py: Implement fallback for equality check for all types.Damien George
Return "not equal" for objects that don't implement equality check. This is as per Python specs.
2015-01-11py: Add (commented out) code to gc_dump_alloc_table for qstr info.Damien George
2015-01-11py/makeqstrdata.py: Add more allowed qstr characters; escape quot.Damien George
2015-01-11py: Fix hard-coded hash for empty qstr (was 0x0000 now 0x1505).Damien George
2015-01-10py: Add config option MICROPY_COMP_MODULE_CONST for module consts.Damien George
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.
2015-01-09py: Fix handling of "0" mpz in some functions.Damien George
2015-01-09py: Make mem_info print correct remaining stack bytes.Damien George
2015-01-09py: Add MICROPY_PY_MICROPYTHON_MEM_INFO to enable mem-info funcs.Damien George
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}.
2015-01-09py: Disable stack checking by default; enable on most ports.Damien George
2015-01-08tests: Add test for when instance member overrides class member.Damien George
2015-01-08py: Fix nlr mp_state_ctx symbol error for Mac.Damien George
2015-01-08Remove obsolete bss-related code/build featuresstijn
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
2015-01-07py: 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-07py: Put all global state together in state structures.Damien George
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.
2015-01-07py: Temporary fix for conversion of float to int when fits in small int.Damien George
Addresses issue #1044 (see also #1040). Could do with a better fix.
2015-01-07showbc: Show conditional jump destination as unsigned value.Paul Sokolovsky
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.
2015-01-04objarray: Make sure that longint works as bytearray size.Paul Sokolovsky
2015-01-04modbuiltins.c: Fix NULL vs MP_OBJ_NULL usage.Paul Sokolovsky
2015-01-04objstr: Common subexpression elimination for vstr_str(field_name).Paul Sokolovsky
2015-01-04objstr: Implement kwargs support for str.format().Paul Sokolovsky
2015-01-02py: Raise exception if trying to convert inf/nan to int.Damien George
2015-01-02py: Fix float to int conversion for large exponents.David Steinberg
2015-01-02msvc: Fix unresolved mp_arg_error_terse_mismatch since 7f23384stijn
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.
2015-01-01py: Make GC's STACK_SIZE definition a proper MICROPY_ config variable.Damien George
2015-01-01py: Fix windows external name error for nlr_top.Damien George
2015-01-01py: Move global variable nlr_top to one place, in a .c file.Damien George
This reduces dependency on assembler, and allows to consolidate global variables in the future.
2015-01-01py: Move to guarded includes, everywhere in py/ core.Damien George
Addresses issue #1022.
2015-01-01emitnative: Disable warning in delete_fast for now (breaks test).Paul Sokolovsky
2015-01-01py: Add basic framework for issuing compile/runtime warnings.Paul Sokolovsky
2015-01-01py: Add guarded includes for asm-based headers.Damien George
2015-01-01py: Change namedtuple error messages to reduce code size.Damien George
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.
2015-01-01py: Make terse_arg_mismatch a global function and use it elsewhere.Damien George
Reduces code size when MICROPY_ERROR_REPORTING_TERSE is selected.
2015-01-01objnamedtuple: Make sure to initialize type structure completely.Paul Sokolovsky
2015-01-01py: Allow keyword arguments for namedtuplestijn
2015-01-01py: Use sequence of strings for named tuple initializationstijn
- remove single string initialization style - take list of strings instead - store list in the type for fast lookup
2014-12-31py: Fix rshift and not of zero/one edge cases in mpz.Damien George
Addresses issue #1027.
2014-12-31objstr: Fix %d-formatting of floats.Paul Sokolovsky
2014-12-30py: mp_obj_new_int_from_float() supported only for MICROPY_PY_BUILTINS_FLOAT.Paul Sokolovsky
2014-12-30py: Implement mp_obj_new_int_from_float() for MICROPY_LONGINT_IMPL_NONE.Paul Sokolovsky
2014-12-30py: Partially fix float to int conversion.Paul Sokolovsky
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.
2014-12-29py: Add include guards to mpconfig,misc,qstr,obj,runtime,parsehelper.Damien George
2014-12-29py: In VM, for selective ip saving, store 1 byte past last opcode.Damien George
This is for efficiency, so we don't need to subtract 1 from the ip before storing it to code_state->ip. It saves a lot of ROM bytes on unix and stmhal.
2014-12-29py: Add note about -fno-crossjumping when compiling vm.c.Paul Sokolovsky
2014-12-29py: Add MP_LIKELY(), MP_UNLIKELY() macros to help branch prediction.v1.3.8Paul Sokolovsky