- 25 Apr, 2014 1 commit
-
-
Paul Sokolovsky authored
-
- 18 Apr, 2014 1 commit
-
-
Paul Sokolovsky authored
I skipped implementing this initially, but then it causes __name__ of current module be overwritten and relative imports fail.
-
- 17 Apr, 2014 3 commits
-
-
Damien George authored
Also make consistent use of MP_OBJ_NOT_SUPPORTED and MP_OBJ_NULL. This helps a lot in debugging and understanding of function API.
-
Damien George authored
mp_obj_t->subscr now does load/store/delete.
-
Damien George authored
-
- 13 Apr, 2014 2 commits
-
-
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.
-
Paul Sokolovsky authored
-
- 12 Apr, 2014 2 commits
-
-
Damien George authored
-
Paul Sokolovsky authored
-
- 11 Apr, 2014 2 commits
-
-
Paul Sokolovsky authored
-
Paul Sokolovsky authored
-
- 10 Apr, 2014 1 commit
-
-
Damien George authored
-
- 08 Apr, 2014 3 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
-
- 06 Apr, 2014 1 commit
-
-
Damien George authored
On x64, native emitter now passes 70 of the tests.
-
- 05 Apr, 2014 8 commits
-
-
Paul Sokolovsky authored
Based on the discussion in #433. mp_load_attr() is critical-path function, so any extra check will slowdown any script. As supporting default val required only for getattr() builtin, move correspending implementation there (still as a separate function due to concerns of maintainability of such almost-duplicated code instances).
-
Damien George authored
Finishes addressing issue #424. In the end this was a very neat refactor that now makes things a lot more consistent across the py code base. It allowed some simplifications in certain places, now that everything is a dict object. Also converted builtins tables to dictionaries. This will be useful when we need to turn builtins into a proper module.
-
Damien George authored
Towards addressing issue #424. Had a small increase to ROM usage (order 60 bytes).
-
Damien George authored
This does not affect code size or performance when debugging turned off. To address issue #420.
-
Damien George authored
-
Paul Sokolovsky authored
-
Paul Sokolovsky authored
That's how CPython has it, in particular, "import __main__" should work.
-
Paul Sokolovsky authored
-
- 04 Apr, 2014 2 commits
-
-
Damien George authored
Previous overflow test was inadequate.
-
Damien George authored
A malloc/realloc fail now throws MemoryError.
-
- 03 Apr, 2014 1 commit
-
-
Damien George authored
-
- 02 Apr, 2014 1 commit
-
-
Damien George authored
-
- 31 Mar, 2014 6 commits
-
-
Damien George authored
It's not completely satisfactory, because a failed call to __getattr__ should not raise an exception. __setattr__ could be implemented, but it would slow down all stores to a user created object. Need to implement some caching system.
-
Paul Sokolovsky authored
Because it's superfluos in the presence of type(), a remenant from Python's "old classes".
-
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".
-
Paul Sokolovsky authored
In this case, the exception is just re-thrown - the ideas is that object doesn't handle this exception specially, so it will propagated per Python semantics.
-
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 5 commits
-
-
Paul Sokolovsky authored
"1/0" is sacred idiom, the shortest way to break program execution (sys.exit() is too long).
-
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.
-
Damien George authored
Pretty much everyone needs to include map.h, since it's such an integral part of the Micro Python object implementation. Thus, the definitions are now in obj.h instead. map.h is removed.
-
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.
-
- 29 Mar, 2014 1 commit
-
-
Damien George authored
-