Skip to main content

Module impls

Module impls 

Source

ModulesΒ§

borrowed_locals πŸ”’
initialized πŸ”’
liveness πŸ”’
precise_liveness πŸ”’
Computes the points where each local must have a distinct allocation.
storage_liveness πŸ”’

StructsΒ§

EverInitializedPlaces
EverInitializedPlaces tracks all initializations of locals that may have occurred upon reaching a particular point in the control flow for a function, without an intervening StorageDead.
LivenessTransferFunction
MaybeBorrowedLocals
A dataflow analysis that tracks whether a pointer or reference could possibly exist that points to a given local. This analysis ignores fake borrows, so it should not be used by borrowck.
MaybeInitializedPlaces
MaybeInitializedPlaces tracks all places that might be initialized upon reaching a particular point in the control flow for a function.
MaybeLiveLocals
A live-variable dataflow analysis.
MaybeRequiresStorage
Dataflow analysis that determines whether each local requires storage at a given location; i.e. whether its storage can go away without being observed.
MaybeStorageDead
MaybeStorageLive
MaybeTransitiveLiveLocals
Like MaybeLiveLocals (and layered on top of MaybeLiveLocals), but does not mark locals as live if they are used in a dead assignment.
MaybeUninitializedPlaces
MaybeUninitializedPlaces tracks all places that might be uninitialized upon reaching a particular point in the control flow for a function.
SplitPointIndex
A PointIndex with the lower bit encoding early/late inside a statement.
VisitAllocatedLocalsWith
Visits locals that are implicitly allocated by a statement or terminator as part of destination place evaluation.
VisitDeallocatedLocalsWith
Visits locals that are implicitly freed by being evaluated as a bare-local move operand or through a storage statement.

EnumsΒ§

DefUse
SplitPointEffect
Different β€œphases” of a single MIR statement, used to describe how overlapping operands are handled.

FunctionsΒ§

always_storage_live_locals
The set of locals in a MIR body that do not have StorageLive/StorageDead annotations.
borrowed_locals
The set of locals that are borrowed at some point in the MIR body.
dump_liveness_matrix
liveness_matrix

Type AliasesΒ§

EverInitializedPlacesDomain
MaybeUninitializedPlacesDomain
There can be many more MovePathIndex than there are locals in a MIR body. We use a mixed bitset to avoid paying too high a memory footprint.