mirror of
https://github.com/python/cpython.git
synced 2025-08-24 10:45:53 +00:00
GH-130415: Optimize constant comparison in JIT builds (GH-131489)
This commit is contained in:
parent
0de5e0c544
commit
b92ee14b80
8 changed files with 142 additions and 35 deletions
|
@ -5133,6 +5133,12 @@ dummy_func(
|
|||
value = PyStackRef_FromPyObjectImmortal(ptr);
|
||||
}
|
||||
|
||||
tier2 pure op(_POP_TWO_LOAD_CONST_INLINE_BORROW, (ptr/4, pop1, pop2 -- value)) {
|
||||
PyStackRef_CLOSE(pop2);
|
||||
PyStackRef_CLOSE(pop1);
|
||||
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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue