[Python-checkins] python/dist/src/Python ceval.c,2.353,2.354
rhettinger@users.sourceforge.net
rhettinger@users.sourceforge.net
Thu, 13 Mar 2003 17:37:44 -0800
Update of /cvsroot/python/python/dist/src/Python
In directory sc8-pr-cvs1:/tmp/cvs-serv32028
Modified Files:
ceval.c
Log Message:
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.
Index: ceval.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Python/ceval.c,v
retrieving revision 2.353
retrieving revision 2.354
diff -C2 -d -r2.353 -r2.354
*** ceval.c 1 Mar 2003 03:36:33 -0000 2.353
--- ceval.c 14 Mar 2003 01:37:42 -0000 2.354
***************
*** 884,888 ****
SET_TOP(w);
SET_SECOND(v);
! continue;
case ROT_THREE:
--- 884,888 ----
SET_TOP(w);
SET_SECOND(v);
! goto fast_next_opcode;
case ROT_THREE:
***************
*** 893,897 ****
SET_SECOND(x);
SET_THIRD(v);
! continue;
case ROT_FOUR:
--- 893,897 ----
SET_SECOND(x);
SET_THIRD(v);
! goto fast_next_opcode;
case ROT_FOUR:
***************
*** 904,908 ****
SET_THIRD(x);
SET_FOURTH(u);
! continue;
case DUP_TOP:
--- 904,908 ----
SET_THIRD(x);
SET_FOURTH(u);
! goto fast_next_opcode;
case DUP_TOP:
***************
*** 910,914 ****
Py_INCREF(v);
PUSH(v);
! continue;
case DUP_TOPX:
--- 910,914 ----
Py_INCREF(v);
PUSH(v);
! goto fast_next_opcode;
case DUP_TOPX:
***************
*** 1595,1599 ****
v = POP();
if (PyInt_Check(v)) {
! why = (enum why_code) PyInt_AsLong(v);
if (why == WHY_RETURN ||
why == WHY_YIELD ||
--- 1595,1599 ----
v = POP();
if (PyInt_Check(v)) {
! why = (enum why_code) PyInt_AS_LONG(v);
if (why == WHY_RETURN ||
why == WHY_YIELD ||
***************
*** 1973,1985 ****
case JUMP_FORWARD:
JUMPBY(oparg);
! continue;
case JUMP_IF_FALSE:
w = TOP();
if (w == Py_True)
! continue;
if (w == Py_False) {
JUMPBY(oparg);
! continue;
}
err = PyObject_IsTrue(w);
--- 1973,1985 ----
case JUMP_FORWARD:
JUMPBY(oparg);
! goto fast_next_opcode;
case JUMP_IF_FALSE:
w = TOP();
if (w == Py_True)
! goto fast_next_opcode;
if (w == Py_False) {
JUMPBY(oparg);
! goto fast_next_opcode;
}
err = PyObject_IsTrue(w);
***************
*** 1995,2002 ****
w = TOP();
if (w == Py_False)
! continue;
if (w == Py_True) {
JUMPBY(oparg);
! continue;
}
err = PyObject_IsTrue(w);
--- 1995,2002 ----
w = TOP();
if (w == Py_False)
! goto fast_next_opcode;
if (w == Py_True) {
JUMPBY(oparg);
! goto fast_next_opcode;
}
err = PyObject_IsTrue(w);
***************
*** 2013,2017 ****
case JUMP_ABSOLUTE:
JUMPTO(oparg);
! continue;
case GET_ITER:
--- 2013,2017 ----
case JUMP_ABSOLUTE:
JUMPTO(oparg);
! goto fast_next_opcode;
case GET_ITER: