mirror of
https://github.com/python/cpython.git
synced 2025-07-24 11:44:31 +00:00
Use fast_next_opcode shortcut for forward jump opcodes (it's safe and
gives a small speedup).
This commit is contained in:
parent
5ddef75fcf
commit
c4b570f218
1 changed files with 5 additions and 5 deletions
|
@ -2001,18 +2001,18 @@ eval_frame(PyFrameObject *f)
|
|||
|
||||
case JUMP_FORWARD:
|
||||
JUMPBY(oparg);
|
||||
continue;
|
||||
goto fast_next_opcode;
|
||||
|
||||
PREDICTED_WITH_ARG(JUMP_IF_FALSE);
|
||||
case JUMP_IF_FALSE:
|
||||
w = TOP();
|
||||
if (w == Py_True) {
|
||||
PREDICT(POP_TOP);
|
||||
continue;
|
||||
goto fast_next_opcode;
|
||||
}
|
||||
if (w == Py_False) {
|
||||
JUMPBY(oparg);
|
||||
continue;
|
||||
goto fast_next_opcode;
|
||||
}
|
||||
err = PyObject_IsTrue(w);
|
||||
if (err > 0)
|
||||
|
@ -2028,11 +2028,11 @@ eval_frame(PyFrameObject *f)
|
|||
w = TOP();
|
||||
if (w == Py_False) {
|
||||
PREDICT(POP_TOP);
|
||||
continue;
|
||||
goto fast_next_opcode;
|
||||
}
|
||||
if (w == Py_True) {
|
||||
JUMPBY(oparg);
|
||||
continue;
|
||||
goto fast_next_opcode;
|
||||
}
|
||||
err = PyObject_IsTrue(w);
|
||||
if (err > 0) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue