summaryrefslogtreecommitdiff
path: root/py/emitbc.c
diff options
context:
space:
mode:
Diffstat (limited to 'py/emitbc.c')
-rw-r--r--py/emitbc.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/py/emitbc.c b/py/emitbc.c
index 3f4dfc178..5e7fa623a 100644
--- a/py/emitbc.c
+++ b/py/emitbc.c
@@ -313,9 +313,12 @@ void mp_emit_bc_start_pass(emit_t *emit, pass_kind_t pass, scope_t *scope) {
emit->scope = scope;
emit->last_source_line_offset = 0;
emit->last_source_line = 1;
+ #ifndef NDEBUG
+ // With debugging enabled labels are checked for unique assignment
if (pass < MP_PASS_EMIT) {
memset(emit->label_offsets, -1, emit->max_num_labels * sizeof(mp_uint_t));
}
+ #endif
emit->bytecode_offset = 0;
emit->code_info_offset = 0;
@@ -495,7 +498,6 @@ void mp_emit_bc_label_assign(emit_t *emit, mp_uint_t l) {
emit->label_offsets[l] = emit->bytecode_offset;
} else {
// ensure label offset has not changed from MP_PASS_CODE_SIZE to MP_PASS_EMIT
- //printf("l%d: (at %d vs %d)\n", l, emit->bytecode_offset, emit->label_offsets[l]);
assert(emit->label_offsets[l] == emit->bytecode_offset);
}
}