aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2017-02-16tests/cmdline: Update cmd_parsetree test for changes to grammar order.Damien George
2017-02-16py/grammar: Group no-compile grammar rules together to shrink tables.Damien George
Grammar rules have 2 variants: ones that are attached to a specific compile function which is called to compile that grammar node, and ones that don't have a compile function and are instead just inspected to see what form they take. In the compiler there is a table of all grammar rules, with each entry having a pointer to the associated compile function. Those rules with no compile function have a null pointer. There are 120 such rules, so that's 120 words of essentially wasted code space. By grouping together the compile vs no-compile rules we can put all the no-compile rules at the end of the list of rules, and then we don't need to store the null pointers. We just have a truncated table and it's guaranteed that when indexing this table we only index the first half, the half with populated pointers. This patch implements such a grouping by having a specific macro for the compile vs no-compile grammar rules (DEF_RULE vs DEF_RULE_NC). It saves around 460 bytes of code on 32-bit archs.
2017-02-16tests/micropython/heapalloc_iter: Add tests for contains and unpack.Damien George
2017-02-16py: De-optimise some uses of mp_getiter, so they don't use the C stack.Damien George
In these cases the heap is anyway used to create a new object so no real need to use the C stack for iterating. It saves a few bytes of code size.
2017-02-16tests/micropython: Add test for iterating with the heap locked.Damien George
2017-02-16tests/cmdline/cmd_showbc: Update to work with recent changes.Damien George
2017-02-16py/compile: Optimise list/dict/set comprehensions to use stack iter.Damien George
2017-02-16tests/cmdline: Update tests to pass with latest changes to bytecode.Damien George
2017-02-16py/runtime: Optimise case of identity iterator so it doesn't alloc RAM.Damien George
2017-02-16py: Remove unused "use_stack" argument from for_iter_end emit function.Damien George
2017-02-16py: Optimise storage of iterator so it takes only 4 slots on Py stack.Damien George
2017-02-16py: Make FOR_ITER opcode pop 1+4 slots from the stack when finished.Damien George
The extra 4 slots correspond to the iterator object stored on the stack.
2017-02-16py: Allow bytecode/native to put iter_buf on stack for simple for loops.Damien George
So that the "for x in it: ..." statement can now work without using the heap (so long as the iterator argument fits in an iter_buf structure).
2017-02-16py: Add iter_buf to getiter type method.Damien George
Allows to iterate over the following without allocating on the heap: - tuple - list - string, bytes - bytearray, array - dict (not dict.keys, dict.values, dict.items) - set, frozenset Allows to call the following without heap memory: - all, any, min, max, sum TODO: still need to allocate stack memory in bytecode for iter_buf.
2017-02-16py/vm: Convert mp_uint_t to size_t where appropriate.Damien George
2017-02-16py/objint: Convert mp_uint_t to size_t where appropriate.Damien George
2017-02-16py/objexcept: Convert mp_uint_t to size_t where appropriate.Damien George
2017-02-16py/objclosure: Convert mp_uint_t to size_t where appropriate.Damien George
2017-02-16py/objfun: Convert mp_uint_t to size_t where appropriate.Damien George
2017-02-16py/objarray: Convert mp_uint_t to size_t where appropriate.Damien George
2017-02-16py/objstr: Convert mp_uint_t to size_t (and use int) where appropriate.Damien George
2017-02-16py/objset: Convert mp_uint_t to size_t where appropriate.Damien George
2017-02-16py/objdict: Convert mp_uint_t to size_t where appropriate.Damien George
2017-02-16py/objlist: Convert mp_uint_t to size_t where appropriate.Damien George
2017-02-16py/objtuple: Convert mp_uint_t to size_t where appropriate.Damien George
2017-02-16py/persistentcode: Replace mp_uint_t with size_t where appropriate.Damien George
2017-02-16py/mpz: Change type of "base" args from mp_uint_t to unsigned int.Damien George
2017-02-16py/mpz: Remove obsolete declaration of mpz_as_str_size.Damien George
2017-02-16py/mpz: Convert mp_uint_t to size_t where appropriate.Damien George
2017-02-16py/runtime: Convert mp_uint_t to size_t where appropriate.Damien George
2017-02-15extmod/modlwip: Add my copyright.Paul Sokolovsky
Per: $ git log modlwip.c |grep ^Auth | sort | uniq -c 9 Author: Damien George 2 Author: Galen Hazelwood 43 Author: Paul Sokolovsky
2017-02-15tests/basic/: Make various tests skippable.Paul Sokolovsky
To run the testsuite on small ports.
2017-02-15tests/gen_yield_from_close: Use range() instead of reversed().Paul Sokolovsky
As a "more basic" builtin iterator, present even in smaller ports.
2017-02-15examples/embedding/README: Convert to markdown, grammar and clarity fixes.Paul Sokolovsky
2017-02-15stmhal: Use generic interrupt char code.Damien George
2017-02-15stmhal: Implement a proper thread scheduler.Damien George
This patch changes the threading implementation from simple round-robin with busy waits on mutexs, to proper scheduling whereby threads that are waiting on a mutex are only scheduled when the mutex becomes available.
2017-02-15py/vm: Add MICROPY_PY_THREAD_GIL_VM_DIVISOR option.Damien George
This improves efficiency of GIL release within the VM, by only doing the release after a fixed number of jump-opcodes have executed in the current thread.
2017-02-15py/modthread: Use system-provided mutexs for _thread locks.Damien George
It's more efficient using the system mutexs instead of synthetic ones with a busy-wait loop. The system can do proper scheduling and blocking of the threads waiting on the mutex.
2017-02-15tests/thread: Add stress-test for creating many threads.Damien George
2017-02-15tests/thread: Replace busy waiting loops with a loop that sleeps.Damien George
Depending on the thread scheduler, a busy-wait loop can hog the CPU and make the tests very slow. So convert such loops to loops that have an explicit sleep, allowing the worker threads to do their job.
2017-02-15tests/extmod: Make tests skippable.Paul Sokolovsky
2017-02-15tests/dict_fromkeys: Revert to use reversed() to run in native codegen mode.Paul Sokolovsky
2017-02-15tests/basic/[a-f]*: Make skippable.Paul Sokolovsky
For small ports which don't have all features enabled.
2017-02-14zephyr/main: Don't unconditionally dump stats on each GC.Paul Sokolovsky
This was a debug output for initial porting, breaks tests.
2017-02-14tests/builtin_dir: The most expected thing in sys is exit, test for it.Paul Sokolovsky
2017-02-14tests/comprehension1, containment: Split set tests to separate files.Paul Sokolovsky
To make skippable.
2017-02-14tests/run-tests: Allow to skip tests using async/await keywords.Paul Sokolovsky
2017-02-14tests: Add option to not clear MICROPYPATH when running testsstijn
This allows using the test runner for other scenarios than just testing uPy itself. The principle of comparing either to CPython or else to a .exp file is really handy but to be able to test custom modules not built into micropython.exe one needs to be able to specify the module search path a.k.a MICROPYPATH.
2017-02-14zephyr: Add qemu_cortex_m3 config fragment.Paul Sokolovsky
Should work for QEMU networking with soon-to-merged upstream patch.
2017-02-14zephyr: Enable IPv6 networking in addition to IPv4.Paul Sokolovsky