View source code
Display the source code in dmd/dfa/fast/analysis.d from which thispage was generated on github.
Report a bug
If you spot a problem with this page, click here to create aGitHub issue.
Improve this page
Quickly fork, edit online, and submit a pull request for this page.Requires a signed-in GitHub account. This works well for small changes.If you'd like to make larger changes you may want to consider usinglocal clone.

Struct dmd.dfa.fast.analysis.DFAAnalyzer

The core analyzer that manipulates the Lattice state.

struct DFAAnalyzer;

This struct provides the overarching join/meet logic, while the specific merge logic is handled in DFAConsequence.

It is responsible for: - Orchestrating the convergence of scopes (calculating the final state after a block exits). - Managing high-level state transfers between the AST walkers and the internal lattice.

Methods

NameDescription
convergeStatementIf (condition, scrTrue, scrFalse, haveFalseBody, unknownBranchTaken, predicateNegation) Merges the states from the True and False branches of an If statement.
convergeStatementLoopyLabels (containing, loc) Converges a loop or labelled block.
transferAssign (assignTo, construct, isBlit, lr, alteredState, loc, indexLR) Updates the state of a variable after an assignment (a = b).
transferEqual (lhs, rhs, equalityIsTrue, equalityType, isIdentity)

Authors

Richard (Rikki) Andrew Cattermole

License

Boost License 1.0