- 21 Mar, 2015 1 commit
-
-
Damien George authored
Despite initial guess, this code factoring does not hamper performance. In fact it seems to improve speed by a little: running pystone(1.2) on pyboard (which gives a very stable result) this patch takes pystones from 1729.51 up to 1742.16. Also, pystones on x64 increase by around the same proportion (but it's much noisier). Taking a look at the generated machine code, stack usage with this patch is unchanged, and call is tail-optimised with all arguments in registers. Code size decreases by about 50 bytes on Thumb2 archs.
-
- 07 Feb, 2015 1 commit
-
-
Damien George authored
Without mp_sys_path and mp_sys_argv in the root pointer section of the state, their memory was being incorrectly collected by GC.
-
- 27 Jan, 2015 1 commit
-
-
Damien George authored
Eg, "() + 1" now tells you that __add__ is not supported for tuple and int types (before it just said the generic "binary operator"). We reuse the table of names for slot lookup because it would be a waste of code space to store the pretty name for each operator.
-
- 21 Jan, 2015 1 commit
-
-
Damien George authored
This allows an exception to propagate correctly through a finally handler.
-
- 20 Jan, 2015 1 commit
-
-
Damien George authored
See issue #699.
-
- 07 Jan, 2015 1 commit
-
-
Damien George authored
This patch consolidates all global variables in py/ core into one place, in a global structure. Root pointers are all located together to make GC tracing easier and more efficient.
-
- 01 Jan, 2015 2 commits
-
-
Paul Sokolovsky authored
-
Damien George authored
Reduces code size when MICROPY_ERROR_REPORTING_TERSE is selected.
-
- 29 Dec, 2014 1 commit
-
-
Damien George authored
-
- 06 Nov, 2014 1 commit
-
-
Damien George authored
-
- 25 Oct, 2014 1 commit
-
-
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).
-
- 30 Aug, 2014 1 commit
-
-
Damien George authored
Part of code cleanup, working towards resolving issue #50.
-
- 24 Aug, 2014 1 commit
-
-
Damien George authored
Because (for Thumb) a function pointer has the LSB set, pointers to dynamic functions in RAM (eg native, viper or asm functions) were not being traced by the GC. This patch is a comprehensive fix for this. Addresses issue #820.
-
- 16 Aug, 2014 1 commit
-
-
Damien George authored
-
- 15 Aug, 2014 1 commit
-
-
Damien George authored
-
- 03 Jul, 2014 1 commit
-
-
Damien George authored
See discussion in issue #50.
-
- 07 Jun, 2014 1 commit
-
-
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).
-
- 03 Jun, 2014 1 commit
-
-
Paul Sokolovsky authored
This allows to have multiple "optimization" levels (CPython has two (-OO removes docstrings), we can have more).
-
- 28 May, 2014 1 commit
-
-
Damien George authored
Addresses issue #627.
-
- 12 May, 2014 1 commit
-
-
Damien George authored
__debug__ now resolves to True or False. Its value needs to be set by mp_set_debug(). TODO: call mp_set_debug in unix/ port. TODO: optimise away "if False:" statements in compiler.
-
- 06 May, 2014 2 commits
-
-
Damien George authored
Need to have a policy as to how far we go adding keyword support to built ins. It's nice to have, and gets better CPython compatibility, but hurts the micro nature of uPy. Addresses issue #577.
-
Paul Sokolovsky authored
Addresses #577.
-
- 03 May, 2014 1 commit
-
-
Damien George authored
Blanket wide to all .c and .h files. Some files originating from ST are difficult to deal with (license wise) so it was left out of those. Also merged modpyb.h, modos.h, modstm.h and modtime.h in stmhal/.
-
- 26 Apr, 2014 1 commit
-
-
Damien George authored
-
- 19 Apr, 2014 1 commit
-
-
Damien George authored
These are to assist in writing native C functions that take positional and keyword arguments. mp_arg_check_num is for just checking the number of arguments is correct. mp_arg_parse_all is for parsing positional and keyword arguments with default values.
-
- 17 Apr, 2014 2 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.
-
- 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
-
- 08 Apr, 2014 3 commits
-
-
Damien George authored
-
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 4 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
-
Paul Sokolovsky authored
-
- 31 Mar, 2014 3 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.
-
Damien George authored
-
Damien George authored
These are default arguments after a bare *.
-