RustPython icon indicating copy to clipboard operation
RustPython copied to clipboard

enhance dis output to print line numbers

Open youknowone opened this issue 3 years ago • 0 comments

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

youknowone avatar Aug 10 '22 16:08 youknowone