mirror of
https://github.com/python/cpython.git
synced 2025-09-11 11:17:16 +00:00
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.
This commit is contained in:
parent
db0de9e7ca
commit
2d783e9b16
1 changed files with 9 additions and 9 deletions
|
@ -1583,15 +1583,6 @@ eval_frame(PyFrameObject *f)
|
||||||
#ifdef CASE_TOO_BIG
|
#ifdef CASE_TOO_BIG
|
||||||
default: switch (opcode) {
|
default: switch (opcode) {
|
||||||
#endif
|
#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:
|
case RAISE_VARARGS:
|
||||||
u = v = w = NULL;
|
u = v = w = NULL;
|
||||||
switch (oparg) {
|
switch (oparg) {
|
||||||
|
@ -2109,6 +2100,15 @@ eval_frame(PyFrameObject *f)
|
||||||
JUMPBY(oparg);
|
JUMPBY(oparg);
|
||||||
continue;
|
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_LOOP:
|
||||||
case SETUP_EXCEPT:
|
case SETUP_EXCEPT:
|
||||||
case SETUP_FINALLY:
|
case SETUP_FINALLY:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue