mirror of
https://github.com/python/cpython.git
synced 2026-04-20 02:40:59 +00:00
gh-131798: split _CALL_BUILTIN_CLASS to smaller uops (#148094)
This commit is contained in:
parent
e007631e99
commit
8f17140fc1
10 changed files with 1299 additions and 1217 deletions
|
|
@ -1284,6 +1284,19 @@ dummy_func(void) {
|
|||
none = sym_new_const(ctx, Py_None);
|
||||
}
|
||||
|
||||
op(_GUARD_CALLABLE_BUILTIN_CLASS, (callable, unused, unused[oparg] -- callable, unused, unused[oparg])) {
|
||||
PyObject *callable_o = sym_get_const(ctx, callable);
|
||||
if (callable_o && sym_matches_type(callable, &PyType_Type)) {
|
||||
PyTypeObject *tp = (PyTypeObject *)callable_o;
|
||||
if (tp->tp_vectorcall != NULL) {
|
||||
ADD_OP(_NOP, 0, 0);
|
||||
}
|
||||
}
|
||||
else {
|
||||
sym_set_type(callable, &PyType_Type);
|
||||
}
|
||||
}
|
||||
|
||||
op(_GUARD_CALLABLE_BUILTIN_O, (callable, self_or_null, args[oparg] -- callable, self_or_null, args[oparg])) {
|
||||
PyObject *callable_o = sym_get_const(ctx, callable);
|
||||
if (callable_o && sym_matches_type(callable, &PyCFunction_Type) &&
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue