Mercurial > cpython-lru_cache-weakref
diff Python/ceval.c @ 31647:d10c778af167 legacy-trunk
Move the code for BREAK and CONTINUE_LOOP to be near FOR_ITER.
Makes it more likely that all loop operations are in the cache
at the same time.
| author | Raymond Hettinger <python@rcn.com> |
|---|---|
| date | Fri, 12 Mar 2004 09:12:22 +0000 |
| parents | 83b0382e0d36 |
| children | 243642bbd03f |
line wrap: on
line diff
--- a/Python/ceval.c Fri Mar 12 08:41:36 2004 +0000 +++ b/Python/ceval.c Fri Mar 12 09:12:22 2004 +0000 @@ -1583,15 +1583,6 @@ #ifdef CASE_TOO_BIG default: switch (opcode) { #endif - case BREAK_LOOP: - why = WHY_BREAK; - goto fast_block_end; - - case CONTINUE_LOOP: - retval = PyInt_FromLong(oparg); - why = WHY_CONTINUE; - goto fast_block_end; - case RAISE_VARARGS: u = v = w = NULL; switch (oparg) { @@ -2109,6 +2100,15 @@ JUMPBY(oparg); continue; + case BREAK_LOOP: + why = WHY_BREAK; + goto fast_block_end; + + case CONTINUE_LOOP: + retval = PyInt_FromLong(oparg); + why = WHY_CONTINUE; + goto fast_block_end; + case SETUP_LOOP: case SETUP_EXCEPT: case SETUP_FINALLY:
