mirror of
https://github.com/python/cpython.git
synced 2026-04-20 10:51:00 +00:00
gh-131798: optimize through keyword and bound method calls in the JIT (GH-148466)
Co-authored-by: Ken Jin <kenjin4096@gmail.com>
This commit is contained in:
parent
10d275fdf8
commit
88e378cc1c
8 changed files with 1174 additions and 1001 deletions
|
|
@ -5249,6 +5249,7 @@ dummy_func(
|
|||
}
|
||||
|
||||
macro(CALL_KW_PY) =
|
||||
_RECORD_CALLABLE_KW +
|
||||
unused/1 + // Skip over the counter
|
||||
_CHECK_PEP_523 +
|
||||
_CHECK_FUNCTION_VERSION_KW +
|
||||
|
|
@ -5279,6 +5280,7 @@ dummy_func(
|
|||
}
|
||||
|
||||
macro(CALL_KW_BOUND_METHOD) =
|
||||
_RECORD_CALLABLE_KW +
|
||||
unused/1 + // Skip over the counter
|
||||
_CHECK_PEP_523 +
|
||||
_CHECK_METHOD_VERSION_KW +
|
||||
|
|
@ -6157,6 +6159,10 @@ dummy_func(
|
|||
RECORD_VALUE(PyStackRef_AsPyObjectBorrow(func));
|
||||
}
|
||||
|
||||
tier2 op(_RECORD_CALLABLE_KW, (func, self, args[oparg], kwnames -- func, self, args[oparg], kwnames)) {
|
||||
RECORD_VALUE(PyStackRef_AsPyObjectBorrow(func));
|
||||
}
|
||||
|
||||
tier2 op(_RECORD_BOUND_METHOD, (callable, self, args[oparg] -- callable, self, args[oparg])) {
|
||||
PyObject *callable_o = PyStackRef_AsPyObjectBorrow(callable);
|
||||
if (Py_TYPE(callable_o) == &PyMethod_Type) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue