gh-105481: add HAS_JUMP flag to opcode metadata (#105791)

This commit is contained in:
Irit Katriel 2023-06-15 00:14:22 +01:00 committed by GitHub
parent 5ab13c5f97
commit d1b0297d3e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 189 additions and 168 deletions

View file

@ -145,7 +145,13 @@ GETITEM(PyObject *v, Py_ssize_t i) {
oparg = word.op.arg; \
} while (0)
#define JUMPTO(x) (next_instr = _PyCode_CODE(_PyFrame_GetCode(frame)) + (x))
/* JUMPBY makes the generator identify the instruction as a jump. SKIP_OVER is
* for advancing to the next instruction, taking into account cache entries
* and skipped instructions.
*/
#define JUMPBY(x) (next_instr += (x))
#define SKIP_OVER(x) (next_instr += (x))
/* OpCode prediction macros
Some opcodes tend to come in pairs thus making it possible to