Kaydet (Commit) 6d46a91d authored tarafından Benjamin Peterson's avatar Benjamin Peterson

Merged revisions 73614-73615 via svnmerge from

svn+ssh://pythondev@svn.python.org/python/trunk

........
  r73614 | benjamin.peterson | 2009-06-28 11:08:02 -0500 (Sun, 28 Jun 2009) | 1 line

  add two generic macros for peeking and setting in the stack
........
  r73615 | benjamin.peterson | 2009-06-28 11:14:07 -0500 (Sun, 28 Jun 2009) | 1 line

  use stack macros
........
üst ac8c7307
......@@ -919,10 +919,12 @@ PyEval_EvalFrameEx(PyFrameObject *f, int throwflag)
#define SECOND() (stack_pointer[-2])
#define THIRD() (stack_pointer[-3])
#define FOURTH() (stack_pointer[-4])
#define PEEK(n) (stack_pointer[-(n)])
#define SET_TOP(v) (stack_pointer[-1] = (v))
#define SET_SECOND(v) (stack_pointer[-2] = (v))
#define SET_THIRD(v) (stack_pointer[-3] = (v))
#define SET_FOURTH(v) (stack_pointer[-4] = (v))
#define SET_VALUE(n, v) (stack_pointer[-(n)] = (v))
#define BASIC_STACKADJ(n) (stack_pointer += n)
#define BASIC_PUSH(v) (*stack_pointer++ = (v))
#define BASIC_POP() (*--stack_pointer)
......@@ -1548,7 +1550,7 @@ PyEval_EvalFrameEx(PyFrameObject *f, int throwflag)
TARGET(LIST_APPEND)
w = POP();
v = stack_pointer[-oparg];
v = PEEK(oparg);
err = PyList_Append(v, w);
Py_DECREF(w);
if (err == 0) {
......@@ -1909,7 +1911,7 @@ PyEval_EvalFrameEx(PyFrameObject *f, int throwflag)
}
} else if (unpack_iterable(v, oparg, -1,
stack_pointer + oparg)) {
stack_pointer += oparg;
STACKADJ(oparg);
} else {
/* unpack_iterable() raised an exception */
why = WHY_EXCEPTION;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment