Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
TASTE
uPython-mirror
Commits
b8f117dd
Commit
b8f117dd
authored
Jun 02, 2014
by
Paul Sokolovsky
Browse files
py: For optimization level -O3 and higher, remove lineno info from bytecode.
parent
d3439d0c
Changes
1
Hide whitespace changes
Inline
Side-by-side
py/emitbc.c
View file @
b8f117dd
...
...
@@ -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
;
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment