Skip to content

Commit 5bf4b12

Browse files
committed
Remove some unneeded _PyOpcode_Deopts
1 parent f9f9c3a commit 5bf4b12

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

Objects/frameobject.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -603,7 +603,7 @@ _PyFrame_GetState(PyFrameObject *frame)
603603
if (_PyInterpreterFrame_LASTI(frame->f_frame) < 0) {
604604
return FRAME_CREATED;
605605
}
606-
switch (_PyOpcode_Deopt[_Py_OPCODE(*frame->f_frame->prev_instr)])
606+
switch (_Py_OPCODE(*frame->f_frame->prev_instr))
607607
{
608608
case COPY_FREE_VARS:
609609
case MAKE_CELL:

Objects/genobject.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
#include "pycore_frame.h" // _PyInterpreterFrame
99
#include "pycore_genobject.h" // struct _Py_async_gen_state
1010
#include "pycore_object.h" // _PyObject_GC_UNTRACK()
11-
#include "pycore_opcode.h" // _PyOpcode_Deopt
1211
#include "pycore_pyerrors.h" // _PyErr_ClearExcState()
1312
#include "pycore_pystate.h" // _PyThreadState_GET()
1413
#include "structmember.h" // PyMemberDef
@@ -364,7 +363,7 @@ _PyGen_yf(PyGenObject *gen)
364363
return NULL;
365364
}
366365
_Py_CODEUNIT next = frame->prev_instr[1];
367-
if (_PyOpcode_Deopt[_Py_OPCODE(next)] != RESUME || _Py_OPARG(next) < 2)
366+
if (_Py_OPCODE(next) != RESUME || _Py_OPARG(next) < 2)
368367
{
369368
/* Not in a yield from */
370369
return NULL;

0 commit comments

Comments
 (0)