-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
effects: complements #43852, implement effect override mechanisms
The PR #43852 missed to implement the mechanism to override analyzed effects with effect settings annotated by `Base.@assume_effects`. This commits adds such an mechanism within `finish(::InferenceState, ::AbstractInterpreter)`, just after inference analyzed frame effect. Now we can do something like: ```julia Base.@assume_effects :consistent :effect_free :terminates_globally consteval( f, args...; kwargs...) = f(args...; kwargs...) const ___CONST_DICT___ = Dict{Any,Any}(:a => 1, :b => 2) @test fully_eliminated() do consteval(getindex, ___CONST_DICT___, :a) end ```
- Loading branch information
Showing
5 changed files
with
91 additions
and
36 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters