[Python-checkins] python/dist/src/Python ceval.c,2.321,2.322
montanaro@users.sourceforge.net
montanaro@users.sourceforge.net
Tue, 06 Aug 2002 10:47:43 -0700
Update of /cvsroot/python/python/dist/src/Python
In directory usw-pr-cvs1:/tmp/cvs-serv14993
Modified Files:
ceval.c
Log Message:
get rid of GETNAMEV macro - use GETITEM directly
same idea as getting rid of GETCONST & GETNAME (see patch #506436)
Index: ceval.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Python/ceval.c,v
retrieving revision 2.321
retrieving revision 2.322
diff -C2 -d -r2.321 -r2.322
*** ceval.c 4 Aug 2002 21:03:35 -0000 2.321
--- ceval.c 6 Aug 2002 17:47:40 -0000 2.322
***************
*** 515,519 ****
/* Code access macros */
- #define GETNAMEV(i) (GETITEM(names, (i)))
#define INSTR_OFFSET() (next_instr - first_instr)
#define NEXTOP() (*next_instr++)
--- 515,518 ----
***************
*** 1564,1568 ****
case STORE_NAME:
! w = GETNAMEV(oparg);
v = POP();
if ((x = f->f_locals) == NULL) {
--- 1563,1567 ----
case STORE_NAME:
! w = GETITEM(names, oparg);
v = POP();
if ((x = f->f_locals) == NULL) {
***************
*** 1577,1581 ****
case DELETE_NAME:
! w = GETNAMEV(oparg);
if ((x = f->f_locals) == NULL) {
PyErr_Format(PyExc_SystemError,
--- 1576,1580 ----
case DELETE_NAME:
! w = GETITEM(names, oparg);
if ((x = f->f_locals) == NULL) {
PyErr_Format(PyExc_SystemError,
***************
*** 1632,1636 ****
case STORE_ATTR:
! w = GETNAMEV(oparg);
v = POP();
u = POP();
--- 1631,1635 ----
case STORE_ATTR:
! w = GETITEM(names, oparg);
v = POP();
u = POP();
***************
*** 1641,1645 ****
case DELETE_ATTR:
! w = GETNAMEV(oparg);
v = POP();
err = PyObject_SetAttr(v, w, (PyObject *)NULL);
--- 1640,1644 ----
case DELETE_ATTR:
! w = GETITEM(names, oparg);
v = POP();
err = PyObject_SetAttr(v, w, (PyObject *)NULL);
***************
*** 1649,1653 ****
case STORE_GLOBAL:
! w = GETNAMEV(oparg);
v = POP();
err = PyDict_SetItem(f->f_globals, w, v);
--- 1648,1652 ----
case STORE_GLOBAL:
! w = GETITEM(names, oparg);
v = POP();
err = PyDict_SetItem(f->f_globals, w, v);
***************
*** 1656,1660 ****
case DELETE_GLOBAL:
! w = GETNAMEV(oparg);
if ((err = PyDict_DelItem(f->f_globals, w)) != 0)
format_exc_check_arg(
--- 1655,1659 ----
case DELETE_GLOBAL:
! w = GETITEM(names, oparg);
if ((err = PyDict_DelItem(f->f_globals, w)) != 0)
format_exc_check_arg(
***************
*** 1663,1667 ****
case LOAD_NAME:
! w = GETNAMEV(oparg);
if ((x = f->f_locals) == NULL) {
PyErr_Format(PyExc_SystemError,
--- 1662,1666 ----
case LOAD_NAME:
! w = GETITEM(names, oparg);
if ((x = f->f_locals) == NULL) {
PyErr_Format(PyExc_SystemError,
***************
*** 1688,1692 ****
case LOAD_GLOBAL:
! w = GETNAMEV(oparg);
x = PyDict_GetItem(f->f_globals, w);
if (x == NULL) {
--- 1687,1691 ----
case LOAD_GLOBAL:
! w = GETITEM(names, oparg);
x = PyDict_GetItem(f->f_globals, w);
if (x == NULL) {
***************
*** 1789,1793 ****
case LOAD_ATTR:
! w = GETNAMEV(oparg);
v = POP();
x = PyObject_GetAttr(v, w);
--- 1788,1792 ----
case LOAD_ATTR:
! w = GETITEM(names, oparg);
v = POP();
x = PyObject_GetAttr(v, w);
***************
*** 1831,1835 ****
case IMPORT_NAME:
! w = GETNAMEV(oparg);
x = PyDict_GetItemString(f->f_builtins, "__import__");
if (x == NULL) {
--- 1830,1834 ----
case IMPORT_NAME:
! w = GETITEM(names, oparg);
x = PyDict_GetItemString(f->f_builtins, "__import__");
if (x == NULL) {
***************
*** 1871,1875 ****
case IMPORT_FROM:
! w = GETNAMEV(oparg);
v = TOP();
x = import_from(v, w);
--- 1870,1874 ----
case IMPORT_FROM:
! w = GETITEM(names, oparg);
v = TOP();
x = import_from(v, w);