Skip to content

Comments

gh-131798: Split CHECK_FUNCTION_VERSION into two guards in the JIT#145080

Draft
Sacul0457 wants to merge 1 commit intopython:mainfrom
Sacul0457:Split-up-CHECK_FUNCTION_VERSION
Draft

gh-131798: Split CHECK_FUNCTION_VERSION into two guards in the JIT#145080
Sacul0457 wants to merge 1 commit intopython:mainfrom
Sacul0457:Split-up-CHECK_FUNCTION_VERSION

Conversation

@Sacul0457
Copy link
Contributor

@Sacul0457 Sacul0457 commented Feb 21, 2026

This PR splits up _CHECK_FUNCTION_VERSION into _GUARD_CALLABLE_FUNCTION and itself. This allows the optimizer to remove the PyFunction_Check check if we know the type. I think the naming can be improved but this is just what I went for.

This can be done for _CHECK_FUNCTION_VERSION_KW too but I left that out to keep the change smaller.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant