summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRaymond Hettinger <python@rcn.com>2003-03-14 01:37:42 (GMT)
committerRaymond Hettinger <python@rcn.com>2003-03-14 01:37:42 (GMT)
commit080cb3268f770d2589ee350ace7f589927e8db98 (patch)
treecdd4c720a71c13b8c3c15e4c96d53450de74779c
parent43ed43bfc1380d36dd87f405080b5b3fae55532a (diff)
downloadcpython-080cb3268f770d2589ee350ace7f589927e8db98.zip
cpython-080cb3268f770d2589ee350ace7f589927e8db98.tar.gz
cpython-080cb3268f770d2589ee350ace7f589927e8db98.tar.bz2
SF patch #701907: More use of fast_next_opcode
My previous patches should have used fast_next_opcode in a few places instead of continue. Also, applied one PyInt_AS_LONG macro in a place where the type had already been checked.
-rw-r--r--Python/ceval.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/Python/ceval.c b/Python/ceval.c
index 73743de..324008d 100644
--- a/Python/ceval.c
+++ b/Python/ceval.c
@@ -883,7 +883,7 @@ eval_frame(PyFrameObject *f)
w = SECOND();
SET_TOP(w);
SET_SECOND(v);
- continue;
+ goto fast_next_opcode;
case ROT_THREE:
v = TOP();
@@ -892,7 +892,7 @@ eval_frame(PyFrameObject *f)
SET_TOP(w);
SET_SECOND(x);
SET_THIRD(v);
- continue;
+ goto fast_next_opcode;
case ROT_FOUR:
u = TOP();
@@ -903,13 +903,13 @@ eval_frame(PyFrameObject *f)
SET_SECOND(w);
SET_THIRD(x);
SET_FOURTH(u);
- continue;
+ goto fast_next_opcode;
case DUP_TOP:
v = TOP();
Py_INCREF(v);
PUSH(v);
- continue;
+ goto fast_next_opcode;
case DUP_TOPX:
if (oparg == 2) {
@@ -1594,7 +1594,7 @@ eval_frame(PyFrameObject *f)
case END_FINALLY:
v = POP();
if (PyInt_Check(v)) {
- why = (enum why_code) PyInt_AsLong(v);
+ why = (enum why_code) PyInt_AS_LONG(v);
if (why == WHY_RETURN ||
why == WHY_YIELD ||
why == WHY_CONTINUE)
@@ -1972,15 +1972,15 @@ eval_frame(PyFrameObject *f)
case JUMP_FORWARD:
JUMPBY(oparg);
- continue;
+ goto fast_next_opcode;
case JUMP_IF_FALSE:
w = TOP();
if (w == Py_True)
- continue;
+ goto fast_next_opcode;
if (w == Py_False) {
JUMPBY(oparg);
- continue;
+ goto fast_next_opcode;
}
err = PyObject_IsTrue(w);
if (err > 0)
@@ -1994,10 +1994,10 @@ eval_frame(PyFrameObject *f)
case JUMP_IF_TRUE:
w = TOP();
if (w == Py_False)
- continue;
+ goto fast_next_opcode;
if (w == Py_True) {
JUMPBY(oparg);
- continue;
+ goto fast_next_opcode;
}
err = PyObject_IsTrue(w);
if (err > 0) {
@@ -2012,7 +2012,7 @@ eval_frame(PyFrameObject *f)
case JUMP_ABSOLUTE:
JUMPTO(oparg);
- continue;
+ goto fast_next_opcode;
case GET_ITER:
/* before: [obj]; after [getiter(obj)] */