Mercurial > cpython-lru_cache-weakref
diff Python/import.c @ 54329:145376df3ad7 legacy-trunk
add a SETUP_WITH opcode
It speeds up the with statement and correctly looks up the special
methods involved.
| author | Benjamin Peterson <benjamin@python.org> |
|---|---|
| date | Mon, 25 May 2009 13:13:44 +0000 |
| parents | fd5ee3d0f552 |
| children | e9fc8947c49a |
line wrap: on
line diff
--- a/Python/import.c Mon May 25 04:34:39 2009 +0000 +++ b/Python/import.c Mon May 25 13:13:44 2009 +0000 @@ -74,9 +74,10 @@ Python 2.7a0: 62171 (optimize list comprehensions/change LIST_APPEND) Python 2.7a0: 62181 (optimize conditional branches: introduce POP_JUMP_IF_FALSE and POP_JUMP_IF_TRUE) + Python 2.7a0 62191 (introduce SETUP_WITH) . */ -#define MAGIC (62181 | ((long)'\r'<<16) | ((long)'\n'<<24)) +#define MAGIC (62191 | ((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
