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
f3822fc3
Commit
f3822fc3
authored
Nov 09, 2013
by
Damien
Browse files
Fix but with optimised range being 1 over.
parent
6d42ab66
Changes
1
Hide whitespace changes
Inline
Side-by-side
py/compile.c
View file @
f3822fc3
...
...
@@ -1378,15 +1378,15 @@ void compile_for_stmt_optimised_range(compiler_t *comp, py_parse_node_t pn_var,
EMIT
(
jump
,
continue_label
);
EMIT
(
label_assign
,
top_label
);
// compile body
compile_node
(
comp
,
pn_body
);
// compile: var += step
c_assign
(
comp
,
pn_var
,
ASSIGN_AUG_LOAD
);
compile_node
(
comp
,
pn_step
);
EMIT
(
binary_op
,
RT_BINARY_OP_INPLACE_ADD
);
c_assign
(
comp
,
pn_var
,
ASSIGN_AUG_STORE
);
// compile body
compile_node
(
comp
,
pn_body
);
EMIT
(
label_assign
,
continue_label
);
// compile: if var < end: goto top
...
...
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