summaryrefslogtreecommitdiffstatshomepage
path: root/py
Commit message (Collapse)AuthorAge
* py: Make GC's STACK_SIZE definition a proper MICROPY_ config variable.Damien George2015-01-01
|
* py: Fix windows external name error for nlr_top.Damien George2015-01-01
|
* py: Move global variable nlr_top to one place, in a .c file.Damien George2015-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 George2015-01-01
| | | | Addresses issue #1022.
* emitnative: Disable warning in delete_fast for now (breaks test).Paul Sokolovsky2015-01-01
|
* py: Add basic framework for issuing compile/runtime warnings.Paul Sokolovsky2015-01-01
|
* py: Add guarded includes for asm-based headers.Damien George2015-01-01
|
* py: Change namedtuple error messages to reduce code size.Damien George2015-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 George2015-01-01
| | | | Reduces code size when MICROPY_ERROR_REPORTING_TERSE is selected.
* objnamedtuple: Make sure to initialize type structure completely.Paul Sokolovsky2015-01-01
|
* py: Allow keyword arguments for namedtuplestijn2015-01-01
|
* py: Use sequence of strings for named tuple initializationstijn2015-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 George2014-12-31
| | | | Addresses issue #1027.
* objstr: Fix %d-formatting of floats.Paul Sokolovsky2014-12-31
|
* py: mp_obj_new_int_from_float() supported only for MICROPY_PY_BUILTINS_FLOAT.Paul Sokolovsky2014-12-30
|
* py: Implement mp_obj_new_int_from_float() for MICROPY_LONGINT_IMPL_NONE.Paul Sokolovsky2014-12-30
|
* py: Partially fix float to int conversion.Paul Sokolovsky2014-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.
* py: Add include guards to mpconfig,misc,qstr,obj,runtime,parsehelper.Damien George2014-12-29
|
* py: In VM, for selective ip saving, store 1 byte past last opcode.Damien George2014-12-29
| | | | | | 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.
* py: Add note about -fno-crossjumping when compiling vm.c.Paul Sokolovsky2014-12-29
|
* py: Add MP_LIKELY(), MP_UNLIKELY() macros to help branch prediction.v1.3.8Paul Sokolovsky2014-12-29
|
* showbc: Print operation mnemonic in BINARY_OP.Paul Sokolovsky2014-12-28
|
* showbc: Make code object start pointer semi-public.Paul Sokolovsky2014-12-28
| | | | | This allows to pring either absolute addresses or relative offsets in jumps and code references.
* vm: Record exception ip only for instructions where exceptions may happen.Paul Sokolovsky2014-12-28
| | | | | | | Mirroring ip to a volatile memory variable for each opcode is an expensive operation. For quite a lot of often executed opcodes like stack manipulation or jumps, exceptions cannot actually happen. So, record ip only for opcode where that's possible.
* py: Allow to properly disable builtin slice operation.Damien George2014-12-27
| | | | | | | This patch makes the MICROPY_PY_BUILTINS_SLICE compile-time option fully disable the builtin slice operation (when set to 0). This includes removing the slice sytanx from the grammar. Now, enabling slice costs 4228 bytes on unix x64, and 1816 bytes on stmhal.
* py: Allow to properly disable builtin "set" object.Damien George2014-12-27
| | | | | | | | This patch makes MICROPY_PY_BUILTINS_SET compile-time option fully disable the builtin set object (when set to 0). This includes removing set constructor/comprehension from the grammar, the compiler and the emitters. Now, enabling set costs 8168 bytes on unix x64, and 3576 bytes on stmhal.
* py: Move to guarded includes for compile.h and related headers.Paul Sokolovsky2014-12-27
|
* showbc: Refactor to allow inline instruction printing.Paul Sokolovsky2014-12-27
|
* py: Make bytes objs work with more str methods; add tests.Damien George2014-12-24
|
* py: Reduce size of VM exception stack element by 1 machine word.Damien George2014-12-22
| | | | | | | | | | | This optimisation reduces the VM exception stack element (mp_exc_stack_t) by 1 word, by using bit 1 of a pointer to store whether the opcode was a FINALLY or WITH opcode. This optimisation was pending, waiting for maturity of the exception handling code, which has now proven itself. Saves 1 machine word RAM for each exception (4->3 words per exception). Increases stmhal code by 4 bytes, and decreases unix x64 code by 32 bytes.
* py: Use str_to_int function in more places to reduce code size.Damien George2014-12-21
|
* py: Remove last uses of printf from compile; use proper SyntaxError.Damien George2014-12-21
|
* py: Move global/nonlocal decl code to compiler for proper SyntaxError.Damien George2014-12-21
| | | | | | This patch gives proper SyntaxError exceptions for bad global/nonlocal declarations. It also reduces code size: 304 bytes on unix x64, 132 bytes on stmhal.
* py: Fix iteration over map in 2 places.Damien George2014-12-21
|
* py: Remove unnecessary RULE_none and PN_none from parser.Damien George2014-12-20
|
* py: Add blank and ident flags to grammar rules to simplify parser.Damien George2014-12-20
| | | | This saves around 100 bytes code space on stmhal, more on unix.
* py: Save a few code bytes in parser; make vars local where possible.Damien George2014-12-20
|
* py: Add execfile function (from Python 2); enable in stmhal port.Damien George2014-12-19
| | | | Adds just 60 bytes to stmhal binary. Addresses issue #362.
* asmarm: Fix bug with encoding small negative ints using MVN instruction.Paul Sokolovsky2014-12-14
|
* py: Fix optimised for-loop compiler so it follows proper semantics.Damien George2014-12-12
| | | | | | | | | You can now assign to the range end variable and the for-loop still works correctly. This fully addresses issue #565. Also fixed a bug with the stack not being fully popped when breaking out of an optimised for-loop (and it's actually impossible to write a test for this case!).
* py: Fix label printing in showbc; print sp in vm trace.Damien George2014-12-12
|
* py: Fix a semantic issue with range optimisation.Damien George2014-12-11
| | | | | | | Now you can assign to the range variable within the for loop and it will still work. Partially addresses issue #565.
* py: Tidy up a few function declarations.Damien George2014-12-10
|
* py: Remove static from definition of pfenv_printf.Damien George2014-12-10
| | | | It's used by stmhal, but not unix.
* py: Make functions static where appropriate.Damien George2014-12-10
|
* py: Fix function type: () -> (void).Damien George2014-12-10
|
* py: Allow builtins to be overridden.Damien George2014-12-09
| | | | | | | | | | | | | | This patch adds a configuration option (MICROPY_CAN_OVERRIDE_BUILTINS) which, when enabled, allows to override all names within the builtins module. A builtins override dict is created the first time the user assigns to a name in the builtins model, and then that dict is searched first on subsequent lookups. Note that this implementation doesn't allow deleting of names. This patch also does some refactoring of builtins code, creating the modbuiltins.c file. Addresses issue #959.
* modsys: Add sys.print_exception(exc, file=sys.stdout) function.Paul Sokolovsky2014-12-08
| | | | | | | | | | | | The function is modeled after traceback.print_exception(), but unbloated, and put into existing module to save overhead on adding another module. Compliant traceback.print_exception() is intended to be implemented in micropython-lib in terms of sys.print_exception(). This change required refactoring mp_obj_print_exception() to take pfenv_t interface arguments. Addresses #751.
* py: Rename mp_obj_int_get to mp_obj_int_get_truncated; fix struct.pack.Damien George2014-12-05
| | | | | | | | | | | mp_obj_int_get_truncated is used as a "fast path" int accessor that doesn't check for overflow and returns the int truncated to the machine word size, ie mp_int_t. Use mp_obj_int_get_truncated to fix struct.pack when packing maximum word sized values. Addresses issues #779 and #998.
* py: Fix printing of size_t entity; fix qemu-arm for changes to lexer.Damien George2014-12-05
|