Skip to main content

Module bodies

Module bodies 

Source
Expand description

The bodies of functions.

Re-exports§

pub use expressions::*;
pub use places::*;
pub use values::*;

Modules§

expressions
Implements expressions: paths, operands, rvalues, lvalues
places
Implements expressions: paths, operands, rvalues, lvalues
structured
Bodies with structured control-flow (if ... then ... else ..., loop { ... }, etc).
unstructured
Bodies with unstructured control-flow, i.e. with a control-flow graph and GOTOs.
values
Contains definitions for variables and constant values.

Structs§

Assert
Check the value of an operand and abort if the value is not expected. This is introduced to avoid a lot of small branches.
Call
GExprBody
An expression body. TODO: arg_count should be stored in GFunDecl below. But then, the print is obfuscated and Aeneas may need some refactoring.
Local
A variable
LocalId
Locals
The local variables of a body.

Enums§

AbortKind
(U)LLBC is a language with side-effects: a statement may abort in a way that isn’t tracked by control-flow. The three kinds of abort are:
Body
The body of a function.
BorrowckStatement
Statements that only affect borrow-checking. They are no-ops at runtime.
BuiltinAssertKind
The kind of a built-in assertion, which may panic and unwind. These are removed by reconstruct_fallible_operations because they’re implicit in the semantics of (U)LLBC. This kind should only be used for error-reporting purposes, as the check itself is performed in the instructions preceding the assert.
DropKind
A Drop statement/terminator can mean two things, depending on what MIR phase we retrieved from rustc: it could be a real drop, or it could be a “conditional drop”, which is where drop may happen depending on whether the borrow-checker determines a drop is needed.
FnOperand
A function operand is used in function calls. It either designates a top-level function, or a place in case we are using function pointers stored in local variables.