GH-104610: Remove the use of PREDICT macros. (GH-104651)

This commit is contained in:
Mark Shannon 2023-06-07 17:04:53 +01:00 committed by GitHub
parent d63a7c3694
commit 064de0e3fc
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 507 additions and 551 deletions

View file

@ -174,21 +174,6 @@ GETITEM(PyObject *v, Py_ssize_t i) {
*/
#define PREDICT_ID(op) PRED_##op
#if USE_COMPUTED_GOTOS
#define PREDICT(op) if (0) goto PREDICT_ID(op)
#else
#define PREDICT(next_op) \
do { \
_Py_CODEUNIT word = *next_instr; \
opcode = word.op.code; \
if (opcode == next_op) { \
oparg = word.op.arg; \
INSTRUCTION_START(next_op); \
goto PREDICT_ID(next_op); \
} \
} while(0)
#endif
#define PREDICTED(op) PREDICT_ID(op):