mirror of
https://github.com/micropython/micropython.git
synced 2026-01-07 12:40:15 +01:00
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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user