mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
GH-104610: Remove the use of PREDICT
macros. (GH-104651)
This commit is contained in:
parent
d63a7c3694
commit
064de0e3fc
3 changed files with 507 additions and 551 deletions
|
@ -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):
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue