diff options
author | Damien George <damien.p.george@gmail.com> | 2014-01-29 21:51:51 +0000 |
---|---|---|
committer | Damien George <damien.p.george@gmail.com> | 2014-01-29 21:51:51 +0000 |
commit | 62ad189a65e5e3b4cb6c64c9ea2d493f2c06fffd (patch) | |
tree | 61426072aec2867df6492570e0522b471a3764c1 /py/emitbc.c | |
parent | 2d15c1216ddad8ee603106fd86ad36baf2d40ff8 (diff) | |
download | micropython-62ad189a65e5e3b4cb6c64c9ea2d493f2c06fffd.tar.gz micropython-62ad189a65e5e3b4cb6c64c9ea2d493f2c06fffd.zip |
py: Add compile option to enable/disable source line numbers.
Diffstat (limited to 'py/emitbc.c')
-rw-r--r-- | py/emitbc.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/py/emitbc.c b/py/emitbc.c index 6d9523fe56..d74b065253 100644 --- a/py/emitbc.c +++ b/py/emitbc.c @@ -249,6 +249,7 @@ static void emit_bc_set_stack_size(emit_t *emit, int size) { static void emit_bc_set_source_line(emit_t *emit, int source_line) { //printf("source: line %d -> %d offset %d -> %d\n", emit->last_source_line, source_line, emit->last_source_line_offset, emit->byte_code_offset); +#if MICROPY_ENABLE_SOURCE_LINE if (source_line > emit->last_source_line) { uint bytes_to_skip = emit->byte_code_offset - emit->last_source_line_offset; uint lines_to_skip = source_line - emit->last_source_line; @@ -257,6 +258,7 @@ static void emit_bc_set_source_line(emit_t *emit, int source_line) { emit->last_source_line_offset = emit->byte_code_offset; emit->last_source_line = source_line; } +#endif } static void emit_bc_load_id(emit_t *emit, qstr qstr) { |