summaryrefslogtreecommitdiffstatshomepage
path: root/py/emitbc.c
diff options
context:
space:
mode:
Diffstat (limited to 'py/emitbc.c')
-rw-r--r--py/emitbc.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/py/emitbc.c b/py/emitbc.c
index a93c03e7e7..4560d1ec6a 100644
--- a/py/emitbc.c
+++ b/py/emitbc.c
@@ -510,16 +510,25 @@ STATIC void emit_bc_load_deref(emit_t *emit, qstr qst, mp_uint_t local_num) {
STATIC void emit_bc_load_name(emit_t *emit, qstr qst) {
emit_bc_pre(emit, 1);
emit_write_bytecode_byte_qstr(emit, MP_BC_LOAD_NAME, qst);
+ if (MICROPY_OPT_CACHE_MAP_LOOKUP_IN_BYTECODE) {
+ emit_write_bytecode_byte(emit, 0);
+ }
}
STATIC void emit_bc_load_global(emit_t *emit, qstr qst) {
emit_bc_pre(emit, 1);
emit_write_bytecode_byte_qstr(emit, MP_BC_LOAD_GLOBAL, qst);
+ if (MICROPY_OPT_CACHE_MAP_LOOKUP_IN_BYTECODE) {
+ emit_write_bytecode_byte(emit, 0);
+ }
}
STATIC void emit_bc_load_attr(emit_t *emit, qstr qst) {
emit_bc_pre(emit, 0);
emit_write_bytecode_byte_qstr(emit, MP_BC_LOAD_ATTR, qst);
+ if (MICROPY_OPT_CACHE_MAP_LOOKUP_IN_BYTECODE) {
+ emit_write_bytecode_byte(emit, 0);
+ }
}
STATIC void emit_bc_load_method(emit_t *emit, qstr qst) {
@@ -565,6 +574,9 @@ STATIC void emit_bc_store_global(emit_t *emit, qstr qst) {
STATIC void emit_bc_store_attr(emit_t *emit, qstr qst) {
emit_bc_pre(emit, -2);
emit_write_bytecode_byte_qstr(emit, MP_BC_STORE_ATTR, qst);
+ if (MICROPY_OPT_CACHE_MAP_LOOKUP_IN_BYTECODE) {
+ emit_write_bytecode_byte(emit, 0);
+ }
}
STATIC void emit_bc_store_subscr(emit_t *emit) {