summaryrefslogtreecommitdiffstats
path: root/PC/winreg.c
diff options
context:
space:
mode:
authorNeil Schemenauer <nas-github@arctrix.com>2024-12-19 18:21:17 (GMT)
committerGitHub <noreply@github.com>2024-12-19 18:21:17 (GMT)
commit1b15c89a17ca3de6b05de5379b8717e9738c51ef (patch)
tree00a4ea63dec7879e81d2ea3d75f43cb8a03ee1b5 /PC/winreg.c
parentd2f1d917e8b3d2dd8f35495c7632a32688883332 (diff)
downloadcpython-1b15c89a17ca3de6b05de5379b8717e9738c51ef.zip
cpython-1b15c89a17ca3de6b05de5379b8717e9738c51ef.tar.gz
cpython-1b15c89a17ca3de6b05de5379b8717e9738c51ef.tar.bz2
gh-115999: Specialize `STORE_ATTR` in free-threaded builds. (gh-127838)
* Add `_PyDictKeys_StringLookupSplit` which does locking on dict keys and use in place of `_PyDictKeys_StringLookup`. * Change `_PyObject_TryGetInstanceAttribute` to use that function in the case of split keys. * Add `unicodekeys_lookup_split` helper which allows code sharing between `_Py_dict_lookup` and `_PyDictKeys_StringLookupSplit`. * Fix locking for `STORE_ATTR_INSTANCE_VALUE`. Create `_GUARD_TYPE_VERSION_AND_LOCK` uop so that object stays locked and `tp_version_tag` cannot change. * Pass `tp_version_tag` to `specialize_dict_access()`, ensuring the version we store on the cache is the correct one (in case of it changing during the specalize analysis). * Split `analyze_descriptor` into `analyze_descriptor_load` and `analyze_descriptor_store` since those don't share much logic. Add `descriptor_is_class` helper function. * In `specialize_dict_access`, double check `_PyObject_GetManagedDict()` in case we race and dict was materialized before the lock. * Avoid borrowed references in `_Py_Specialize_StoreAttr()`. * Use `specialize()` and `unspecialize()` helpers. * Add unit tests to ensure specializing happens as expected in FT builds. * Add unit tests to attempt to trigger data races (useful for running under TSAN). * Add `has_split_table` function to `_testinternalcapi`.
Diffstat (limited to 'PC/winreg.c')
0 files changed, 0 insertions, 0 deletions