diff options
author | Benjamin Peterson <benjamin@python.org> | 2015-06-01 23:24:31 (GMT) |
---|---|---|
committer | Benjamin Peterson <benjamin@python.org> | 2015-06-01 23:24:31 (GMT) |
commit | cc06dbfc737b1259357ac344752c7eccf356c04d (patch) | |
tree | 8fe19a75a60dbdf9a9d9e4476471116316e4a28a /Python/ceval.c | |
parent | c7797dc7482035ee166ca2e941b623382b92e1fc (diff) | |
download | cpython-cc06dbfc737b1259357ac344752c7eccf356c04d.zip cpython-cc06dbfc737b1259357ac344752c7eccf356c04d.tar.gz cpython-cc06dbfc737b1259357ac344752c7eccf356c04d.tar.bz2 |
sync opcode prediction code with python 3
Diffstat (limited to 'Python/ceval.c')
-rw-r--r-- | Python/ceval.c | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/Python/ceval.c b/Python/ceval.c index c41cbb4..115d278 100644 --- a/Python/ceval.c +++ b/Python/ceval.c @@ -900,21 +900,15 @@ PyEval_EvalFrameEx(PyFrameObject *f, int throwflag) */ -// Next opcode prediction is also enabled for Computed Gotos as well. -#ifdef DYNAMIC_EXECUTION_PROFILE -#define PREDICT(op) //if (0) goto PRED_##op -#define PREDICTED(op) -#define PREDICTED_WITH_ARG(op) +#if defined(DYNAMIC_EXECUTION_PROFILE) || USE_COMPUTED_GOTOS +#define PREDICT(op) if (0) goto PRED_##op +#define PREDICTED(op) PRED_##op: +#define PREDICTED_WITH_ARG(op) PRED_##op: #else #define PREDICT(op) if (*next_instr == op) goto PRED_##op #define PREDICTED(op) PRED_##op: next_instr++ -#ifdef USE_COMPUTED_GOTOS -#define PREDICTED_WITH_ARG(op) PRED_##op: next_instr++ -#else #define PREDICTED_WITH_ARG(op) PRED_##op: oparg = PEEKARG(); next_instr += 3 #endif -#endif - /* Stack manipulation macros */ |