dis_asyncwith = """\
%4d RETURN_GENERATOR
-
-None POP_TOP
-
-%4d RESUME 0
+ POP_TOP
+ RESUME 0
%4d LOAD_FAST 0 (c)
BEFORE_ASYNC_WITH
ExceptionTable:
12 rows
""" % (_asyncwith.__code__.co_firstlineno,
- _asyncwith.__code__.co_firstlineno,
_asyncwith.__code__.co_firstlineno + 1,
_asyncwith.__code__.co_firstlineno + 2,
_asyncwith.__code__.co_firstlineno + 1,
None COPY_FREE_VARS 1
%4d RETURN_GENERATOR
-
-None POP_TOP
-
-%4d RESUME 0
+ POP_TOP
+ RESUME 0
LOAD_FAST 0 (.0)
>> FOR_ITER 10 (to 34)
STORE_FAST 1 (z)
__file__,
_h.__code__.co_firstlineno + 3,
_h.__code__.co_firstlineno + 3,
- _h.__code__.co_firstlineno + 3,
)
def load_test(x, y=0):
* of 0. This is because RETURN_GENERATOR pushes an element
* with _PyFrame_StackPush before switching stacks.
*/
+
+ location loc = LOCATION(umd->u_firstlineno, umd->u_firstlineno, -1, -1);
cfg_instr make_gen = {
.i_opcode = RETURN_GENERATOR,
.i_oparg = 0,
- .i_loc = LOCATION(umd->u_firstlineno, umd->u_firstlineno, -1, -1),
+ .i_loc = loc,
.i_target = NULL,
};
RETURN_IF_ERROR(basicblock_insert_instruction(entryblock, 0, &make_gen));
cfg_instr pop_top = {
.i_opcode = POP_TOP,
.i_oparg = 0,
- .i_loc = NO_LOCATION,
+ .i_loc = loc,
.i_target = NULL,
};
RETURN_IF_ERROR(basicblock_insert_instruction(entryblock, 1, &pop_top));