- 01 Feb, 2014 2 commits
-
-
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 2 commits
-
-
Damien George authored
-
John R. Lenton authored
-
- 10 Jan, 2014 1 commit
-
-
Paul Sokolovsky authored
-
- 07 Jan, 2014 1 commit
-
-
Paul Sokolovsky authored
-
- 06 Jan, 2014 3 commits
-
-
ian-v authored
-
ian-v authored
-
Paul Sokolovsky authored
-
- 04 Jan, 2014 3 commits
-
-
Damien George authored
-
Paul Sokolovsky authored
-
Paul Sokolovsky authored
-
- 02 Jan, 2014 2 commits
-
-
Damien George authored
-
Paul Sokolovsky authored
This is based on the fact that qstr so far behaves more like byte string than like Unicode string (for example, "012"[0] returns 48 (int)).
-
- 30 Dec, 2013 1 commit
-
-
Damien George authored
-
- 29 Dec, 2013 3 commits
- 21 Dec, 2013 1 commit
-
-
Damien authored
A big change. Micro Python objects are allocated as individual structs with the first element being a pointer to the type information (which is itself an object). This scheme follows CPython. Much more flexible, not necessarily slower, uses same heap memory, and can allocate objects statically. Also change name prefix, from py_ to mp_ (mp for Micro Python).
-
- 17 Dec, 2013 1 commit
-
-
Damien authored
-
- 11 Dec, 2013 1 commit
-
-
Damien authored
-
- 10 Dec, 2013 1 commit
-
-
Damien authored
-