aboutsummaryrefslogtreecommitdiff
path: root/py/emitcommon.c
diff options
context:
space:
mode:
authorDamien George <damien.p.george@gmail.com>2018-05-19 00:11:04 +1000
committerDamien George <damien.p.george@gmail.com>2018-05-23 00:22:20 +1000
commit0a25fff9562e3051d85db9ca773f203620004742 (patch)
tree3b36f17d20598afc44bf24bf26afb7de7fc23df3 /py/emitcommon.c
parent400273a799581e5eb86538d8c88fb872705475ab (diff)
py/emit: Combine fast and deref into one function for load/store/delete.
Reduces code size by: bare-arm: -16 minimal x86: -208 unix x64: -408 unix nanbox: -248 stm32: -12 cc3200: -24 esp8266: -96 esp32: -44
Diffstat (limited to 'py/emitcommon.c')
-rw-r--r--py/emitcommon.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/py/emitcommon.c b/py/emitcommon.c
index 07b1dbb4c..47fd41ef2 100644
--- a/py/emitcommon.c
+++ b/py/emitcommon.c
@@ -67,10 +67,10 @@ void mp_emit_common_id_op(emit_t *emit, const mp_emit_method_table_id_ops_t *emi
} else if (id->kind == ID_INFO_KIND_GLOBAL_EXPLICIT) {
emit_method_table->global(emit, qst);
} else if (id->kind == ID_INFO_KIND_LOCAL) {
- emit_method_table->fast(emit, qst, id->local_num);
+ emit_method_table->local(emit, qst, id->local_num, MP_EMIT_IDOP_LOCAL_FAST);
} else {
assert(id->kind == ID_INFO_KIND_CELL || id->kind == ID_INFO_KIND_FREE);
- emit_method_table->deref(emit, qst, id->local_num);
+ emit_method_table->local(emit, qst, id->local_num, MP_EMIT_IDOP_LOCAL_DEREF);
}
}