Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit ca2a2f1

Browse files
committed
Don't use fast_next_opcode for JUMP_* opcodes. This fixes the problem
reported by Kurt B. Kaiser.
1 parent 98c20be commit ca2a2f1

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

Python/ceval.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2001,18 +2001,18 @@ eval_frame(PyFrameObject *f)
20012001

20022002
case JUMP_FORWARD:
20032003
JUMPBY(oparg);
2004-
goto fast_next_opcode;
2004+
continue;
20052005

20062006
PREDICTED_WITH_ARG(JUMP_IF_FALSE);
20072007
case JUMP_IF_FALSE:
20082008
w = TOP();
20092009
if (w == Py_True) {
20102010
PREDICT(POP_TOP);
2011-
goto fast_next_opcode;
2011+
continue;
20122012
}
20132013
if (w == Py_False) {
20142014
JUMPBY(oparg);
2015-
goto fast_next_opcode;
2015+
continue;
20162016
}
20172017
err = PyObject_IsTrue(w);
20182018
if (err > 0)
@@ -2028,11 +2028,11 @@ eval_frame(PyFrameObject *f)
20282028
w = TOP();
20292029
if (w == Py_False) {
20302030
PREDICT(POP_TOP);
2031-
goto fast_next_opcode;
2031+
continue;
20322032
}
20332033
if (w == Py_True) {
20342034
JUMPBY(oparg);
2035-
goto fast_next_opcode;
2035+
continue;
20362036
}
20372037
err = PyObject_IsTrue(w);
20382038
if (err > 0) {
@@ -2047,7 +2047,7 @@ eval_frame(PyFrameObject *f)
20472047

20482048
case JUMP_ABSOLUTE:
20492049
JUMPTO(oparg);
2050-
goto fast_next_opcode;
2050+
continue;
20512051

20522052
case GET_ITER:
20532053
/* before: [obj]; after [getiter(obj)] */

0 commit comments

Comments
 (0)