- 15 Apr, 2014 1 commit
-
-
AZ Huang authored
-
- 14 Apr, 2014 2 commits
-
-
Damien George authored
Disabled by default. Enabled in unix port.
-
AZ Huang authored
-
- 13 Apr, 2014 1 commit
-
-
Damien George authored
Attempt to address issue #386. unique_code_id's have been removed and replaced with a pointer to the "raw code" information. This pointer is stored in the actual byte code (aligned, so the GC can trace it), so that raw code (ie byte code, native code and inline assembler) is kept only for as long as it is needed. In memory it's now like a tree: the outer module's byte code points directly to its children's raw code. So when the outer code gets freed, if there are no remaining functions that need the raw code, then the children's code gets freed as well. This is pretty much like CPython does it, except that CPython stores indexes in the byte code rather than machine pointers. These indices index the per-function constant table in order to find the relevant code.
-
- 12 Apr, 2014 1 commit
-
-
Damien George authored
This is necessary to catch all cases where locals are referenced before assignment. We still keep the _0, _1, _2 versions of LOAD_FAST to help reduced the byte code size in RAM. Addresses issue #457.
-
- 11 Apr, 2014 1 commit
-
-
Damien George authored
This simplifies the compiler a little, since now it can do 1 pass over a function declaration, to determine default arguments. I would have done this originally, but CPython 3.3 somehow had the default keyword args compiled before the default position args (even though they appear in the other order in the text of the script), and I thought it was important to have the same order of execution when evaluating default arguments. CPython 3.4 has changed the order to the more obvious one, so we can also change.
-
- 10 Apr, 2014 2 commits
-
-
Damien George authored
-
Damien George authored
-
- 09 Apr, 2014 2 commits
-
-
Damien George authored
-
Damien George authored
Needed to reinstate 2 delete opcodes, to specifically check that a local is not deleted twice.
-
- 08 Apr, 2014 4 commits
-
-
Damien George authored
This makes the runtime and object APIs more consistent. mp_store_subscr functionality now moved into objects (ie list and dict store_item).
-
Damien George authored
At this point, all opcodes are now implemented! Some del opcodes have been combined with store opcodes, with the value to store being MP_OBJ_NULL.
-
Damien George authored
-
Damien George authored
-
- 06 Apr, 2014 1 commit
-
-
Damien George authored
On x64, native emitter now passes 70 of the tests.
-
- 05 Apr, 2014 3 commits
-
-
Damien George authored
This does not affect code size or performance when debugging turned off. To address issue #420.
-
Damien George authored
-
Damien George authored
-
- 04 Apr, 2014 1 commit
-
-
Damien George authored
A malloc/realloc fail now throws MemoryError.
-
- 31 Mar, 2014 4 commits
-
-
Damien George authored
-
Paul Sokolovsky authored
There was thinkos that either send_value or throw_value is specified, but there were cases with both. Note that send_value is pushed onto generator's stack - but that's probably only good, because if we throw exception into gen, it should not ever use send_value, and that will be just extra "assert".
-
Damien George authored
These are default arguments after a bare *.
-
Damien George authored
Adding this bytecode allows to remove 4 others related to function/method calls with * and ** support. Will also help with bytecodes that make functions/closures with default positional and keyword args.
-
- 30 Mar, 2014 7 commits
-
-
Paul Sokolovsky authored
Iterators and ducktype objects can now be arguments of yield from.
-
Damien George authored
Extends previous implementation with * for function calls to * and ** for both function and method calls.
-
Paul Sokolovsky authored
-
Paul Sokolovsky authored
-
Damien George authored
Mostly just a global search and replace. Except rt_is_true which becomes mp_obj_is_true. Still would like to tidy up some of the names, but this will do for now.
-
Damien George authored
-
Damien George authored
-
- 29 Mar, 2014 10 commits
-
-
Paul Sokolovsky authored
Required to reraise correct exceptions in except block, regardless if more try blocks with active exceptions happen in the same except block. P.S. This "automagic reraise" appears to be quite wasteful feature of Python - we need to save pending exception just in case it *might* be reraised. Instead, programmer could explcitly capture exception to a variable using "except ... as var", and reraise that. So, consider disabling argless raise support as an optimization.
-
Paul Sokolovsky authored
-
Paul Sokolovsky authored
E.g. to handle currently_in_except_block restoring properly.
-
Paul Sokolovsky authored
-
Paul Sokolovsky authored
-
Damien George authored
The compiler allocates 7 entries on the stack for a with statement (following CPython, but probably can be reduced). This is enough for the method load and call in SETUP_WITH.
-
Damien George authored
-
Damien George authored
Addresses issue #388.
-
Damien George authored
Partly (very partly!) addresses issue #386. Most importantly, at the REPL command line, each invocation does not now lead to increased memory usage (unless you define a function/lambda).
-
Paul Sokolovsky authored
-