frozen_mpy.c - why isn't it run through QSTR extraction?

C programming, build, interpreter/VM.
Target audience: MicroPython Developers.
Post Reply
jickster
Posts: 629
Joined: Thu Sep 07, 2017 8:57 pm

frozen_mpy.c - why isn't it run through QSTR extraction?

Post by jickster » Mon Jan 29, 2018 7:35 pm

I noticed that when freezing to .mpy - using FROZEN_MPY_DIR - the generated "frozen_mpy.c" is NOT run through the pre-processing step that compiles the list of all the MP_QSTR.

Looking at "frozen_mpy.c", I see that the MP_QSTRs that were added by the frozen_mpy c-files are actually there in the enum (effectively appended to the "qstr pre-processed c-files"

Code: Select all

enum {
    MP_QSTR_frozen_py_slash_main_dot_py = MP_QSTRnumber_of,
    MP_QSTR_led,
    MP_QSTR_main_dot_py,
    MP_QSTR_main1_dot_py,
    MP_QSTR_main2_dot_py,
};
So my question: why was it done this way instead of running frozen_mpy.c through the pre-processing like the other .c files?

Post Reply