summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorDamien George <damien.p.george@gmail.com>2015-03-14 12:59:31 +0000
committerDamien George <damien.p.george@gmail.com>2015-03-14 12:59:31 +0000
commita77ffe66b23fe0f367af3dd64ae94b56fbf947d3 (patch)
tree146db84478f21efd8eb11b8ee897d0fe6fd33dc6
parent2c103d5200ec513dc0e5ffb9925a345a5ffaad06 (diff)
downloadmicropython-a77ffe66b23fe0f367af3dd64ae94b56fbf947d3.tar.gz
micropython-a77ffe66b23fe0f367af3dd64ae94b56fbf947d3.zip
py: In compiler, put macro guard around potentially unused asm vars.
-rw-r--r--py/compile.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/py/compile.c b/py/compile.c
index d688bf4022..38f4eb18d3 100644
--- a/py/compile.c
+++ b/py/compile.c
@@ -84,8 +84,10 @@ typedef struct _compiler_t {
emit_t *emit; // current emitter
const emit_method_table_t *emit_method_table; // current emit method table
+ #if MICROPY_EMIT_INLINE_THUMB
emit_inline_asm_t *emit_inline_asm; // current emitter for inline asm
const emit_inline_asm_method_table_t *emit_inline_asm_method_table; // current emit method table for inline asm
+ #endif
} compiler_t;
STATIC void compile_syntax_error(compiler_t *comp, mp_parse_node_t pn, const char *msg) {
@@ -3621,8 +3623,10 @@ mp_obj_t mp_compile(mp_parse_node_t pn, qstr source_file, uint emit_opt, bool is
// compile pass 1
comp->emit = emit_pass1_new();
comp->emit_method_table = &emit_pass1_method_table;
+ #if MICROPY_EMIT_INLINE_THUMB
comp->emit_inline_asm = NULL;
comp->emit_inline_asm_method_table = NULL;
+ #endif
uint max_num_labels = 0;
for (scope_t *s = comp->scope_head; s != NULL && comp->compile_error == MP_OBJ_NULL; s = s->next) {
if (false) {