summaryrefslogtreecommitdiffstats
path: root/Python/optimizer_bytecodes.c
diff options
context:
space:
mode:
authorBrandt Bucher <brandtbucher@microsoft.com>2025-04-18 14:16:28 (GMT)
committerGitHub <noreply@github.com>2025-04-18 14:16:28 (GMT)
commit40ae88988c61638ee8625e5c0ee73606ede307bb (patch)
tree82339d2ea14f3d89c71da98f5426eb9ffe9a2472 /Python/optimizer_bytecodes.c
parenta594008d9e6c4d37ff6fd698395cd318d7ec3300 (diff)
downloadcpython-40ae88988c61638ee8625e5c0ee73606ede307bb.zip
cpython-40ae88988c61638ee8625e5c0ee73606ede307bb.tar.gz
cpython-40ae88988c61638ee8625e5c0ee73606ede307bb.tar.bz2
GH-131498: Replace single-element arrays with scalars in bytecodes.c (GH-132615)
Diffstat (limited to 'Python/optimizer_bytecodes.c')
-rw-r--r--Python/optimizer_bytecodes.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/Python/optimizer_bytecodes.c b/Python/optimizer_bytecodes.c
index 43fe210..c5d8b53 100644
--- a/Python/optimizer_bytecodes.c
+++ b/Python/optimizer_bytecodes.c
@@ -534,10 +534,10 @@ dummy_func(void) {
top = bottom;
}
- op(_SWAP, (bottom[1], unused[oparg-2], top[1] -- bottom[1], unused[oparg-2], top[1])) {
- JitOptSymbol *temp = bottom[0];
- bottom[0] = top[0];
- top[0] = temp;
+ op(_SWAP, (bottom, unused[oparg-2], top -- bottom, unused[oparg-2], top)) {
+ JitOptSymbol *temp = bottom;
+ bottom = top;
+ top = temp;
assert(oparg >= 2);
}
@@ -546,7 +546,7 @@ dummy_func(void) {
(void)offset;
}
- op(_LOAD_ATTR_MODULE, (dict_version/2, owner, index/1 -- attr)) {
+ op(_LOAD_ATTR_MODULE, (dict_version/2, index/1, owner -- attr)) {
(void)dict_version;
(void)index;
attr = NULL;
@@ -626,9 +626,9 @@ dummy_func(void) {
ctx->done = true;
}
- op(_INIT_CALL_BOUND_METHOD_EXACT_ARGS, (callable[1], self_or_null[1], unused[oparg] -- callable[1], self_or_null[1], unused[oparg])) {
- callable[0] = sym_new_not_null(ctx);
- self_or_null[0] = sym_new_not_null(ctx);
+ op(_INIT_CALL_BOUND_METHOD_EXACT_ARGS, (callable, self_or_null, unused[oparg] -- callable, self_or_null, unused[oparg])) {
+ callable = sym_new_not_null(ctx);
+ self_or_null = sym_new_not_null(ctx);
}
op(_CHECK_FUNCTION_VERSION, (func_version/2, callable, self_or_null, unused[oparg] -- callable, self_or_null, unused[oparg])) {