File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -627,8 +627,7 @@ eval_frame(PyFrameObject *f)
627627
628628#define INSTR_OFFSET () (next_instr - first_instr)
629629#define NEXTOP () (*next_instr++)
630- #define OPARG () (next_instr[0] + (next_instr[1]<<8))
631- #define OPARG_SIZE 2
630+ #define NEXTARG () (next_instr += 2, (next_instr[-1]<<8) + next_instr[-2])
632631#define JUMPTO (x ) (next_instr = first_instr + (x))
633632#define JUMPBY (x ) (next_instr += (x))
634633
@@ -659,7 +658,8 @@ eval_frame(PyFrameObject *f)
659658#endif
660659
661660#define PREDICTED (op ) PRED_##op: next_instr++
662- #define PREDICTED_WITH_ARG (op ) PRED_##op: next_instr++; oparg = OPARG(); next_instr += OPARG_SIZE
661+ #define PREDICTED_WITH_ARG (op ) PRED_##op: oparg = (next_instr[2]<<8) + \
662+ next_instr[1]; next_instr += 3
663663
664664/* Stack manipulation macros */
665665
@@ -862,11 +862,8 @@ eval_frame(PyFrameObject *f)
862862 /* Extract opcode and argument */
863863
864864 opcode = NEXTOP ();
865- if (HAS_ARG (opcode )) {
866- oparg = OPARG ();
867- next_instr += OPARG_SIZE ;
868- }
869-
865+ if (HAS_ARG (opcode ))
866+ oparg = NEXTARG ();
870867 dispatch_opcode :
871868#ifdef DYNAMIC_EXECUTION_PROFILE
872869#ifdef DXPAIRS
@@ -2252,8 +2249,7 @@ eval_frame(PyFrameObject *f)
22522249
22532250 case EXTENDED_ARG :
22542251 opcode = NEXTOP ();
2255- oparg = oparg <<16 | OPARG ();
2256- next_instr += OPARG_SIZE ;
2252+ oparg = oparg <<16 | NEXTARG ();
22572253 goto dispatch_opcode ;
22582254
22592255 default :
You can’t perform that action at this time.
0 commit comments