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

@ -73,9 +73,10 @@ extern time_t PyOS_GetLastModificationTime(char *, FILE *);
Python 2.5c2: 62131 (fix wrong code: for x, in ... in listcomp/genexp)
Python 2.6a0: 62151 (peephole optimizations and STORE_MAP opcode)
Python 2.6a1: 62161 (WITH_CLEANUP optimization)
Python 2.7a0: 62171 (optimize list comprehensions/change LIST_APPEND)
.
*/
#define MAGIC (62161 | ((long)'\r'<<16) | ((long)'\n'<<24))
#define MAGIC (62171 | ((long)'\r'<<16) | ((long)'\n'<<24))
/* Magic word as global; note that _PyImport_Init() can change the
value of this global to accommodate for alterations of how the