You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
JIT: remove all uses of _PyType_LookupByVersion in optimizer_bytecodes.c #148380
We should use recorded values instead, as that is not bounded by a limited-size cache, and it will be easier to make the optimizer thread safe for FT. See for example how I use recorded values for guards in this commit 8fab9d3
Oh yes definitely. Which is why I'm still keeping it around in optimizer_symbols.c. So that builtin type versions are always successfully reverse lookuped to builtin types.
Activity
Fidget-Spinner commentedon Apr 11, 2026
A side note: this will make certain optimizations a lot more effective as well.
NekoAsakura commentedon Apr 11, 2026
Sure!
kumaraditya303 commentedon Apr 11, 2026
There is probably still some value in using the fixed version tags for builtin types, maybe we can find a way to use that with recorded types.
Fidget-Spinner commentedon Apr 11, 2026
Oh yes definitely. Which is why I'm still keeping it around in
optimizer_symbols.c. So that builtin type versions are always successfully reverse lookuped to builtin types.pythongh-148380: remove all uses of `_PyType_LookupByVersion` in `opt…
Merge branch 'main' into pythongh-148380/remove-LookupByVersion
pythongh-148380: revert `_GUARD_TYPE_VERSION`
Merge branch 'main' into pythongh-148380/remove-LookupByVersion
pythongh-148380: remove all uses of `_PyType_LookupByVersion` in `opt…
pythongh-148380: remove redundant `_RECORD_TOS_TYPE`
Merge branch 'main' into pythongh-148380/remove-LookupByVersion
pythongh-148380: relax assert
Merge branch 'main' into pythongh-148380/remove-LookupByVersion
gh-148380: remove all uses of `_PyType_LookupByVersion` in `optimizer…