summaryrefslogtreecommitdiffstats
path: root/Python/specialize.c
diff options
context:
space:
mode:
authorMark Shannon <mark@hotpy.org>2023-06-05 10:07:04 (GMT)
committerGitHub <noreply@github.com>2023-06-05 10:07:04 (GMT)
commit06893403668961fdbd5d9ece18162eb3470fc8dd (patch)
treeb7aeda20407a014944b7044b81e451a50e9f6924 /Python/specialize.c
parente8ecb9ee6bec03d0c4490f3e7f1524e56e2f6a0f (diff)
downloadcpython-06893403668961fdbd5d9ece18162eb3470fc8dd.zip
cpython-06893403668961fdbd5d9ece18162eb3470fc8dd.tar.gz
cpython-06893403668961fdbd5d9ece18162eb3470fc8dd.tar.bz2
GH-105229: Replace some superinstructions with single instruction equivalent. (GH-105230)
Diffstat (limited to 'Python/specialize.c')
-rw-r--r--Python/specialize.c12
1 files changed, 1 insertions, 11 deletions
diff --git a/Python/specialize.c b/Python/specialize.c
index f168491..e5c6d68 100644
--- a/Python/specialize.c
+++ b/Python/specialize.c
@@ -289,15 +289,6 @@ _PyCode_Quicken(PyCodeObject *code)
case LOAD_FAST << 8 | LOAD_CONST:
instructions[i - 1].op.code = LOAD_FAST__LOAD_CONST;
break;
- case LOAD_FAST << 8 | LOAD_FAST:
- instructions[i - 1].op.code = LOAD_FAST__LOAD_FAST;
- break;
- case STORE_FAST << 8 | LOAD_FAST:
- instructions[i - 1].op.code = STORE_FAST__LOAD_FAST;
- break;
- case STORE_FAST << 8 | STORE_FAST:
- instructions[i - 1].op.code = STORE_FAST__STORE_FAST;
- break;
}
}
#endif /* ENABLE_SPECIALIZATION */
@@ -1914,8 +1905,7 @@ _Py_Specialize_BinaryOp(PyObject *lhs, PyObject *rhs, _Py_CODEUNIT *instr,
}
if (PyUnicode_CheckExact(lhs)) {
_Py_CODEUNIT next = instr[INLINE_CACHE_ENTRIES_BINARY_OP + 1];
- bool to_store = (next.op.code == STORE_FAST ||
- next.op.code == STORE_FAST__LOAD_FAST);
+ bool to_store = (next.op.code == STORE_FAST);
if (to_store && locals[next.op.arg] == lhs) {
instr->op.code = BINARY_OP_INPLACE_ADD_UNICODE;
goto success;