changeset: 96454:5e8fa1b13516 branch: 2.7 parent: 96425:cf6e782a7f94 user: Benjamin Peterson date: Mon Jun 01 18:24:31 2015 -0500 files: Python/ceval.c description: sync opcode prediction code with python 3 diff -r cf6e782a7f94 -r 5e8fa1b13516 Python/ceval.c --- a/Python/ceval.c Sun May 31 20:21:00 2015 +0300 +++ b/Python/ceval.c Mon Jun 01 18:24:31 2015 -0500 @@ -900,21 +900,15 @@ */ -// 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 */