- 01 Jan, 2015 1 commit
-
-
Damien George authored
Addresses issue #1022.
-
- 21 Dec, 2014 1 commit
-
-
Damien George authored
-
- 09 Dec, 2014 1 commit
-
-
Damien George authored
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.
-
- 05 Dec, 2014 1 commit
-
-
Damien George authored
mp_lexer_t type is exposed, mp_token_t type is removed, and simple lexer functions (like checking current token kind) are now inlined. This saves 784 bytes ROM on 32-bit unix, 348 bytes on stmhal, and 460 bytes on bare-arm. It also saves a tiny bit of RAM since mp_lexer_t is a bit smaller. Also will run a bit more efficiently.
-
- 06 Nov, 2014 1 commit
-
-
Damien George authored
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.
-
- 02 Nov, 2014 1 commit
-
-
Paul Sokolovsky authored
Undefined behavior in C, needs explicit check.
-
- 25 Oct, 2014 3 commits
-
-
Damien George authored
This allows to implement KeyboardInterrupt on unix, and a much safer ctrl-C in stmhal port. First ctrl-C is a soft one, with hope that VM will notice it; second ctrl-C is a hard one that kills anything (for both unix and stmhal). One needs to check for a pending exception in the VM only for jump opcodes. Others can't produce an infinite loop (infinite recursion is caught by stack check).
-
Damien George authored
This should be pretty compliant with CPython, except perhaps for some corner cases to do with globals/locals context. Addresses issue #879.
-
Paul Sokolovsky authored
-
- 23 Oct, 2014 1 commit
-
-
Damien George authored
-
- 09 Oct, 2014 1 commit
-
-
Damien George authored
-
- 07 Oct, 2014 1 commit
-
-
Dave Hylands authored
-
- 05 Oct, 2014 1 commit
-
-
Damien George authored
This has benefits all round: code factoring for parse/compile/execute, proper context save/restore for exec, allow to sepcify globals/locals for eval, and reduced ROM usage by >100 bytes on stmhal and unix. Also, the call to mp_parse_compile_execute is tail call optimised for the import code, so it doesn't increase stack memory usage.
-
- 03 Oct, 2014 1 commit
-
-
Damien George authored
This should pretty much resolve issue #50.
-
- 25 Sep, 2014 2 commits
-
-
Damien George authored
Addresses issue #864.
-
Damien George authored
It seems most sensible to use size_t for measuring "number of bytes" in malloc and vstr functions (since that's what size_t is for). We don't use mp_uint_t because malloc and vstr are not Micro Python specific.
-
- 23 Sep, 2014 1 commit
-
-
Damien George authored
Stack is full descending and must be 8-byte aligned. It must start off pointing to just above the last byte of RAM. Previously, stack started pointed to last byte of RAM (eg 0x2001ffff) and so was not 8-byte aligned. This caused a bug in combination with alloca. This patch also updates some debug printing code. Addresses issue #872 (among many other undiscovered issues).
-
- 30 Aug, 2014 4 commits
-
-
Damien George authored
-
Damien George authored
Part of code cleanup, working towards resolving issue #50.
-
Damien George authored
Part of code cleanup, working towards resolving issue #50.
-
Damien George authored
Part of code cleanup, to resolve issue #50.
-
- 28 Aug, 2014 1 commit
-
-
Damien George authored
This way, the native glue code is only compiled if native code is enabled (which makes complete sense; thanks to Paul Sokolovsky for the idea). Should fix issue #834.
-
- 16 Aug, 2014 2 commits
-
-
Damien George authored
-
Damien George authored
-
- 15 Aug, 2014 1 commit
-
-
Damien George authored
-
- 04 Aug, 2014 1 commit
-
-
Damien George authored
qstr_init is always called exactly before mp_init, so makes sense to just have mp_init call it. Similarly with mp_init_emergency_exception_buf. Doing this makes the ports simpler and less error prone (ie they can no longer forget to call these).
-
- 03 Jul, 2014 1 commit
-
-
Damien George authored
See discussion in issue #50.
-
- 30 Jun, 2014 1 commit
-
-
Paul Sokolovsky authored
-
- 27 Jun, 2014 1 commit
-
-
Paul Sokolovsky authored
As stack checking is enabled by default, ports which don't call stack_ctrl_init() are broken now (report RuntimeError on startup). Save them trouble and just init stack control framework in interpreter init.
-
- 20 Jun, 2014 1 commit
-
-
Paul Sokolovsky authored
One thing is wanting to do 1 / 2 and get something else but 0, and quite another - doing rocket science ;-).
-
- 07 Jun, 2014 2 commits
-
-
Paul Sokolovsky authored
Benefits: won't crash baremetal targets, will provide Python source location when not implemented feature used (it will no longer provide C source location, but just grep for error message).
-
Marcus von Appen authored
- Move the includes for alloca() intp mpconfigport.h
-
- 05 Jun, 2014 1 commit
-
-
Chris Angelico authored
-
- 03 Jun, 2014 2 commits
-
-
Damien George authored
This saves 4 words of stack space per Python call.
-
Paul Sokolovsky authored
This allows to have multiple "optimization" levels (CPython has two (-OO removes docstrings), we can have more).
-
- 01 Jun, 2014 3 commits
-
-
Damien George authored
-
Damien George authored
-
Damien George authored
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.
-
- 28 May, 2014 2 commits
-
-
Damien George authored
Also unifies use of SMALL_INT_FITS macro across parser and runtime.
-
Damien George authored
Addresses issue #627.
-