py/makeqstrdata.py: Ensure that scope names get low qstr values.

Originally implemented in a patch file provided by @ironss-iotec.

Fixes issue #14093.

Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
This commit is contained in:
Jim Mussared
2024-03-26 15:23:21 +11:00
committed by Damien George
parent 57de9da352
commit d694ac6e1b
4 changed files with 19 additions and 6 deletions

View File

@@ -31,6 +31,8 @@
#if MICROPY_ENABLE_COMPILER
// These low numbered qstrs should fit in 8 bits. See assertions below.
// The (unescaped) names appear in `unsorted_str_list` in the QSTR
// generator script py/makeqstrdata.py to ensure they are assigned low numbers.
static const uint8_t scope_simple_name_table[] = {
[SCOPE_MODULE] = MP_QSTR__lt_module_gt_,
[SCOPE_LAMBDA] = MP_QSTR__lt_lambda_gt_,