File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -615,8 +615,11 @@ struct Graph : public UnifiedExpressionVisitor<Graph, Node*> {
615615 }
616616
617617 // Merge local state for an if, also creating a block and conditions.
618- void mergeIf (Locals& aState,
619- Locals& bState,
618+ // ifTrueState is the state if the condition is true, while otherState is
619+ // the state otherwise (either from before the if, if there is no other arm,
620+ // or the else arm if there is).
621+ void mergeIf (Locals& ifTrueState,
622+ Locals& otherState,
620623 Node* condition,
621624 Expression* expr,
622625 Locals& out) {
@@ -635,11 +638,11 @@ struct Graph : public UnifiedExpressionVisitor<Graph, Node*> {
635638 }
636639 // Finally, merge the state with that block. TODO optimize
637640 std::vector<FlowState> states;
638- if (!isInUnreachable (aState )) {
639- states.emplace_back (aState , ifTrue);
641+ if (!isInUnreachable (ifTrueState )) {
642+ states.emplace_back (ifTrueState , ifTrue);
640643 }
641- if (!isInUnreachable (bState )) {
642- states.emplace_back (bState , ifFalse);
644+ if (!isInUnreachable (otherState )) {
645+ states.emplace_back (otherState , ifFalse);
643646 }
644647 merge (states, out);
645648 }
You can’t perform that action at this time.
0 commit comments