diff options
author | Mark Shannon <mark@hotpy.org> | 2025-02-03 12:41:32 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-02-03 12:41:32 (GMT) |
commit | 808071b994370886a169cfb97cef1ca3837f89c1 (patch) | |
tree | fc1f38d508468249bb6998737ba1df2ea21c42b7 /Python/optimizer_bytecodes.c | |
parent | 218f205f2091cb173b5fe3f4b265c102cdf093b3 (diff) | |
download | cpython-808071b994370886a169cfb97cef1ca3837f89c1.zip cpython-808071b994370886a169cfb97cef1ca3837f89c1.tar.gz cpython-808071b994370886a169cfb97cef1ca3837f89c1.tar.bz2 |
GH-128682: Make `PyStackRef_CLOSE` escaping. (GH-129404)
Diffstat (limited to 'Python/optimizer_bytecodes.c')
-rw-r--r-- | Python/optimizer_bytecodes.c | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/Python/optimizer_bytecodes.c b/Python/optimizer_bytecodes.c index fb14c4b..91573e8 100644 --- a/Python/optimizer_bytecodes.c +++ b/Python/optimizer_bytecodes.c @@ -512,10 +512,11 @@ dummy_func(void) { top = bottom; } - op(_SWAP, (bottom_in, unused[oparg-2], top_in -- - top_out, unused[oparg-2], bottom_out)) { - bottom_out = bottom_in; - top_out = top_in; + 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; + assert(oparg >= 2); } op(_LOAD_ATTR_INSTANCE_VALUE, (offset/1, owner -- attr)) { @@ -629,10 +630,10 @@ dummy_func(void) { ctx->done = true; } - op(_INIT_CALL_BOUND_METHOD_EXACT_ARGS, (callable, unused, unused[oparg] -- func, self, unused[oparg])) { + op(_INIT_CALL_BOUND_METHOD_EXACT_ARGS, (callable[1], self_or_null[1], unused[oparg] -- callable[1], self_or_null[1], unused[oparg])) { (void)callable; - func = sym_new_not_null(ctx); - self = sym_new_not_null(ctx); + callable[0] = sym_new_not_null(ctx); + self_or_null[0] = sym_new_not_null(ctx); } op(_CHECK_FUNCTION_VERSION, (func_version/2, callable, self_or_null, unused[oparg] -- callable, self_or_null, unused[oparg])) { |