summaryrefslogtreecommitdiffstats
path: root/Python/bytecodes.c
diff options
context:
space:
mode:
authorMark Shannon <mark@hotpy.org>2023-06-07 16:04:53 (GMT)
committerGitHub <noreply@github.com>2023-06-07 16:04:53 (GMT)
commit064de0e3fca014e5225830a35766fb7867cbf403 (patch)
tree72f73ca2a4788968816f03268cbfbde7741f34ab /Python/bytecodes.c
parentd63a7c3694d5c4484fcaa01c33590b1d4bc2559e (diff)
downloadcpython-064de0e3fca014e5225830a35766fb7867cbf403.zip
cpython-064de0e3fca014e5225830a35766fb7867cbf403.tar.gz
cpython-064de0e3fca014e5225830a35766fb7867cbf403.tar.bz2
GH-104610: Remove the use of `PREDICT` macros. (GH-104651)
Diffstat (limited to 'Python/bytecodes.c')
-rw-r--r--Python/bytecodes.c13
1 files changed, 0 insertions, 13 deletions
diff --git a/Python/bytecodes.c b/Python/bytecodes.c
index bd40369..1dc8011 100644
--- a/Python/bytecodes.c
+++ b/Python/bytecodes.c
@@ -44,7 +44,6 @@
#define DEOPT_IF(cond, instname) ((void)0)
#define ERROR_IF(cond, labelname) ((void)0)
#define GO_TO_INSTRUCTION(instname) ((void)0)
-#define PREDICT(opname) ((void)0)
#define inst(name, ...) case name:
#define op(name, ...) /* NAME is ignored */
@@ -562,14 +561,12 @@ dummy_func(
inst(LIST_APPEND, (list, unused[oparg-1], v -- list, unused[oparg-1])) {
ERROR_IF(_PyList_AppendTakeRef((PyListObject *)list, v) < 0, error);
- PREDICT(JUMP_BACKWARD);
}
inst(SET_ADD, (set, unused[oparg-1], v -- set, unused[oparg-1])) {
int err = PySet_Add(set, v);
DECREF_INPUTS();
ERROR_IF(err, error);
- PREDICT(JUMP_BACKWARD);
}
family(store_subscr, INLINE_CACHE_ENTRIES_STORE_SUBSCR) = {
@@ -824,8 +821,6 @@ dummy_func(
Py_DECREF(next_iter);
}
}
-
- PREDICT(LOAD_CONST);
}
inst(GET_AWAITABLE, (iterable -- iter)) {
@@ -852,8 +847,6 @@ dummy_func(
}
ERROR_IF(iter == NULL, error);
-
- PREDICT(LOAD_CONST);
}
family(send, INLINE_CACHE_ENTRIES_SEND) = {
@@ -1611,7 +1604,6 @@ dummy_func(
ERROR_IF(true, error);
}
DECREF_INPUTS();
- PREDICT(CALL_FUNCTION_EX);
}
inst(MAP_ADD, (key, value --)) {
@@ -1620,7 +1612,6 @@ dummy_func(
/* dict[key] = value */
// Do not DECREF INPUTS because the function steals the references
ERROR_IF(_PyDict_SetItem_Take2((PyDictObject *)dict, key, value) != 0, error);
- PREDICT(JUMP_BACKWARD);
}
inst(INSTRUMENTED_LOAD_SUPER_ATTR, (unused/9, unused, unused, unused -- unused if (oparg & 1), unused)) {
@@ -2248,13 +2239,11 @@ dummy_func(
inst(MATCH_MAPPING, (subject -- subject, res)) {
int match = Py_TYPE(subject)->tp_flags & Py_TPFLAGS_MAPPING;
res = match ? Py_True : Py_False;
- PREDICT(POP_JUMP_IF_FALSE);
}
inst(MATCH_SEQUENCE, (subject -- subject, res)) {
int match = Py_TYPE(subject)->tp_flags & Py_TPFLAGS_SEQUENCE;
res = match ? Py_True : Py_False;
- PREDICT(POP_JUMP_IF_FALSE);
}
inst(MATCH_KEYS, (subject, keys -- subject, keys, values_or_none)) {
@@ -2295,7 +2284,6 @@ dummy_func(
}
DECREF_INPUTS();
}
- PREDICT(LOAD_CONST);
}
// Most members of this family are "secretly" super-instructions.
@@ -2485,7 +2473,6 @@ dummy_func(
Py_DECREF(exit);
ERROR_IF(true, error);
}
- PREDICT(GET_AWAITABLE);
}
inst(BEFORE_WITH, (mgr -- exit, res)) {