aboutsummaryrefslogtreecommitdiff
path: root/py/qstr.h
diff options
context:
space:
mode:
authorDamien George <damien.p.george@gmail.com>2017-11-01 13:16:16 +1100
committerDamien George <damien.p.george@gmail.com>2017-11-01 13:16:16 +1100
commit487dbdb26748b86cf247600af187437310311145 (patch)
tree4b01d33357ced617a5e4af54845174d9e16ef42b /py/qstr.h
parentfe45d78b1edd6d2202c3544797885cb0b12d4f03 (diff)
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.
Diffstat (limited to 'py/qstr.h')
-rw-r--r--py/qstr.h3
1 files changed, 0 insertions, 3 deletions
diff --git a/py/qstr.h b/py/qstr.h
index e2bdcc351..63fd0c369 100644
--- a/py/qstr.h
+++ b/py/qstr.h
@@ -65,9 +65,6 @@ qstr qstr_find_strn(const char *str, size_t str_len); // returns MP_QSTR_NULL if
qstr qstr_from_str(const char *str);
qstr qstr_from_strn(const char *str, size_t len);
-byte *qstr_build_start(size_t len, byte **q_ptr);
-qstr qstr_build_end(byte *q_ptr);
-
mp_uint_t qstr_hash(qstr q);
const char *qstr_str(qstr q);
size_t qstr_len(qstr q);