Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

effects: give the most conservative effects to unhandled builtins #57856

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

aviatesk
Copy link
Member

This commit fixes a bug where builtin_tfunction was giving the wrong effects to builtins that weren't actually implemented. xref: #57806 (comment)

Now, when we add new builtins, unless we manually update _EFFECTS_KNOWN_BUILTINS, they'll automatically get the most conservative Effects().

Effects for builtins like getglobal are calculated individually inside abstract_call_builtin, so there is no handling for them within builtin_effects and thus they aren't in _EFFECTS_KNOWN_BUILTINS. If we want to give these built-ins a better stmt_effect_flag, we need to handle it in builtin_effects properly.

@aviatesk aviatesk requested a review from vtjnash March 21, 2025 17:48
@aviatesk aviatesk force-pushed the avi/effects-known-builtins branch from f0c7c24 to af154ee Compare March 22, 2025 06:22
Base automatically changed from avi/issue57780 to master March 22, 2025 12:03
This commit fixes a bug where `builtin_tfunction` was giving the wrong
effects to builtins that weren't actually implemented.
xref: #57806 (comment)

Now, when we add new builtins, unless we manually update
`_EFFECTS_KNOWN_BUILTINS`, they'll automatically get the most
conservative `Effects()`.

Effects for builtins like `getglobal` are calculated individually inside
`abstract_call_builtin`, so there is no handling for them within
`builtin_effects` and thus they aren't in `_EFFECTS_KNOWN_BUILTINS`.
If we want to give these built-ins a better `stmt_effect_flag`, we need
to handle it in `builtin_effects` properly.
@aviatesk aviatesk force-pushed the avi/effects-known-builtins branch from af154ee to 50042e9 Compare March 22, 2025 12:05
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.

2 participants