Skip to main content

Module detect_drop_flags

Module detect_drop_flags 

Source
Expand description

Detect the boolean locals that rustc uses to track whether a place needs to be dropped.

This may miss some drop flags but the ones it detects are guaranteed to be correct, as we do a control-flow analysis to be sure.

Structsยง

AnalysisState ๐Ÿ”’
CheckFlagCorrectness ๐Ÿ”’
For each CFG node and each flag, we record the possible states of both the flag value and initialization status of the corresponding place. We then add an edge to the graph when one can transition between two such states. We then check if an invalid node is reachable; if not, then the boolean flag faithfully represents the initialization status of the place!
ComputeUpdates ๐Ÿ”’
FlagUpdate ๐Ÿ”’
GatherCandidates ๐Ÿ”’
Transform

Enumsยง

AnalysisNode ๐Ÿ”’
FlagStatus ๐Ÿ”’
Update ๐Ÿ”’