From d298013939b38fb05961cf05c03ac3aef6a4f00c Mon Sep 17 00:00:00 2001 From: Damien George Date: Tue, 22 May 2018 21:16:30 +1000 Subject: 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 --- py/compile.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'py/compile.c') diff --git a/py/compile.c b/py/compile.c index 6f0be8fa8..3d443c6d8 100644 --- a/py/compile.c +++ b/py/compile.c @@ -66,7 +66,7 @@ typedef enum { #define EMIT(fun) (comp->emit_method_table->fun(comp->emit)) #define EMIT_ARG(fun, ...) (comp->emit_method_table->fun(comp->emit, __VA_ARGS__)) #define EMIT_LOAD_FAST(qst, local_num) (comp->emit_method_table->load_id.local(comp->emit, qst, local_num, MP_EMIT_IDOP_LOCAL_FAST)) -#define EMIT_LOAD_GLOBAL(qst) (comp->emit_method_table->load_id.global(comp->emit, qst)) +#define EMIT_LOAD_GLOBAL(qst) (comp->emit_method_table->load_id.global(comp->emit, qst, MP_EMIT_IDOP_GLOBAL_GLOBAL)) #else @@ -74,7 +74,7 @@ typedef enum { #define EMIT(fun) (mp_emit_bc_##fun(comp->emit)) #define EMIT_ARG(fun, ...) (mp_emit_bc_##fun(comp->emit, __VA_ARGS__)) #define EMIT_LOAD_FAST(qst, local_num) (mp_emit_bc_load_local(comp->emit, qst, local_num, MP_EMIT_IDOP_LOCAL_FAST)) -#define EMIT_LOAD_GLOBAL(qst) (mp_emit_bc_load_global(comp->emit, qst)) +#define EMIT_LOAD_GLOBAL(qst) (mp_emit_bc_load_global(comp->emit, qst, MP_EMIT_IDOP_GLOBAL_GLOBAL)) #endif -- cgit v1.2.3