gh-148438: implement `_RECORD_BOUND_METHOD` in JIT by NekoAsakura · Pull Request #148457 · python/cpython
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can one-up this. If it's a probable constant callable, and the func_version matches, we can promote the callable to a known one, just like you did in_CHECK_METHOD_VERSION .
Also, heads up I'm merging my PR https://github.com/python/cpython/pull/146300/changes because _CHECK_FUNCTION_VERSION is wrong for the first if case.