micropython/tests/cmdline
Damien George 90682f43af py/compile: Allow new qstrs to be allocated at all compiler passes.
Prior to this commit, all qstrs were required to be allocated (by calling
mp_emit_common_use_qstr) in the MP_PASS_SCOPE pass (the first one).  But
this is an unnecessary restriction, which is lifted by this commit.
Lifting the restriction simplifies the compiler because it can allocate
qstrs in later passes.

This also generates better code, because in some cases (eg when a variable
is closed over) the scope of an identifier is not known until a bit later
and then the identifier no longer needs its qstr allocated in the global
table.

Code size is reduced for all ports with this commit.

Signed-off-by: Damien George <damien@micropython.org>
2022-05-17 23:39:22 +10:00
..
cmd_optimise.py
cmd_optimise.py.exp
cmd_parsetree.py
cmd_parsetree.py.exp py/compile: Allow new qstrs to be allocated at all compiler passes. 2022-05-17 23:39:22 +10:00
cmd_showbc.py
cmd_showbc.py.exp py/compile: Allow new qstrs to be allocated at all compiler passes. 2022-05-17 23:39:22 +10:00
cmd_verbose.py
cmd_verbose.py.exp
repl_autocomplete.py
repl_autocomplete.py.exp
repl_autoindent.py tests/cmdline: Add test for REPL auto-indent. 2022-04-22 17:00:16 +10:00
repl_autoindent.py.exp tests/cmdline: Add test for REPL auto-indent. 2022-04-22 17:00:16 +10:00
repl_basic.py
repl_basic.py.exp
repl_cont.py
repl_cont.py.exp
repl_emacs_keys.py
repl_emacs_keys.py.exp
repl_inspect.py
repl_inspect.py.exp
repl_micropyinspect
repl_micropyinspect.py
repl_micropyinspect.py.exp
repl_sys_ps1_ps2.py
repl_sys_ps1_ps2.py.exp
repl_words_move.py
repl_words_move.py.exp