-
- Downloads
py: Add MICROPY_DYNAMIC_COMPILER option to config compiler at runtime.
This new compile-time option allows to make the bytecode compiler configurable at runtime by setting the fields in the mp_dynamic_compiler structure. By using this feature, the compiler can generate bytecode that targets any MicroPython runtime/VM, regardless of the host and target compile-time settings. Options so far that fall under this dynamic setting are: - maximum number of bits that a small int can hold; - whether caching of lookups is used in the bytecode; - whether to use unicode strings or not (lexer behaviour differs, and therefore generated string constants differ).
Showing
- py/compile.c 16 additions, 0 deletionspy/compile.c
- py/emitbc.c 4 additions, 4 deletionspy/emitbc.c
- py/emitglue.c 15 additions, 2 deletionspy/emitglue.c
- py/lexer.c 19 additions, 16 deletionspy/lexer.c
- py/mpconfig.h 14 additions, 0 deletionspy/mpconfig.h
- py/mpstate.c 4 additions, 0 deletionspy/mpstate.c
- py/mpstate.h 10 additions, 0 deletionspy/mpstate.h
Loading
Please register or sign in to comment