diff options
author | Armin Rigo <arigo@tunes.org> | 2004-03-20 21:50:13 (GMT) |
---|---|---|
committer | Armin Rigo <arigo@tunes.org> | 2004-03-20 21:50:13 (GMT) |
commit | 9dbf9084e89eccc89db903e70560074466be2c4c (patch) | |
tree | 34c1ec05f7cb77571984b1df3b1052d191c29df2 /Python/ceval.c | |
parent | 508c57d5449413e1df5b7edae741f3b5cef1496b (diff) | |
download | cpython-9dbf9084e89eccc89db903e70560074466be2c4c.zip cpython-9dbf9084e89eccc89db903e70560074466be2c4c.tar.gz cpython-9dbf9084e89eccc89db903e70560074466be2c4c.tar.bz2 |
Cancelled checkin, sorry.
Diffstat (limited to 'Python/ceval.c')
-rw-r--r-- | Python/ceval.c | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/Python/ceval.c b/Python/ceval.c index 51df60a..d3a0053 100644 --- a/Python/ceval.c +++ b/Python/ceval.c @@ -627,8 +627,7 @@ eval_frame(PyFrameObject *f) #define INSTR_OFFSET() (next_instr - first_instr) #define NEXTOP() (*next_instr++) -#define OPARG() (next_instr[0] + (next_instr[1]<<8)) -#define OPARG_SIZE 2 +#define NEXTARG() (next_instr += 2, (next_instr[-1]<<8) + next_instr[-2]) #define JUMPTO(x) (next_instr = first_instr + (x)) #define JUMPBY(x) (next_instr += (x)) @@ -659,7 +658,8 @@ eval_frame(PyFrameObject *f) #endif #define PREDICTED(op) PRED_##op: next_instr++ -#define PREDICTED_WITH_ARG(op) PRED_##op: next_instr++; oparg = OPARG(); next_instr += OPARG_SIZE +#define PREDICTED_WITH_ARG(op) PRED_##op: oparg = (next_instr[2]<<8) + \ + next_instr[1]; next_instr += 3 /* Stack manipulation macros */ @@ -862,11 +862,8 @@ eval_frame(PyFrameObject *f) /* Extract opcode and argument */ opcode = NEXTOP(); - if (HAS_ARG(opcode)) { - oparg = OPARG(); - next_instr += OPARG_SIZE; - } - + if (HAS_ARG(opcode)) + oparg = NEXTARG(); dispatch_opcode: #ifdef DYNAMIC_EXECUTION_PROFILE #ifdef DXPAIRS @@ -2252,8 +2249,7 @@ eval_frame(PyFrameObject *f) case EXTENDED_ARG: opcode = NEXTOP(); - oparg = oparg<<16 | OPARG(); - next_instr += OPARG_SIZE; + oparg = oparg<<16 | NEXTARG(); goto dispatch_opcode; default: |