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
- GExpr
Body - 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§
- Abort
Kind - (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.
- Borrowck
Statement - Statements that only affect borrow-checking. They are no-ops at runtime.
- Builtin
Assert Kind - The kind of a built-in assertion, which may panic and unwind. These are removed
by
reconstruct_fallible_operationsbecause 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. - Drop
Kind - A
Dropstatement/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.