summaryrefslogtreecommitdiffstats
path: root/Python/bytecodes.c
diff options
context:
space:
mode:
authorMark Shannon <mark@hotpy.org>2023-01-06 14:47:57 (GMT)
committerGitHub <noreply@github.com>2023-01-06 14:47:57 (GMT)
commit78068126a1f2172ff61a0871ba43d8530bc73905 (patch)
treeaa42d4c6d64130587e2f62d61389496693de86e4 /Python/bytecodes.c
parent659c2607f5b44a8a18a0840d1ac39df8a3219dd5 (diff)
downloadcpython-78068126a1f2172ff61a0871ba43d8530bc73905.zip
cpython-78068126a1f2172ff61a0871ba43d8530bc73905.tar.gz
cpython-78068126a1f2172ff61a0871ba43d8530bc73905.tar.bz2
GH-99005: More intrinsics (GH-100774)
* Remove UNARY_POSITIVE, LIST_TO_TUPLE and ASYNC_GEN_WRAP, replacing them with intrinsics.
Diffstat (limited to 'Python/bytecodes.c')
-rw-r--r--Python/bytecodes.c19
1 files changed, 0 insertions, 19 deletions
diff --git a/Python/bytecodes.c b/Python/bytecodes.c
index 04ba33e..6e20ba6 100644
--- a/Python/bytecodes.c
+++ b/Python/bytecodes.c
@@ -173,12 +173,6 @@ dummy_func(
macro(END_FOR) = POP_TOP + POP_TOP;
- inst(UNARY_POSITIVE, (value -- res)) {
- res = PyNumber_Positive(value);
- DECREF_INPUTS();
- ERROR_IF(res == NULL, error);
- }
-
inst(UNARY_NEGATIVE, (value -- res)) {
res = PyNumber_Negative(value);
DECREF_INPUTS();
@@ -757,13 +751,6 @@ dummy_func(
}
}
- inst(ASYNC_GEN_WRAP, (v -- w)) {
- assert(frame->f_code->co_flags & CO_ASYNC_GENERATOR);
- w = _PyAsyncGenValueWrapperNew(v);
- DECREF_INPUTS();
- ERROR_IF(w == NULL, error);
- }
-
inst(YIELD_VALUE, (retval -- unused)) {
// NOTE: It's important that YIELD_VALUE never raises an exception!
// The compiler treats any exception raised here as a failed close()
@@ -1348,12 +1335,6 @@ dummy_func(
PUSH(list);
}
- inst(LIST_TO_TUPLE, (list -- tuple)) {
- tuple = PyList_AsTuple(list);
- DECREF_INPUTS();
- ERROR_IF(tuple == NULL, error);
- }
-
inst(LIST_EXTEND, (iterable -- )) {
PyObject *list = PEEK(oparg + 1); // iterable is still on the stack
PyObject *none_val = _PyList_Extend((PyListObject *)list, iterable);