https://github.com/JuliaLang/julia
Revision b2890d514ee1c3e5b09e3c30bd786c115578d9a5 authored by Shuhei Kadowaki on 15 March 2022, 02:04:35 UTC, committed by GitHub on 15 March 2022, 02:04:35 UTC
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
```
1 parent c38e429
History
Tip revision: b2890d514ee1c3e5b09e3c30bd786c115578d9a5 authored by Shuhei Kadowaki on 15 March 2022, 02:04:35 UTC
effects: complements #43852, implement effect override mechanisms (#44561)
Tip revision: b2890d5
File Mode Size
.devcontainer
.github
base
cli
contrib
deps
doc
etc
src
stdlib
test
.buildkite-external-version -rw-r--r-- 5 bytes
.clang-format -rw-r--r-- 3.3 KB
.codecov.yml -rw-r--r-- 52 bytes
.gitattributes -rw-r--r-- 65 bytes
.gitignore -rw-r--r-- 493 bytes
.mailmap -rw-r--r-- 12.1 KB
CITATION.bib -rw-r--r-- 513 bytes
CITATION.cff -rw-r--r-- 940 bytes
CONTRIBUTING.md -rw-r--r-- 22.5 KB
HISTORY.md -rw-r--r-- 349.5 KB
LICENSE.md -rw-r--r-- 1.3 KB
Make.inc -rw-r--r-- 49.6 KB
Makefile -rw-r--r-- 26.2 KB
NEWS.md -rw-r--r-- 2.6 KB
README.md -rw-r--r-- 7.3 KB
THIRDPARTY.md -rw-r--r-- 3.7 KB
VERSION -rw-r--r-- 10 bytes
julia.spdx.json -rw-r--r-- 35.8 KB
sysimage.mk -rw-r--r-- 4.1 KB

README.md

back to top