Issue #2183: Simplify and optimize bytecode for list comprehensions.

This commit is contained in:
Antoine Pitrou 2008-12-17 00:38:28 +00:00
parent 43caaa09ea
commit d0c3515bc5
9 changed files with 34 additions and 63 deletions

View file

@ -1294,9 +1294,8 @@ PyEval_EvalFrameEx(PyFrameObject *f, int throwflag)
case LIST_APPEND:
w = POP();
v = POP();
v = stack_pointer[-oparg];
err = PyList_Append(v, w);
Py_DECREF(v);
Py_DECREF(w);
if (err == 0) {
PREDICT(JUMP_ABSOLUTE);