pub struct FunctionData {
Show 14 fields pub variant: FunctionVariant, pub type_args: Vec<Type>, pub code: Vec<Bytecode>, pub local_types: Vec<Type>, pub return_types: Vec<Type>, pub acquires_global_resources: Vec<StructId>, pub locations: BTreeMap<AttrId, Loc>, pub loop_invariants: BTreeSet<AttrId>, pub debug_comments: BTreeMap<AttrId, String>, pub vc_infos: BTreeMap<AttrId, String>, pub annotations: Annotations, pub name_to_index: BTreeMap<Symbol, usize>, pub modify_targets: BTreeMap<QualifiedId<StructId>, Vec<Exp>>, pub ghost_type_param_count: usize,
}
Expand description

Holds the owned data belonging to a FunctionTarget, contained in a FunctionTargetsHolder.

Fields

variant: FunctionVariant

The function variant.

type_args: Vec<Type>

The type instantiation.

code: Vec<Bytecode>

The bytecode.

local_types: Vec<Type>

The locals, including parameters.

return_types: Vec<Type>

The return types.

acquires_global_resources: Vec<StructId>

The set of global resources acquired by this function.

locations: BTreeMap<AttrId, Loc>

A map from byte code attribute to source code location.

loop_invariants: BTreeSet<AttrId>

The set of asserts that represent loop invariants

debug_comments: BTreeMap<AttrId, String>

A map from byte code attribute to comments associated with this bytecode. These comments are generated by transformations and are intended for internal debugging when the bytecode is dumped.

vc_infos: BTreeMap<AttrId, String>

A map from byte code attribute to a message to be printed out if verification fails at this bytecode.

annotations: Annotations

Annotations associated with this function. This is shared between multiple function variants.

name_to_index: BTreeMap<Symbol, usize>

A mapping from symbolic names to temporaries.

modify_targets: BTreeMap<QualifiedId<StructId>, Vec<Exp>>

A cache of targets modified by this function.

ghost_type_param_count: usize

The number of ghost type parameters introduced in order to instantiate related invariants

Implementations

Creates new function target data.

Computes the next available index for AttrId.

Computes the next available index for Label.

Apply a variable renaming to this data, adjusting internal data structures.

Fork this function data, without annotations, and mark it as the given variant.

Fork this function data with (potentially partial) instantiations.

Get the instantiation of this function as a vector of types.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

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

Should always be Self

The resulting type after obtaining ownership.

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

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

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.