diff options
| author | bvernoux <bvernoux@gmail.com> | 2014-06-03 19:26:34 +0200 |
|---|---|---|
| committer | bvernoux <bvernoux@gmail.com> | 2014-06-03 19:26:34 +0200 |
| commit | 82560fce75ab0307182c943d564202e55fca6c09 (patch) | |
| tree | d20162c8647ddb2451fdb76024761821b43149e8 /py/emitbc.c | |
| parent | 0a1dbfe02f4a693c202b97aafcf0b5d0ba050812 (diff) | |
| parent | b294a7e3c9b84aad6c331128a51e0d69e7845141 (diff) | |
Merge branch 'master' of https://github.com/micropython/micropython
Diffstat (limited to 'py/emitbc.c')
| -rw-r--r-- | py/emitbc.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/py/emitbc.c b/py/emitbc.c index cfaea7c88..841dd4aab 100644 --- a/py/emitbc.c +++ b/py/emitbc.c @@ -352,6 +352,10 @@ STATIC void emit_bc_adjust_stack_size(emit_t *emit, int delta) { 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->bytecode_offset); #if MICROPY_ENABLE_SOURCE_LINE + if (mp_optimise_value >= 3) { + // If we compile with -O3, don't store line numbers. + return; + } if (source_line > emit->last_source_line) { uint bytes_to_skip = emit->bytecode_offset - emit->last_source_line_offset; uint lines_to_skip = source_line - emit->last_source_line; |
