View source code
Display the source code in dmd/dfa/fast/expression.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.expression.ExpressionWalker

Visits Expression nodes to track data flow.

struct ExpressionWalker;

This struct implements the logic for how expressions affect the DFA state. It translates AST operations (like +, =, ==) into DFALatticeRef updates.

Methods

NameDescription
seeAssign (assignTo, construct, lr, loc, isBlit, alteredState) Handles variable assignment (e.g., x = y).
seeEqual (lhs, rhs, truthiness, lhsType, rhsType) Handles equality checks (e.g., x == y).
seeEqualIdentity (lhs, rhs, truthiness, lhsType, rhsType) Handles equality checks (e.g., x is y).
walk (expr) The main dispatch loop for expressions.
walkCondition (expr, predicateNegation) Walks an expression that is used for a condition i.e. and if statement. Tells you if the expression for the gate variable, will be exact, vs negated state. Applying by test is for when (expr) > 0, use 0 for unknown, 1 is <= 0 and 2 is > 0

Authors

Richard (Rikki) Andrew Cattermole

License

Boost License 1.0