RustPython
RustPython copied to clipboard
enhance dis output to print line numbers
before:
0 SetupLoop (13)
>> 1 LoadFast (0, a)
2 JumpIfFalse (12)
3 LoadFast (0, a)
4 SetupWith (9)
5 Pop
6 Continue (1)
7 PopBlock
8 EnterFinally
>> 9 WithCleanupStart
10 WithCleanupFinish
11 Jump (1)
>> 12 PopBlock
>> 13 LoadConst (None)
14 ReturnValue
after:
2 0 SetupLoop (13)
>> 1 LoadFast (0, a)
2 JumpIfFalse (12)
3 3 LoadFast (0, a)
4 SetupWith (9)
5 Pop
4 6 Continue (1)
7 PopBlock
8 EnterFinally
>> 9 WithCleanupStart
10 WithCleanupFinish
11 Jump (1)
>> 12 PopBlock
>> 13 LoadConst (None)
14 ReturnValue