Python: CG trace: Don't abuse example dir

This commit is contained in:
Rasmus Wriedt Larsen
2020-07-22 14:22:04 +02:00
parent ad2e336ead
commit 1e89388f2b
16 changed files with 37 additions and 27 deletions

View File

@@ -0,0 +1,25 @@
def func(func_arg):
print("func")
def func2():
print("func2")
return func_arg()
func2()
def nop():
print("nop")
pass
func(nop)
"""
Needs handling of LOAD_DEREF. Disassembled bytecode looks like:
6 8 LOAD_DEREF 0 (func_arg)
10 CALL_FUNCTION 0
12 RETURN_VALUE
"""