pub enum AliasingEffect {
Show 18 variants
Freeze {
value: Place,
reason: ValueReason,
},
Mutate {
value: Place,
reason: Option<MutationReason>,
},
MutateConditionally {
value: Place,
},
MutateTransitive {
value: Place,
},
MutateTransitiveConditionally {
value: Place,
},
Capture {
from: Place,
into: Place,
},
Alias {
from: Place,
into: Place,
},
MaybeAlias {
from: Place,
into: Place,
},
Assign {
from: Place,
into: Place,
},
Create {
into: Place,
value: ValueKind,
reason: ValueReason,
},
CreateFrom {
from: Place,
into: Place,
},
ImmutableCapture {
from: Place,
into: Place,
},
Apply {
receiver: Place,
function: Place,
mutates_function: bool,
args: Vec<PlaceOrSpreadOrHole>,
into: Place,
signature: Option<FunctionSignature>,
loc: Option<SourceLocation>,
},
CreateFunction {
captures: Vec<Place>,
function_id: FunctionId,
into: Place,
},
MutateFrozen {
place: Place,
error: CompilerDiagnostic,
},
MutateGlobal {
place: Place,
error: CompilerDiagnostic,
},
Impure {
place: Place,
error: CompilerDiagnostic,
},
Render {
place: Place,
},
}Expand description
Describes the aliasing/mutation/data-flow effects of an instruction or terminal.
Ported from TS AliasingEffect in AliasingEffects.ts.
Variants§
Freeze
Marks the given value and its direct aliases as frozen.
Mutate
Mutate the value and any direct aliases.
MutateConditionally
Mutate the value conditionally (only if mutable).
MutateTransitive
Mutate the value and transitive captures.
MutateTransitiveConditionally
Mutate the value and transitive captures conditionally.
Capture
Information flow from from to into (non-aliasing capture).
Alias
Direct aliasing: mutation of into implies mutation of from.
MaybeAlias
Potential aliasing relationship.
Assign
Direct assignment: into = from.
Create
Creates a value of the given kind at the given place.
CreateFrom
Creates a new value with the same kind as the source.
ImmutableCapture
Immutable data flow (escape analysis only, no mutable range influence).
Apply
Function call application.
Fields
args: Vec<PlaceOrSpreadOrHole>signature: Option<FunctionSignature>loc: Option<SourceLocation>CreateFunction
Function expression creation with captures.
MutateFrozen
Mutation of a value known to be frozen (error).
MutateGlobal
Mutation of a global value (error).
Impure
Side-effect not safe during render.
Render
Value is accessed during render.
Trait Implementations§
Source§impl Clone for AliasingEffect
impl Clone for AliasingEffect
Source§fn clone(&self) -> AliasingEffect
fn clone(&self) -> AliasingEffect
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more