diff Python/ceval.c @ 50204:94e79d78dff0 legacy-trunk

Issue #2183: Simplify and optimize bytecode for list comprehensions.
author Antoine Pitrou <solipsis@pitrou.net>
date Wed, 17 Dec 2008 00:38:28 +0000
parents 9a10d4404bd0
children c8f793e159bb
line wrap: on
line diff
--- a/Python/ceval.c	Tue Dec 16 03:35:28 2008 +0000
+++ b/Python/ceval.c	Wed Dec 17 00:38:28 2008 +0000
@@ -1294,9 +1294,8 @@
 
 		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);