diff --git a/py/compile.c b/py/compile.c index a3e8c49d1e..f9d53bc689 100644 --- a/py/compile.c +++ b/py/compile.c @@ -58,8 +58,6 @@ typedef enum { #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.fast(comp->emit, qst, local_num)) #define EMIT_LOAD_GLOBAL(qst) (comp->emit_method_table->load_id.global(comp->emit, qst)) -#define EMIT_INLINE_ASM(fun) (comp->emit_inline_asm_method_table->fun(comp->emit_inline_asm)) -#define EMIT_INLINE_ASM_ARG(fun, ...) (comp->emit_inline_asm_method_table->fun(comp->emit_inline_asm, __VA_ARGS__)) #else @@ -71,6 +69,9 @@ typedef enum { #endif +#define EMIT_INLINE_ASM(fun) (comp->emit_inline_asm_method_table->fun(comp->emit_inline_asm)) +#define EMIT_INLINE_ASM_ARG(fun, ...) (comp->emit_inline_asm_method_table->fun(comp->emit_inline_asm, __VA_ARGS__)) + // elements in this struct are ordered to make it compact typedef struct _compiler_t { qstr source_file; @@ -3386,7 +3387,6 @@ mp_obj_t mp_compile(mp_parse_tree_t *parse_tree, qstr source_file, uint emit_opt emit_inline_thumb = emit_inline_thumb_new(max_num_labels); } comp->emit = NULL; - comp->emit_method_table = NULL; comp->emit_inline_asm = emit_inline_thumb; comp->emit_inline_asm_method_table = &emit_inline_thumb_method_table; compile_scope_inline_asm(comp, s, MP_PASS_CODE_SIZE);