julia
acfdc881 - effects: redesign the `Effects` data structure (#46180)

Commit
3 years ago
effects: redesign the `Effects` data structure (#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).
Author
Parents
Loading