circuitpython/tests/cmdline
Damien George 5255255fb9 py: Create str/bytes objects in the parser, not the compiler.
Previous to this patch any non-interned str/bytes objects would create a
special parse node that held a copy of the str/bytes data.  Then in the
compiler this data would be turned into a str/bytes object.  This actually
lead to 2 copies of the data, one in the parse node and one in the object.
The parse node's copy of the data would be freed at the end of the compile
stage but nevertheless it meant that the peak memory usage of the
parse/compile stage was higher than it needed to be (by an amount equal to
the number of bytes in all the non-interned str/bytes objects).

This patch changes the behaviour so that str/bytes objects are created
directly in the parser and the object stored in a const-object parse node
(which already exists for bignum, float and complex const objects).  This
reduces peak RAM usage of the parse/compile stage, simplifies the parser
and compiler, and reduces code size by about 170 bytes on Thumb2 archs,
and by about 300 bytes on Xtensa archs.
2017-02-24 13:43:43 +11:00
..
cmd_optimise.py tests/cmdline: Add test for -O option to check optimisation value. 2016-08-26 22:29:38 +10:00
cmd_optimise.py.exp tests/cmdline: Add test for -O option to check optimisation value. 2016-08-26 22:29:38 +10:00
cmd_parsetree.py tests: Add a coverage test for printing the parse-tree. 2016-12-22 11:26:06 +11:00
cmd_parsetree.py.exp py: Create str/bytes objects in the parser, not the compiler. 2017-02-24 13:43:43 +11:00
cmd_showbc.py tests/cmdline: Improve coverage test for printing bytecode. 2016-10-17 11:23:37 +11:00
cmd_showbc.py.exp tests/cmdline/cmd_showbc: Update to work with recent changes. 2017-02-16 18:38:07 +11:00
cmd_verbose.py tests: Add ability to test uPy cmdline executable. 2015-03-13 10:58:34 +00:00
cmd_verbose.py.exp tests: Get cmdline verbose tests running again. 2016-09-20 11:33:19 +10:00
repl_autocomplete.py tests/cmdline: Improve repl.c autocomplete test coverage. 2016-12-29 17:14:04 +11:00
repl_autocomplete.py.exp tests/cmdline: Improve repl.c autocomplete test coverage. 2016-12-29 17:14:04 +11:00
repl_basic.py tests: Improve test coverage of py/compile.c. 2016-10-11 12:30:32 +11:00
repl_basic.py.exp tests: Improve test coverage of py/compile.c. 2016-10-11 12:30:32 +11:00
repl_cont.py py/repl: Check for an identifier char after the keyword. 2016-02-17 08:56:15 +00:00
repl_cont.py.exp py/repl: Check for an identifier char after the keyword. 2016-02-17 08:56:15 +00:00
repl_emacs_keys.py run-tests: Test REPL emacs keys, but only if present. 2015-08-06 00:03:44 +01:00
repl_emacs_keys.py.exp unix: Add exit and paste-mode hints to shell startup banner. 2015-10-12 00:19:00 +01:00