GH-105848: Simplify the arrangement of CALL's stack (GH-107788)

This commit is contained in:
Brandt Bucher 2023-08-09 11:19:39 -07:00 committed by GitHub
parent 0a7f48b9a8
commit a9caf9cf90
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
16 changed files with 627 additions and 682 deletions

View file

@ -793,6 +793,10 @@ _Py_Specialize_LoadAttr(PyObject *owner, _Py_CODEUNIT *instr, PyObject *name)
if (!function_check_args(fget, 1, LOAD_ATTR)) {
goto fail;
}
if (instr->op.arg & 1) {
SPECIALIZATION_FAIL(LOAD_ATTR, SPEC_FAIL_ATTR_METHOD);
goto fail;
}
uint32_t version = function_get_version(fget, LOAD_ATTR);
if (version == 0) {
goto fail;
@ -859,6 +863,10 @@ _Py_Specialize_LoadAttr(PyObject *owner, _Py_CODEUNIT *instr, PyObject *name)
if (!function_check_args(descr, 2, LOAD_ATTR)) {
goto fail;
}
if (instr->op.arg & 1) {
SPECIALIZATION_FAIL(LOAD_ATTR, SPEC_FAIL_ATTR_METHOD);
goto fail;
}
uint32_t version = function_get_version(descr, LOAD_ATTR);
if (version == 0) {
goto fail;