Skip to content

Conversation

Keno
Copy link
Member

@Keno Keno commented Jan 18, 2023

The first argument isn't special here in any way. The original code here just wanted to avoid calling is_all_const_arg with the first argument included, because that condition was already computed when determining f. This code pre-dated semi-concrete eval and is now in the wrong place.

@Keno Keno requested a review from aviatesk January 18, 2023 07:11
@aviatesk
Copy link
Member

For more context, this f !== nothing is there to avoid doing concrete-eval on overlay method call (see

if !matches.nonoverlayed
# currently we don't have a good way to execute the overlayed method definition,
# so we should give up pure/concrete eval when any of the matched methods is overlayed
f = nothing
all_effects = Effects(all_effects; nonoverlayed=false)
end
), but we don't need this condition to hold for semi-concrete interpretation.

@Keno
Copy link
Member Author

Keno commented Jan 18, 2023

That's not really a good way to signal that information. Why not override the bit in the effects and check that in the eligibility function. f is also nothing if the first argument wasn't Const.

@aviatesk
Copy link
Member

Why not override the bit in the effects and check that in the eligibility function.

The nonoverlayed bit indicates if the method in question may involve any overlayed method call, and doesn't say if the method itself is overlayed or not. So an overlayed method may have :foldable & !:nonoverlayed effects.

@aviatesk
Copy link
Member

Separated the changes on the inlining algorithm to #48349.

@aviatesk
Copy link
Member

Okay, so the changes on opaque closure inlining is necessary for CI to pass on this branch. Apologize for making a noise.

Keno and others added 2 commits January 19, 2023 22:33
The first argument isn't special here in any way. The original
code here just wanted to avoid calling is_all_const_arg with
the first argument included, because that condition was already
computed when determining `f`. This code pre-dated semi-concrete
eval and is now in the wrong place.
Co-authored-by: Keno Fischer <keno@juliacomputing.com>
@aviatesk aviatesk merged commit 1c5fa2b into master Jan 19, 2023
@aviatesk aviatesk deleted the kf/irinterpncfirst branch January 19, 2023 15:09
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