@@ -127,10 +127,10 @@ def bug708901():
127
127
128
128
%3d 6 CALL_FUNCTION 2
129
129
8 GET_ITER
130
- >> 10 FOR_ITER 4 (to 16)
130
+ >> 10 FOR_ITER 2 (to 16)
131
131
12 STORE_FAST 0 (res)
132
132
133
- %3d 14 JUMP_ABSOLUTE 10
133
+ %3d 14 JUMP_ABSOLUTE 5 (to 10)
134
134
135
135
%3d >> 16 LOAD_CONST 0 (None)
136
136
18 RETURN_VALUE
@@ -276,11 +276,11 @@ def bug42562():
276
276
10 INPLACE_ADD
277
277
12 STORE_NAME 0 (x)
278
278
279
- 2 14 JUMP_ABSOLUTE 6
279
+ 2 14 JUMP_ABSOLUTE 3 (to 6)
280
280
"""
281
281
282
282
dis_traceback = """\
283
- %3d 0 SETUP_FINALLY 14 (to 16)
283
+ %3d 0 SETUP_FINALLY 7 (to 16)
284
284
285
285
%3d 2 LOAD_CONST 1 (1)
286
286
4 LOAD_CONST 2 (0)
@@ -293,11 +293,11 @@ def bug42562():
293
293
294
294
%3d >> 16 DUP_TOP
295
295
18 LOAD_GLOBAL 0 (Exception)
296
- 20 JUMP_IF_NOT_EXC_MATCH 58
296
+ 20 JUMP_IF_NOT_EXC_MATCH 29 (to 58)
297
297
22 POP_TOP
298
298
24 STORE_FAST 0 (e)
299
299
26 POP_TOP
300
- 28 SETUP_FINALLY 20 (to 50)
300
+ 28 SETUP_FINALLY 10 (to 50)
301
301
302
302
%3d 30 LOAD_FAST 0 (e)
303
303
32 LOAD_ATTR 1 (__traceback__)
@@ -358,7 +358,7 @@ def _tryfinallyconst(b):
358
358
b ()
359
359
360
360
dis_tryfinally = """\
361
- %3d 0 SETUP_FINALLY 12 (to 14)
361
+ %3d 0 SETUP_FINALLY 6 (to 14)
362
362
363
363
%3d 2 LOAD_FAST 0 (a)
364
364
4 POP_BLOCK
@@ -377,7 +377,7 @@ def _tryfinallyconst(b):
377
377
)
378
378
379
379
dis_tryfinallyconst = """\
380
- %3d 0 SETUP_FINALLY 12 (to 14)
380
+ %3d 0 SETUP_FINALLY 6 (to 14)
381
381
382
382
%3d 2 POP_BLOCK
383
383
@@ -450,13 +450,13 @@ def foo(x):
450
450
Disassembly of <code object <listcomp> at 0x..., file "%s", line %d>:
451
451
%3d 0 BUILD_LIST 0
452
452
2 LOAD_FAST 0 (.0)
453
- >> 4 FOR_ITER 12 (to 18)
453
+ >> 4 FOR_ITER 6 (to 18)
454
454
6 STORE_FAST 1 (z)
455
455
8 LOAD_DEREF 0 (x)
456
456
10 LOAD_FAST 1 (z)
457
457
12 BINARY_ADD
458
458
14 LIST_APPEND 2
459
- 16 JUMP_ABSOLUTE 4
459
+ 16 JUMP_ABSOLUTE 2 (to 4)
460
460
>> 18 RETURN_VALUE
461
461
""" % (dis_nested_1 ,
462
462
__file__ ,
@@ -1009,7 +1009,7 @@ def jumpy():
1009
1009
Instruction (opname = 'LOAD_CONST' , opcode = 100 , arg = 1 , argval = 10 , argrepr = '10' , offset = 2 , starts_line = None , is_jump_target = False ),
1010
1010
Instruction (opname = 'CALL_FUNCTION' , opcode = 131 , arg = 1 , argval = 1 , argrepr = '' , offset = 4 , starts_line = None , is_jump_target = False ),
1011
1011
Instruction (opname = 'GET_ITER' , opcode = 68 , arg = None , argval = None , argrepr = '' , offset = 6 , starts_line = None , is_jump_target = False ),
1012
- Instruction (opname = 'FOR_ITER' , opcode = 93 , arg = 34 , argval = 44 , argrepr = 'to 44' , offset = 8 , starts_line = None , is_jump_target = True ),
1012
+ Instruction (opname = 'FOR_ITER' , opcode = 93 , arg = 17 , argval = 44 , argrepr = 'to 44' , offset = 8 , starts_line = None , is_jump_target = True ),
1013
1013
Instruction (opname = 'STORE_FAST' , opcode = 125 , arg = 0 , argval = 'i' , argrepr = 'i' , offset = 10 , starts_line = None , is_jump_target = False ),
1014
1014
Instruction (opname = 'LOAD_GLOBAL' , opcode = 116 , arg = 1 , argval = 'print' , argrepr = 'print' , offset = 12 , starts_line = 4 , is_jump_target = False ),
1015
1015
Instruction (opname = 'LOAD_FAST' , opcode = 124 , arg = 0 , argval = 'i' , argrepr = 'i' , offset = 14 , starts_line = None , is_jump_target = False ),
@@ -1018,21 +1018,21 @@ def jumpy():
1018
1018
Instruction (opname = 'LOAD_FAST' , opcode = 124 , arg = 0 , argval = 'i' , argrepr = 'i' , offset = 20 , starts_line = 5 , is_jump_target = False ),
1019
1019
Instruction (opname = 'LOAD_CONST' , opcode = 100 , arg = 2 , argval = 4 , argrepr = '4' , offset = 22 , starts_line = None , is_jump_target = False ),
1020
1020
Instruction (opname = 'COMPARE_OP' , opcode = 107 , arg = 0 , argval = '<' , argrepr = '<' , offset = 24 , starts_line = None , is_jump_target = False ),
1021
- Instruction (opname = 'POP_JUMP_IF_FALSE' , opcode = 114 , arg = 30 , argval = 30 , argrepr = '' , offset = 26 , starts_line = None , is_jump_target = False ),
1022
- Instruction (opname = 'JUMP_ABSOLUTE' , opcode = 113 , arg = 8 , argval = 8 , argrepr = '' , offset = 28 , starts_line = 6 , is_jump_target = False ),
1021
+ Instruction (opname = 'POP_JUMP_IF_FALSE' , opcode = 114 , arg = 15 , argval = 30 , argrepr = 'to 30 ' , offset = 26 , starts_line = None , is_jump_target = False ),
1022
+ Instruction (opname = 'JUMP_ABSOLUTE' , opcode = 113 , arg = 4 , argval = 8 , argrepr = 'to 8 ' , offset = 28 , starts_line = 6 , is_jump_target = False ),
1023
1023
Instruction (opname = 'LOAD_FAST' , opcode = 124 , arg = 0 , argval = 'i' , argrepr = 'i' , offset = 30 , starts_line = 7 , is_jump_target = True ),
1024
1024
Instruction (opname = 'LOAD_CONST' , opcode = 100 , arg = 3 , argval = 6 , argrepr = '6' , offset = 32 , starts_line = None , is_jump_target = False ),
1025
1025
Instruction (opname = 'COMPARE_OP' , opcode = 107 , arg = 4 , argval = '>' , argrepr = '>' , offset = 34 , starts_line = None , is_jump_target = False ),
1026
- Instruction (opname = 'POP_JUMP_IF_FALSE' , opcode = 114 , arg = 42 , argval = 42 , argrepr = '' , offset = 36 , starts_line = None , is_jump_target = False ),
1026
+ Instruction (opname = 'POP_JUMP_IF_FALSE' , opcode = 114 , arg = 21 , argval = 42 , argrepr = 'to 42 ' , offset = 36 , starts_line = None , is_jump_target = False ),
1027
1027
Instruction (opname = 'POP_TOP' , opcode = 1 , arg = None , argval = None , argrepr = '' , offset = 38 , starts_line = 8 , is_jump_target = False ),
1028
- Instruction (opname = 'JUMP_ABSOLUTE' , opcode = 113 , arg = 52 , argval = 52 , argrepr = '' , offset = 40 , starts_line = None , is_jump_target = False ),
1029
- Instruction (opname = 'JUMP_ABSOLUTE' , opcode = 113 , arg = 8 , argval = 8 , argrepr = '' , offset = 42 , starts_line = 7 , is_jump_target = True ),
1028
+ Instruction (opname = 'JUMP_ABSOLUTE' , opcode = 113 , arg = 26 , argval = 52 , argrepr = 'to 52 ' , offset = 40 , starts_line = None , is_jump_target = False ),
1029
+ Instruction (opname = 'JUMP_ABSOLUTE' , opcode = 113 , arg = 4 , argval = 8 , argrepr = 'to 8 ' , offset = 42 , starts_line = 7 , is_jump_target = True ),
1030
1030
Instruction (opname = 'LOAD_GLOBAL' , opcode = 116 , arg = 1 , argval = 'print' , argrepr = 'print' , offset = 44 , starts_line = 10 , is_jump_target = True ),
1031
1031
Instruction (opname = 'LOAD_CONST' , opcode = 100 , arg = 4 , argval = 'I can haz else clause?' , argrepr = "'I can haz else clause?'" , offset = 46 , starts_line = None , is_jump_target = False ),
1032
1032
Instruction (opname = 'CALL_FUNCTION' , opcode = 131 , arg = 1 , argval = 1 , argrepr = '' , offset = 48 , starts_line = None , is_jump_target = False ),
1033
1033
Instruction (opname = 'POP_TOP' , opcode = 1 , arg = None , argval = None , argrepr = '' , offset = 50 , starts_line = None , is_jump_target = False ),
1034
1034
Instruction (opname = 'LOAD_FAST' , opcode = 124 , arg = 0 , argval = 'i' , argrepr = 'i' , offset = 52 , starts_line = 11 , is_jump_target = True ),
1035
- Instruction (opname = 'POP_JUMP_IF_FALSE' , opcode = 114 , arg = 96 , argval = 96 , argrepr = '' , offset = 54 , starts_line = None , is_jump_target = False ),
1035
+ Instruction (opname = 'POP_JUMP_IF_FALSE' , opcode = 114 , arg = 48 , argval = 96 , argrepr = 'to 96 ' , offset = 54 , starts_line = None , is_jump_target = False ),
1036
1036
Instruction (opname = 'LOAD_GLOBAL' , opcode = 116 , arg = 1 , argval = 'print' , argrepr = 'print' , offset = 56 , starts_line = 12 , is_jump_target = True ),
1037
1037
Instruction (opname = 'LOAD_FAST' , opcode = 124 , arg = 0 , argval = 'i' , argrepr = 'i' , offset = 58 , starts_line = None , is_jump_target = False ),
1038
1038
Instruction (opname = 'CALL_FUNCTION' , opcode = 131 , arg = 1 , argval = 1 , argrepr = '' , offset = 60 , starts_line = None , is_jump_target = False ),
@@ -1044,30 +1044,30 @@ def jumpy():
1044
1044
Instruction (opname = 'LOAD_FAST' , opcode = 124 , arg = 0 , argval = 'i' , argrepr = 'i' , offset = 72 , starts_line = 14 , is_jump_target = False ),
1045
1045
Instruction (opname = 'LOAD_CONST' , opcode = 100 , arg = 3 , argval = 6 , argrepr = '6' , offset = 74 , starts_line = None , is_jump_target = False ),
1046
1046
Instruction (opname = 'COMPARE_OP' , opcode = 107 , arg = 4 , argval = '>' , argrepr = '>' , offset = 76 , starts_line = None , is_jump_target = False ),
1047
- Instruction (opname = 'POP_JUMP_IF_FALSE' , opcode = 114 , arg = 82 , argval = 82 , argrepr = '' , offset = 78 , starts_line = None , is_jump_target = False ),
1048
- Instruction (opname = 'JUMP_ABSOLUTE' , opcode = 113 , arg = 52 , argval = 52 , argrepr = '' , offset = 80 , starts_line = 15 , is_jump_target = False ),
1047
+ Instruction (opname = 'POP_JUMP_IF_FALSE' , opcode = 114 , arg = 41 , argval = 82 , argrepr = 'to 82 ' , offset = 78 , starts_line = None , is_jump_target = False ),
1048
+ Instruction (opname = 'JUMP_ABSOLUTE' , opcode = 113 , arg = 26 , argval = 52 , argrepr = 'to 52 ' , offset = 80 , starts_line = 15 , is_jump_target = False ),
1049
1049
Instruction (opname = 'LOAD_FAST' , opcode = 124 , arg = 0 , argval = 'i' , argrepr = 'i' , offset = 82 , starts_line = 16 , is_jump_target = True ),
1050
1050
Instruction (opname = 'LOAD_CONST' , opcode = 100 , arg = 2 , argval = 4 , argrepr = '4' , offset = 84 , starts_line = None , is_jump_target = False ),
1051
1051
Instruction (opname = 'COMPARE_OP' , opcode = 107 , arg = 0 , argval = '<' , argrepr = '<' , offset = 86 , starts_line = None , is_jump_target = False ),
1052
- Instruction (opname = 'POP_JUMP_IF_FALSE' , opcode = 114 , arg = 92 , argval = 92 , argrepr = '' , offset = 88 , starts_line = None , is_jump_target = False ),
1053
- Instruction (opname = 'JUMP_ABSOLUTE' , opcode = 113 , arg = 104 , argval = 104 , argrepr = '' , offset = 90 , starts_line = 17 , is_jump_target = False ),
1052
+ Instruction (opname = 'POP_JUMP_IF_FALSE' , opcode = 114 , arg = 46 , argval = 92 , argrepr = 'to 92 ' , offset = 88 , starts_line = None , is_jump_target = False ),
1053
+ Instruction (opname = 'JUMP_ABSOLUTE' , opcode = 113 , arg = 52 , argval = 104 , argrepr = 'to 104 ' , offset = 90 , starts_line = 17 , is_jump_target = False ),
1054
1054
Instruction (opname = 'LOAD_FAST' , opcode = 124 , arg = 0 , argval = 'i' , argrepr = 'i' , offset = 92 , starts_line = 11 , is_jump_target = True ),
1055
- Instruction (opname = 'POP_JUMP_IF_TRUE' , opcode = 115 , arg = 56 , argval = 56 , argrepr = '' , offset = 94 , starts_line = None , is_jump_target = False ),
1055
+ Instruction (opname = 'POP_JUMP_IF_TRUE' , opcode = 115 , arg = 28 , argval = 56 , argrepr = 'to 56 ' , offset = 94 , starts_line = None , is_jump_target = False ),
1056
1056
Instruction (opname = 'LOAD_GLOBAL' , opcode = 116 , arg = 1 , argval = 'print' , argrepr = 'print' , offset = 96 , starts_line = 19 , is_jump_target = True ),
1057
1057
Instruction (opname = 'LOAD_CONST' , opcode = 100 , arg = 6 , argval = 'Who let lolcatz into this test suite?' , argrepr = "'Who let lolcatz into this test suite?'" , offset = 98 , starts_line = None , is_jump_target = False ),
1058
1058
Instruction (opname = 'CALL_FUNCTION' , opcode = 131 , arg = 1 , argval = 1 , argrepr = '' , offset = 100 , starts_line = None , is_jump_target = False ),
1059
1059
Instruction (opname = 'POP_TOP' , opcode = 1 , arg = None , argval = None , argrepr = '' , offset = 102 , starts_line = None , is_jump_target = False ),
1060
- Instruction (opname = 'SETUP_FINALLY' , opcode = 122 , arg = 96 , argval = 202 , argrepr = 'to 202' , offset = 104 , starts_line = 20 , is_jump_target = True ),
1061
- Instruction (opname = 'SETUP_FINALLY' , opcode = 122 , arg = 12 , argval = 120 , argrepr = 'to 120' , offset = 106 , starts_line = None , is_jump_target = False ),
1060
+ Instruction (opname = 'SETUP_FINALLY' , opcode = 122 , arg = 48 , argval = 202 , argrepr = 'to 202' , offset = 104 , starts_line = 20 , is_jump_target = True ),
1061
+ Instruction (opname = 'SETUP_FINALLY' , opcode = 122 , arg = 6 , argval = 120 , argrepr = 'to 120' , offset = 106 , starts_line = None , is_jump_target = False ),
1062
1062
Instruction (opname = 'LOAD_CONST' , opcode = 100 , arg = 5 , argval = 1 , argrepr = '1' , offset = 108 , starts_line = 21 , is_jump_target = False ),
1063
1063
Instruction (opname = 'LOAD_CONST' , opcode = 100 , arg = 7 , argval = 0 , argrepr = '0' , offset = 110 , starts_line = None , is_jump_target = False ),
1064
1064
Instruction (opname = 'BINARY_TRUE_DIVIDE' , opcode = 27 , arg = None , argval = None , argrepr = '' , offset = 112 , starts_line = None , is_jump_target = False ),
1065
1065
Instruction (opname = 'POP_TOP' , opcode = 1 , arg = None , argval = None , argrepr = '' , offset = 114 , starts_line = None , is_jump_target = False ),
1066
1066
Instruction (opname = 'POP_BLOCK' , opcode = 87 , arg = None , argval = None , argrepr = '' , offset = 116 , starts_line = None , is_jump_target = False ),
1067
- Instruction (opname = 'JUMP_FORWARD' , opcode = 110 , arg = 24 , argval = 144 , argrepr = 'to 144' , offset = 118 , starts_line = None , is_jump_target = False ),
1067
+ Instruction (opname = 'JUMP_FORWARD' , opcode = 110 , arg = 12 , argval = 144 , argrepr = 'to 144' , offset = 118 , starts_line = None , is_jump_target = False ),
1068
1068
Instruction (opname = 'DUP_TOP' , opcode = 4 , arg = None , argval = None , argrepr = '' , offset = 120 , starts_line = 22 , is_jump_target = True ),
1069
1069
Instruction (opname = 'LOAD_GLOBAL' , opcode = 116 , arg = 2 , argval = 'ZeroDivisionError' , argrepr = 'ZeroDivisionError' , offset = 122 , starts_line = None , is_jump_target = False ),
1070
- Instruction (opname = 'JUMP_IF_NOT_EXC_MATCH' , opcode = 121 , arg = 212 , argval = 212 , argrepr = '' , offset = 124 , starts_line = None , is_jump_target = False ),
1070
+ Instruction (opname = 'JUMP_IF_NOT_EXC_MATCH' , opcode = 121 , arg = 106 , argval = 212 , argrepr = 'to 212 ' , offset = 124 , starts_line = None , is_jump_target = False ),
1071
1071
Instruction (opname = 'POP_TOP' , opcode = 1 , arg = None , argval = None , argrepr = '' , offset = 126 , starts_line = None , is_jump_target = False ),
1072
1072
Instruction (opname = 'POP_TOP' , opcode = 1 , arg = None , argval = None , argrepr = '' , offset = 128 , starts_line = None , is_jump_target = False ),
1073
1073
Instruction (opname = 'POP_TOP' , opcode = 1 , arg = None , argval = None , argrepr = '' , offset = 130 , starts_line = None , is_jump_target = False ),
@@ -1076,9 +1076,9 @@ def jumpy():
1076
1076
Instruction (opname = 'CALL_FUNCTION' , opcode = 131 , arg = 1 , argval = 1 , argrepr = '' , offset = 136 , starts_line = None , is_jump_target = False ),
1077
1077
Instruction (opname = 'POP_TOP' , opcode = 1 , arg = None , argval = None , argrepr = '' , offset = 138 , starts_line = None , is_jump_target = False ),
1078
1078
Instruction (opname = 'POP_EXCEPT' , opcode = 89 , arg = None , argval = None , argrepr = '' , offset = 140 , starts_line = None , is_jump_target = False ),
1079
- Instruction (opname = 'JUMP_FORWARD' , opcode = 110 , arg = 44 , argval = 188 , argrepr = 'to 188' , offset = 142 , starts_line = None , is_jump_target = False ),
1079
+ Instruction (opname = 'JUMP_FORWARD' , opcode = 110 , arg = 22 , argval = 188 , argrepr = 'to 188' , offset = 142 , starts_line = None , is_jump_target = False ),
1080
1080
Instruction (opname = 'LOAD_FAST' , opcode = 124 , arg = 0 , argval = 'i' , argrepr = 'i' , offset = 144 , starts_line = 25 , is_jump_target = True ),
1081
- Instruction (opname = 'SETUP_WITH' , opcode = 143 , arg = 24 , argval = 172 , argrepr = 'to 172' , offset = 146 , starts_line = None , is_jump_target = False ),
1081
+ Instruction (opname = 'SETUP_WITH' , opcode = 143 , arg = 12 , argval = 172 , argrepr = 'to 172' , offset = 146 , starts_line = None , is_jump_target = False ),
1082
1082
Instruction (opname = 'STORE_FAST' , opcode = 125 , arg = 1 , argval = 'dodgy' , argrepr = 'dodgy' , offset = 148 , starts_line = None , is_jump_target = False ),
1083
1083
Instruction (opname = 'LOAD_GLOBAL' , opcode = 116 , arg = 1 , argval = 'print' , argrepr = 'print' , offset = 150 , starts_line = 26 , is_jump_target = False ),
1084
1084
Instruction (opname = 'LOAD_CONST' , opcode = 100 , arg = 9 , argval = 'Never reach this' , argrepr = "'Never reach this'" , offset = 152 , starts_line = None , is_jump_target = False ),
@@ -1090,9 +1090,9 @@ def jumpy():
1090
1090
Instruction (opname = 'DUP_TOP' , opcode = 4 , arg = None , argval = None , argrepr = '' , offset = 164 , starts_line = None , is_jump_target = False ),
1091
1091
Instruction (opname = 'CALL_FUNCTION' , opcode = 131 , arg = 3 , argval = 3 , argrepr = '' , offset = 166 , starts_line = None , is_jump_target = False ),
1092
1092
Instruction (opname = 'POP_TOP' , opcode = 1 , arg = None , argval = None , argrepr = '' , offset = 168 , starts_line = None , is_jump_target = False ),
1093
- Instruction (opname = 'JUMP_FORWARD' , opcode = 110 , arg = 16 , argval = 188 , argrepr = 'to 188' , offset = 170 , starts_line = None , is_jump_target = False ),
1093
+ Instruction (opname = 'JUMP_FORWARD' , opcode = 110 , arg = 8 , argval = 188 , argrepr = 'to 188' , offset = 170 , starts_line = None , is_jump_target = False ),
1094
1094
Instruction (opname = 'WITH_EXCEPT_START' , opcode = 49 , arg = None , argval = None , argrepr = '' , offset = 172 , starts_line = None , is_jump_target = True ),
1095
- Instruction (opname = 'POP_JUMP_IF_TRUE' , opcode = 115 , arg = 178 , argval = 178 , argrepr = '' , offset = 174 , starts_line = None , is_jump_target = False ),
1095
+ Instruction (opname = 'POP_JUMP_IF_TRUE' , opcode = 115 , arg = 89 , argval = 178 , argrepr = 'to 178 ' , offset = 174 , starts_line = None , is_jump_target = False ),
1096
1096
Instruction (opname = 'RERAISE' , opcode = 119 , arg = 1 , argval = 1 , argrepr = '' , offset = 176 , starts_line = None , is_jump_target = False ),
1097
1097
Instruction (opname = 'POP_TOP' , opcode = 1 , arg = None , argval = None , argrepr = '' , offset = 178 , starts_line = None , is_jump_target = True ),
1098
1098
Instruction (opname = 'POP_TOP' , opcode = 1 , arg = None , argval = None , argrepr = '' , offset = 180 , starts_line = None , is_jump_target = False ),
0 commit comments