pub struct FunctionDataBuilder<'env> {
    pub fun_env: &'env FunctionEnv<'env>,
    pub data: FunctionData,
    pub options: FunctionDataBuilderOptions,
    /* private fields */
}
Expand description

A builder for FunctionData.

Fields

fun_env: &'env FunctionEnv<'env>data: FunctionDataoptions: FunctionDataBuilderOptions

Implementations

Creates a new builder with customized options

Creates a new builder with options set to default values

Gets a function target viewpoint on this builder. This locks the data for mutation until the returned value dies.

Add a return parameter.

Sets the default location as well as information about the verification condition message associated with the next instruction generated with emit_with.

Sets the default location from a code attribute id.

Gets the location from the bytecode attribute.

Creates a new bytecode attribute id with default location.

Creates a new branching label for bytecode.

Emits a bytecode.

Emits a sequence of bytecodes.

Emits a bytecode via a function which takes a freshly generated attribute id.

Emits a Bytecode::Prop based on given kind and expression.

Sets the debug comment which should be associated with the next instruction emitted with self.emit_with(|id| ..).

This will clear the state that the next self.emit_with(..) will add a debug comment.

Emits a let: this creates a new temporary and emits an assumption that this temporary is equal to the given expression. This can be used to abbreviate large expressions which are used multiple times, or get the value of an expression into a temporary for bytecode. Returns the temporary and a local expression referring to it.

Similar to emit_let, but with the temporary created as identical to the dereference of the mutation (if the def argument is a mutable reference).

Emits a new temporary with a havoced value of given type.

Trait Implementations

Get the functional environment

Get the current location

Set the current location

Add a local variable with given type, return the local index.

Get the type of a local given at temp index

Get the global environment

Sets the default location from a node id.

Creates a new expression node id, using current default location, provided type, and optional instantiation. Read more

Allocates a new temporary.

Make a boolean constant expression.

Make an address constant.

Makes a Call expression.

Makes a Call expression with type instantiation.

Makes an if-then-else expression.

Makes a Call expression with boolean result type.

Make a boolean not expression.

Make an equality expression.

Make an identical equality expression. This is stronger than make_equal because it requires the exact same representation, not only interpretation. Read more

Make an and expression.

Make an or expression.

Make an implies expression.

Make an iff expression.

Make a numerical expression for some of the builtin constants.

Join an iterator of boolean expressions with a boolean binary operator.

Join two boolean optional expression with binary operator.

Creates a quantifier over the content of a vector. The passed function f receives an expression representing an element of the vector and returns the quantifiers predicate; if it returns None, this function will also return None, otherwise the quantifier will be returned. Read more

Creates a quantifier over the content of memory. The passed function f receives

Creates a quantifier over the content of instantiated memory. The passed function f receives an expression representing a value in memory and returns the quantifiers predicate; Read more

Makes a local variable declaration.

Makes a symbol from a string.

Makes a type domain expression.

Makes an expression which selects a field from a struct.

Makes an expression for a temporary.

Makes an expression for a named local.

Get’s the memory associated with a Call(Global,..) or Call(Exists, ..) node. Crashes if the the node is not typed as expected. 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 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.