File tree 1 file changed +15
-0
lines changed 1 file changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -7672,6 +7672,21 @@ normalize_jumps(struct assembler *a)
7672
7672
last -> i_opcode = is_forward ?
7673
7673
POP_JUMP_FORWARD_IF_TRUE : POP_JUMP_BACKWARD_IF_TRUE ;
7674
7674
break ;
7675
+ case JUMP_IF_TRUE_OR_POP :
7676
+ case JUMP_IF_FALSE_OR_POP :
7677
+ if (!is_forward ) {
7678
+ /* As far as we can tell, the compiler never emits
7679
+ * these jumps with a backwards target. If/when this
7680
+ * exception is raised, we have found a use case for
7681
+ * a backwards version of this jump (or to replace
7682
+ * it with the sequence (COPY 1, POP_JUMP_IF_T/F, POP)
7683
+ */
7684
+ PyErr_Format (PyExc_SystemError ,
7685
+ "unexpected %s jumping backwards" ,
7686
+ last -> i_opcode == JUMP_IF_TRUE_OR_POP ?
7687
+ "JUMP_IF_TRUE_OR_POP" : "JUMP_IF_FALSE_OR_POP" );
7688
+ }
7689
+ break ;
7675
7690
}
7676
7691
}
7677
7692
}
You can’t perform that action at this time.
0 commit comments