aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/Python/bytecodes.c
diff options
context:
space:
mode:
authorTomas R. <tomas.roun8@gmail.com>2025-05-19 18:00:53 -0400
committerGitHub <noreply@github.com>2025-05-19 18:00:53 -0400
commita7f317d7300235d9efff5a0350b1bae14720d42f (patch)
treee97a63958481969f48adec42e3ce22a48b4cb388 /Python/bytecodes.c
parent1fbb0603a87669562e964cade336b3384778fbe0 (diff)
downloadcpython-a7f317d7300235d9efff5a0350b1bae14720d42f.tar.gz
cpython-a7f317d7300235d9efff5a0350b1bae14720d42f.zip
GH-131798: Add _POP_CALL_TWO_LOAD_CONST_INLINE_BORROW (GH-134268)
Diffstat (limited to 'Python/bytecodes.c')
-rw-r--r--Python/bytecodes.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/Python/bytecodes.c b/Python/bytecodes.c
index c10327916fc..477a84b170a 100644
--- a/Python/bytecodes.c
+++ b/Python/bytecodes.c
@@ -5342,6 +5342,15 @@ dummy_func(
value = PyStackRef_FromPyObjectImmortal(ptr);
}
+ tier2 pure op(_POP_CALL_TWO_LOAD_CONST_INLINE_BORROW, (ptr/4, callable, null, pop1, pop2 -- value)) {
+ PyStackRef_CLOSE(pop2);
+ PyStackRef_CLOSE(pop1);
+ (void)null; // Silence compiler warnings about unused variables
+ DEAD(null);
+ PyStackRef_CLOSE(callable);
+ value = PyStackRef_FromPyObjectImmortal(ptr);
+ }
+
tier2 op(_CHECK_FUNCTION, (func_version/2 -- )) {
assert(PyStackRef_FunctionCheck(frame->f_funcobj));
PyFunctionObject *func = (PyFunctionObject *)PyStackRef_AsPyObjectBorrow(frame->f_funcobj);