py: Modify bytecode "with" behaviour so it doesn't use any heap.

Before this patch a "with" block needed to create a bound method object
on the heap for the __exit__ call.  Now it doesn't because we use
load_method instead of load_attr, and save the method+self on the stack.
This commit is contained in:
Damien George
2015-04-24 01:52:28 +01:00
parent ede0f3ab3d
commit 8c1d23a0e2
3 changed files with 50 additions and 33 deletions

View File

@@ -29,7 +29,7 @@ Raw bytecode (code_info_size=\\d\+, bytecode_size=\\d\+):
########
\.\+5b
arg names:
(N_STATE 25)
(N_STATE 22)
(N_EXC_STACK 2)
(INIT_CELL 14)
(INIT_CELL 15)