mirror of
https://github.com/python/cpython.git
synced 2025-08-22 09:45:06 +00:00
GH-118093: Add tier two support for LOAD_ATTR_PROPERTY (GH-122283)
This commit is contained in:
parent
5e686ff57d
commit
5f6001130f
9 changed files with 168 additions and 99 deletions
|
@ -963,15 +963,10 @@ _Py_Specialize_LoadAttr(_PyStackRef owner_st, _Py_CODEUNIT *instr, PyObject *nam
|
|||
SPECIALIZATION_FAIL(LOAD_ATTR, SPEC_FAIL_ATTR_METHOD);
|
||||
goto fail;
|
||||
}
|
||||
uint32_t version = function_get_version(fget, LOAD_ATTR);
|
||||
if (version == 0) {
|
||||
goto fail;
|
||||
}
|
||||
if (_PyInterpreterState_GET()->eval_frame) {
|
||||
SPECIALIZATION_FAIL(LOAD_ATTR, SPEC_FAIL_OTHER);
|
||||
goto fail;
|
||||
}
|
||||
write_u32(lm_cache->keys_version, version);
|
||||
assert(type->tp_version_tag != 0);
|
||||
write_u32(lm_cache->type_version, type->tp_version_tag);
|
||||
/* borrowed */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue