forked from JuliaLang/julia
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
effects: redesign the
Effects
data structure (JuliaLang#46180)
This commit stops representing each effect property as `TriState` but represents them as `UInt8` or `Bool` directly. The motivation is that the tri-state representation hasn't been used actually and rather the incoming improvements on the analysis want to represent some effects as bits to propagate more information. For example, `:consistent`-cy is represented as `UInt8`, where currently it has the following meanings: - `const ALWAYS_TRUE = 0x00` - `const ALWAYS_FALSE = 0x01` - `const CONSISTENT_IF_NOTRETURNED = 0x02`: the `:consistent`-cy can be refined using the return type information later in a case when allocated mutable objects are never returned and I'm also planning to add `const CONSISTENT_IF_NOGLOBAL = 0x04`, that allows us to improve the analysis accuracy by refining the `:consistent`-cy using new effect property that tracks escapability of mutable objects (and actually the similar improvement can be added for `:effect_free`-ness by changing its type from `Bool` to `UInt8` as like `:consistent`-cy).
- Loading branch information
Showing
8 changed files
with
192 additions
and
190 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
Oops, something went wrong.