From: Benjamin Peterson Date: Mon, 1 Jun 2015 23:24:31 +0000 (-0500) Subject: sync opcode prediction code with python 3 X-Git-Tag: v2.7.11rc1~281 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=cc06dbfc737b1259357ac344752c7eccf356c04d;p=thirdparty%2FPython%2Fcpython.git sync opcode prediction code with python 3 --- diff --git a/Python/ceval.c b/Python/ceval.c index c41cbb4bc320..115d2784c817 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 */