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
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user