summaryrefslogtreecommitdiffstats
path: root/Python
diff options
context:
space:
mode:
authorMark Shannon <mark@hotpy.org>2024-07-26 17:38:52 (GMT)
committerGitHub <noreply@github.com>2024-07-26 17:38:52 (GMT)
commit1ca99ed240e1e70502d84fea274423b660d172c2 (patch)
treeb04364df65c603068f2f1343c05b5f0399eb273c /Python
parentc557ae97d6bd9d04164a19b4fe136610e54dbdd8 (diff)
downloadcpython-1ca99ed240e1e70502d84fea274423b660d172c2.zip
cpython-1ca99ed240e1e70502d84fea274423b660d172c2.tar.gz
cpython-1ca99ed240e1e70502d84fea274423b660d172c2.tar.bz2
Manually override bytecode definition in optimizer, to avoid build error (GH-122316)
Diffstat (limited to 'Python')
-rw-r--r--Python/optimizer_bytecodes.c8
-rw-r--r--Python/optimizer_cases.c.h13
2 files changed, 17 insertions, 4 deletions
diff --git a/Python/optimizer_bytecodes.c b/Python/optimizer_bytecodes.c
index 4d4f893..c982e37 100644
--- a/Python/optimizer_bytecodes.c
+++ b/Python/optimizer_bytecodes.c
@@ -596,6 +596,14 @@ dummy_func(void) {
}
}
+ op(_MAYBE_EXPAND_METHOD, (callable, self_or_null, args[oparg] -- func, maybe_self, args[oparg])) {
+ (void)callable;
+ (void)self_or_null;
+ (void)args;
+ func = sym_new_not_null(ctx);
+ maybe_self = sym_new_not_null(ctx);
+ }
+
op(_PY_FRAME_GENERAL, (callable, self_or_null, args[oparg] -- new_frame: _Py_UOpsAbstractFrame *)) {
/* The _Py_UOpsAbstractFrame design assumes that we can copy arguments across directly */
(void)callable;
diff --git a/Python/optimizer_cases.c.h b/Python/optimizer_cases.c.h
index fae93ce..4fa40ff 100644
--- a/Python/optimizer_cases.c.h
+++ b/Python/optimizer_cases.c.h
@@ -1599,14 +1599,19 @@
}
case _MAYBE_EXPAND_METHOD: {
+ _Py_UopsSymbol **args;
+ _Py_UopsSymbol *self_or_null;
+ _Py_UopsSymbol *callable;
_Py_UopsSymbol *func;
_Py_UopsSymbol *maybe_self;
- _Py_UopsSymbol **args;
+ args = &stack_pointer[-oparg];
+ self_or_null = stack_pointer[-1 - oparg];
+ callable = stack_pointer[-2 - oparg];
+ (void)callable;
+ (void)self_or_null;
+ (void)args;
func = sym_new_not_null(ctx);
maybe_self = sym_new_not_null(ctx);
- for (int _i = oparg; --_i >= 0;) {
- args[_i] = sym_new_not_null(ctx);
- }
stack_pointer[-2 - oparg] = func;
stack_pointer[-1 - oparg] = maybe_self;
break;