summaryrefslogtreecommitdiffstats
path: root/Python/ceval_macros.h
diff options
context:
space:
mode:
authorIrit Katriel <1055913+iritkatriel@users.noreply.github.com>2023-06-14 23:14:22 (GMT)
committerGitHub <noreply@github.com>2023-06-14 23:14:22 (GMT)
commitd1b0297d3e1cb4f9f53070e6c0a5fd6722bdf6ee (patch)
tree5849dfa6be4e9d5432fe5c5a2771755216fc4834 /Python/ceval_macros.h
parent5ab13c5f97aa5226c49052f1ad19a8c97a3d7cdf (diff)
downloadcpython-d1b0297d3e1cb4f9f53070e6c0a5fd6722bdf6ee.zip
cpython-d1b0297d3e1cb4f9f53070e6c0a5fd6722bdf6ee.tar.gz
cpython-d1b0297d3e1cb4f9f53070e6c0a5fd6722bdf6ee.tar.bz2
gh-105481: add HAS_JUMP flag to opcode metadata (#105791)
Diffstat (limited to 'Python/ceval_macros.h')
-rw-r--r--Python/ceval_macros.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/Python/ceval_macros.h b/Python/ceval_macros.h
index 1130b10..706a9a2 100644
--- a/Python/ceval_macros.h
+++ b/Python/ceval_macros.h
@@ -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