Fix but with optimised range being 1 over.
This commit is contained in:
parent
6d42ab6625
commit
f3822fc34c
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user