Skip to content

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
@aviatesk aviatesk force-pushed the avi/effects-known-builtins branch 2 times, most recently from 50042e9 to 987a82e Compare March 23, 2025 15:25
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 987a82e to 49aecbe Compare March 24, 2025 11:03
@aviatesk aviatesk merged commit 08c87b2 into master Mar 25, 2025
5 of 7 checks passed
@aviatesk aviatesk deleted the avi/effects-known-builtins branch March 25, 2025 05:28
serenity4 pushed a commit to serenity4/julia that referenced this pull request May 1, 2025
…liaLang#57856)

This commit fixes a bug where `builtin_tfunction` was giving the wrong
effects to builtins that weren't actually implemented. xref:
JuliaLang#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.
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.

3 participants