diff options
author | Damien George <damien.p.george@gmail.com> | 2018-05-22 21:16:30 +1000 |
---|---|---|
committer | Damien George <damien.p.george@gmail.com> | 2018-05-23 00:22:47 +1000 |
commit | d298013939b38fb05961cf05c03ac3aef6a4f00c (patch) | |
tree | b57995f38fb62ea8cb76e65640490ee61195261f /py/emitcommon.c | |
parent | 26b5754092134b53e03eed8c5e6c580d28a2a829 (diff) |
py/emit: Combine name and global into one func for load/store/delete.
Reduces code size by:
bare-arm: -56
minimal x86: -300
unix x64: -576
unix nanbox: -300
stm32: -164
cc3200: -56
esp8266: -236
esp32: -76
Diffstat (limited to 'py/emitcommon.c')
-rw-r--r-- | py/emitcommon.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/py/emitcommon.c b/py/emitcommon.c index 47fd41ef2..89cc2c959 100644 --- a/py/emitcommon.c +++ b/py/emitcommon.c @@ -63,9 +63,9 @@ void mp_emit_common_id_op(emit_t *emit, const mp_emit_method_table_id_ops_t *emi // call the emit backend with the correct code if (id->kind == ID_INFO_KIND_GLOBAL_IMPLICIT) { - emit_method_table->name(emit, qst); + emit_method_table->global(emit, qst, MP_EMIT_IDOP_GLOBAL_NAME); } else if (id->kind == ID_INFO_KIND_GLOBAL_EXPLICIT) { - emit_method_table->global(emit, qst); + emit_method_table->global(emit, qst, MP_EMIT_IDOP_GLOBAL_GLOBAL); } else if (id->kind == ID_INFO_KIND_LOCAL) { emit_method_table->local(emit, qst, id->local_num, MP_EMIT_IDOP_LOCAL_FAST); } else { |