- 26 Mar, 2014 3 commits
-
-
Damien George authored
-
Damien George authored
-
Paul Sokolovsky authored
-
- 23 Mar, 2014 2 commits
-
-
Paul Sokolovsky authored
For this, needed to implement DELETE_NAME bytecode (because var bound in except clause is automatically deleted at its end). http://docs.python.org/3/reference/compound_stmts.html#except : "When an exception has been assigned using as target, it is cleared at the end of the except clause."
-
Paul Sokolovsky authored
Based on issues raised during recent review and inconsistency of different implementations.
-
- 22 Mar, 2014 3 commits
-
-
Damien George authored
-
Paul Sokolovsky authored
-
Paul Sokolovsky authored
This is required to properly handle exceptions across yields.
-
- 17 Mar, 2014 1 commit
-
-
xbe authored
Remove unnecessary includes. Add includes that improve portability.
-
- 20 Feb, 2014 1 commit
-
-
Damien George authored
-
- 19 Feb, 2014 2 commits
-
-
Paul Sokolovsky authored
-
Paul Sokolovsky authored
-
- 15 Feb, 2014 2 commits
-
-
Damien George authored
Addresses issue #290, and hopefully sets up things to allow generators throwing exceptions, etc.
-
Damien George authored
Each built-in exception is now a type, with base type BaseException. C exceptions are created by passing a pointer to the exception type to make an instance of. When raising an exception from the VM, an instance is created automatically if an exception type is raised (as opposed to an exception instance). Exception matching (RT_BINARY_OP_EXCEPTION_MATCH) is now proper. Handling of parse error changed to match new exceptions. mp_const_type renamed to mp_type_type for consistency.
-
- 14 Feb, 2014 1 commit
-
-
Damien George authored
-
- 13 Feb, 2014 1 commit
-
-
Paul Sokolovsky authored
-
- 01 Feb, 2014 5 commits
-
-
Damien George authored
IS_NOT and NOT_IN are now compiled to IS + NOT and IN + NOT, with a new special NOT bytecode.
-
Damien George authored
Still todo: break/continue from within the finally block itself.
-
Damien George authored
-
Paul Sokolovsky authored
TODO: Decide if we really need separate bytecode for creating functions with default arguments - we would need same for closures, then there're keywords arguments too. Having all combinations is a small exponential explosion, likely we need just 2 cases - simplest (no defaults, no kw), and full - defaults & kw.
-
Paul Sokolovsky authored
This properly implements return from try/finally block(s). TODO: Consider if we need to do any value stack unwinding for RETURN_VALUE case. Intuitively, this is "success" return, so value stack should be in good shape, and unwinding shouldn't be required.
-
- 31 Jan, 2014 2 commits
-
-
Paul Sokolovsky authored
-
Paul Sokolovsky authored
Also, handle SETUP_FINALLY opcode.
-
- 30 Jan, 2014 1 commit
-
-
Paul Sokolovsky authored
Allows to have nested try blocks with except filters. TODO: Don't add END_FINALLY's exception re-raise points to traceback.
-
- 29 Jan, 2014 2 commits
-
-
Damien George authored
We still have FAST_[0,1,2] byte codes, but they now just access the fastn array (before they had special local variables). It's now simpler, a bit faster, and uses a bit less stack space (on STM at least, which is most important). The only reason now to keep FAST_[0,1,2] byte codes is for compressed byte code size.
-
Damien George authored
LOAD_METHOD bug was: emitbc did not correctly calculate the amount of stack usage for a LOAD_METHOD operation. small int bug was: int was being used to pass small ints, when it should have been machine_int_t.
-
- 26 Jan, 2014 1 commit
-
-
Paul Sokolovsky authored
-
- 25 Jan, 2014 1 commit
-
-
Damien George authored
-
- 24 Jan, 2014 1 commit
-
-
Paul Sokolovsky authored
This reuses as much str implementation as possible, from this we can make them more separate as needed.
-
- 21 Jan, 2014 2 commits
-
-
Damien George authored
Also fixes a bug in the for-in-range optimiser. I hope to remove break and continue byte codes in the future and just use jump (if possible).
-
Damien George authored
Can now have null bytes in strings. Can define ROM qstrs per port using qstrdefsport.h
-
- 19 Jan, 2014 3 commits
-
-
Damien George authored
-
Damien George authored
Exceptions know source file, line and block name. Also tidy up some debug printing functions and provide a global flag to enable/disable them.
-
Damien George authored
-
- 18 Jan, 2014 3 commits
-
-
Damien George authored
-
Damien George authored
Byte code has a map from byte-code offset to source-code line number, used to give better error messages.
-
Damien George authored
Change state layout in VM so the stack starts at state[0] and grows upwards. Locals are at the top end of the state and number downwards. This cleans up a lot of the interface connecting the VM to C: now all functions that take an array of Micro Python objects are in order (ie no longer in reverse). Also clean up C API with keyword arguments (call_n and call_n_kw replaced with single call method that takes keyword arguments). And now make_new takes keyword arguments. emitnative.c has not yet been changed to comply with the new order of stack layout.
-
- 17 Jan, 2014 1 commit
-
-
Paul Sokolovsky authored
-
- 13 Jan, 2014 1 commit
-
-
John R. Lenton authored
-
- 11 Jan, 2014 1 commit
-
-
Damien George authored
-