mirror of
https://github.com/python/cpython.git
synced 2025-07-07 19:35:27 +00:00
GH-131798: Optimize cached class attributes and methods in the JIT (GH-134403)
This commit is contained in:
parent
09e72cf091
commit
ec736e7dae
12 changed files with 365 additions and 130 deletions
|
@ -5307,6 +5307,18 @@ dummy_func(
|
|||
value = PyStackRef_FromPyObjectBorrow(ptr);
|
||||
}
|
||||
|
||||
tier2 op(_LOAD_CONST_UNDER_INLINE, (ptr/4, old -- value, new)) {
|
||||
new = old;
|
||||
DEAD(old);
|
||||
value = PyStackRef_FromPyObjectNew(ptr);
|
||||
}
|
||||
|
||||
tier2 op(_LOAD_CONST_UNDER_INLINE_BORROW, (ptr/4, old -- value, new)) {
|
||||
new = old;
|
||||
DEAD(old);
|
||||
value = PyStackRef_FromPyObjectBorrow(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