Skip to main content

AliasingEffect

Enum AliasingEffect 

Source
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.

Fields

§value: Place
§

Mutate

Mutate the value and any direct aliases.

Fields

§value: Place
§

MutateConditionally

Mutate the value conditionally (only if mutable).

Fields

§value: Place
§

MutateTransitive

Mutate the value and transitive captures.

Fields

§value: Place
§

MutateTransitiveConditionally

Mutate the value and transitive captures conditionally.

Fields

§value: Place
§

Capture

Information flow from from to into (non-aliasing capture).

Fields

§from: Place
§into: Place
§

Alias

Direct aliasing: mutation of into implies mutation of from.

Fields

§from: Place
§into: Place
§

MaybeAlias

Potential aliasing relationship.

Fields

§from: Place
§into: Place
§

Assign

Direct assignment: into = from.

Fields

§from: Place
§into: Place
§

Create

Creates a value of the given kind at the given place.

Fields

§into: Place
§

CreateFrom

Creates a new value with the same kind as the source.

Fields

§from: Place
§into: Place
§

ImmutableCapture

Immutable data flow (escape analysis only, no mutable range influence).

Fields

§from: Place
§into: Place
§

Apply

Function call application.

Fields

§receiver: Place
§function: Place
§mutates_function: bool
§into: Place
§

CreateFunction

Function expression creation with captures.

Fields

§captures: Vec<Place>
§function_id: FunctionId
§into: Place
§

MutateFrozen

Mutation of a value known to be frozen (error).

Fields

§place: Place
§

MutateGlobal

Mutation of a global value (error).

Fields

§place: Place
§

Impure

Side-effect not safe during render.

Fields

§place: Place
§

Render

Value is accessed during render.

Fields

§place: Place

Trait Implementations§

Source§

impl Clone for AliasingEffect

Source§

fn clone(&self) -> AliasingEffect

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for AliasingEffect

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.