aboutsummaryrefslogtreecommitdiff
path: root/tests/cmdline
AgeCommit message (Collapse)Author
2015-06-25py: Remove mp_load_const_bytes and instead load precreated bytes object.Damien George
Previous to this patch each time a bytes object was referenced a new instance (with the same data) was created. With this patch a single bytes object is created in the compiler and is loaded directly at execute time as a true constant (similar to loading bignum and float objects). This saves on allocating RAM and means that bytes objects can now be used when the memory manager is locked (eg in interrupts). The MP_BC_LOAD_CONST_BYTES bytecode was removed as part of this. Generated bytecode is slightly larger due to storing a pointer to the bytes object instead of the qstr identifier. Code size is reduced by about 60 bytes on Thumb2 architectures.
2015-06-13py: Add MP_BINARY_OP_DIVMOD to simplify and consolidate divmod builtin.Damien George
2015-05-27unix: Add option to use uPy readline, and enable by default.Damien George
This gets uPy readline working with unix port, with tab completion and history. GNU readline is still supported, configure using MICROPY_USE_READLINE variable.
2015-05-12py: Convert hash API to use MP_UNARY_OP_HASH instead of ad-hoc function.Damien George
Hashing is now done using mp_unary_op function with MP_UNARY_OP_HASH as the operator argument. Hashing for int, str and bytes still go via fast-path in mp_unary_op since they are the most common objects which need to be hashed. This lead to quite a bit of code cleanup, and should be more efficient if anything. It saves 176 bytes code space on Thumb2, and 360 bytes on x86. The only loss is that the error message "unhashable type" is now the more generic "unsupported type for __hash__".
2015-05-06py: Fix naming of function arguments when function is a closure.Damien George
Addresses issue #1226.
2015-05-05tests: Fix cmd_showbc now that LOAD_CONST_ELLIPSIS bytecode is gone.Damien George
2015-04-24py: Modify bytecode "with" behaviour so it doesn't use any heap.Damien George
Before this patch a "with" block needed to create a bound method object on the heap for the __exit__ call. Now it doesn't because we use load_method instead of load_attr, and save the method+self on the stack.
2015-04-07py: Simplify bytecode prelude when encoding closed over variables.Damien George
2015-04-04tests: Add missing tests for builtins, and many other things.Damien George
2015-03-20tests: Adjust expected output, since Travis can't do git describe.Damien George
2015-03-20tests: Make cmdline tests more stable by using regex for matching.Damien George
2015-03-14tests: Don't try to verify amount of memory used in cmd_showbc test.Damien George
2015-03-14tests: Add cmdline test to test showbc code.Damien George
2015-03-13tests: Add ability to test uPy cmdline executable.Damien George
This allows to test options passed to cmdline executable, as well as the behaviour of the REPL.