From f4df3aaa72a0460614b1ab8b7b8a7927a1165e31 Mon Sep 17 00:00:00 2001 From: Damien George Date: Sat, 9 Jan 2016 23:59:52 +0000 Subject: py: Allow bytecode/native to put iter_buf on stack for simple for loops. So that the "for x in it: ..." statement can now work without using the heap (so long as the iterator argument fits in an iter_buf structure). --- tests/cmdline/cmd_showbc.py.exp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'tests') diff --git a/tests/cmdline/cmd_showbc.py.exp b/tests/cmdline/cmd_showbc.py.exp index 1f0c054cf..8ee47eab6 100644 --- a/tests/cmdline/cmd_showbc.py.exp +++ b/tests/cmdline/cmd_showbc.py.exp @@ -31,7 +31,7 @@ File cmdline/cmd_showbc.py, code block 'f' (descriptor: \.\+, bytecode @\.\+ byt Raw bytecode (code_info_size=\\d\+, bytecode_size=\\d\+): ######## \.\+rg names: -(N_STATE 22) +(N_STATE 23) (N_EXC_STACK 2) (INIT_CELL 14) (INIT_CELL 15) @@ -245,12 +245,16 @@ Raw bytecode (code_info_size=\\d\+, bytecode_size=\\d\+): \\d\+ LOAD_FAST 0 \\d\+ STORE_FAST 0 \\d\+ LOAD_DEREF 14 -\\d\+ GET_ITER +\\d\+ GET_ITER_STACK \\d\+ FOR_ITER \\d\+ \\d\+ STORE_FAST 0 \\d\+ LOAD_FAST 1 \\d\+ POP_TOP \\d\+ JUMP \\d\+ +\\d\+ POP_TOP +\\d\+ POP_TOP +\\d\+ POP_TOP +\\d\+ POP_TOP \\d\+ SETUP_FINALLY \\d\+ \\d\+ SETUP_EXCEPT \\d\+ \\d\+ JUMP \\d\+ -- cgit v1.2.3