Skip to content
Snippets Groups Projects
Commit 487dbdb2 authored by Damien George's avatar Damien George
Browse files

py/compile: Use alloca instead of qstr_build when compiling import name.

The technique of using alloca is how dotted import names are composed in
mp_import_from and mp_builtin___import__, so use the same technique in the
compiler.  This puts less pressure on the heap (only the stack is used if
the qstr already exists, and if it doesn't exist then the standard qstr
block memory is used for the new qstr rather than a separate chunk of the
heap) and reduces overall code size.
parent fe45d78b
Branches
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment