summaryrefslogtreecommitdiffstats
path: root/Python/ceval.c
diff options
context:
space:
mode:
authorRaymond Hettinger <python@rcn.com>2004-03-12 09:12:22 (GMT)
committerRaymond Hettinger <python@rcn.com>2004-03-12 09:12:22 (GMT)
commit2d783e9b16e5500d4ef6a2783b92051fe9fed154 (patch)
tree15b0a6d7093f327ba7e2c866a3cab492473cba65 /Python/ceval.c
parentdb0de9e7cabc5e7bc052dfc4c8fc1b5dea154009 (diff)
downloadcpython-2d783e9b16e5500d4ef6a2783b92051fe9fed154.zip
cpython-2d783e9b16e5500d4ef6a2783b92051fe9fed154.tar.gz
cpython-2d783e9b16e5500d4ef6a2783b92051fe9fed154.tar.bz2
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.
Diffstat (limited to 'Python/ceval.c')
-rw-r--r--Python/ceval.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/Python/ceval.c b/Python/ceval.c
index 3c9076c..71fd547 100644
--- a/Python/ceval.c
+++ b/Python/ceval.c
@@ -1583,15 +1583,6 @@ eval_frame(PyFrameObject *f)
#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 @@ eval_frame(PyFrameObject *f)
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: