3 types derived from ValueDispatchNode
Microsoft.CodeAnalysis.CSharp (3)
Lowering\LocalRewriter\LocalRewriter.DecisionDagRewriter.ValueDispatchNode.cs (3)
36
internal sealed class SwitchDispatch :
ValueDispatchNode
51
internal sealed class LeafDispatchNode :
ValueDispatchNode
69
internal sealed class RelationalDispatch :
ValueDispatchNode
57 references to ValueDispatchNode
Microsoft.CodeAnalysis.CSharp (57)
Lowering\LocalRewriter\LocalRewriter.DecisionDagRewriter.cs (25)
506
ValueDispatchNode
n = GatherValueDispatchNodes(node, loweredNodes, input);
550
private
ValueDispatchNode
GatherValueDispatchNodes(
559
private
ValueDispatchNode
GatherValueDispatchNodes(
569
return new
ValueDispatchNode
.LeafDispatchNode(node.Syntax, label);
574
return new
ValueDispatchNode
.LeafDispatchNode(node.Syntax, label);
582
var
whenTrue = GatherValueDispatchNodes(testNode.WhenTrue, loweredNodes, input, fac);
583
var
whenFalse = GatherValueDispatchNodes(testNode.WhenFalse, loweredNodes, input, fac);
584
return
ValueDispatchNode
.RelationalDispatch.CreateBalanced(testNode.Syntax, relational.Value, relational.OperatorKind, whenTrue: whenTrue, whenFalse: whenFalse);
604
var
otherwise = GatherValueDispatchNodes(previous.WhenFalse, loweredNodes, input, fac);
610
return new
ValueDispatchNode
.LeafDispatchNode(node.Syntax, label);
618
private
ValueDispatchNode
PushEqualityTestsIntoTree(
620
ValueDispatchNode
otherwise,
629
case
ValueDispatchNode
.LeafDispatchNode leaf:
630
return new
ValueDispatchNode
.SwitchDispatch(syntax, cases, leaf.Label);
631
case
ValueDispatchNode
.SwitchDispatch sd:
632
return new
ValueDispatchNode
.SwitchDispatch(sd.Syntax, sd.Cases.Concat(cases), sd.Otherwise);
633
case
ValueDispatchNode
.RelationalDispatch { Operator: var op, Value: var value, WhenTrue: var whenTrue, WhenFalse: var whenFalse } rel:
659
private void LowerValueDispatchNode(
ValueDispatchNode
n, BoundExpression input)
663
case
ValueDispatchNode
.LeafDispatchNode leaf:
666
case
ValueDispatchNode
.SwitchDispatch eq:
669
case
ValueDispatchNode
.RelationalDispatch rel:
677
private void LowerRelationalDispatchNode(
ValueDispatchNode
.RelationalDispatch rel, BoundExpression input)
680
if (rel.WhenTrue is
ValueDispatchNode
.LeafDispatchNode whenTrue)
686
else if (rel.WhenFalse is
ValueDispatchNode
.LeafDispatchNode whenFalse)
743
private void LowerSwitchDispatchNode(
ValueDispatchNode
.SwitchDispatch node, BoundExpression input)
Lowering\LocalRewriter\LocalRewriter.DecisionDagRewriter.ValueDispatchNode.cs (32)
83
private
ValueDispatchNode
Left { get; set; }
85
private
ValueDispatchNode
Right { get; set; }
86
private RelationalDispatch(SyntaxNode syntax, ConstantValue value, BinaryOperatorKind op,
ValueDispatchNode
left,
ValueDispatchNode
right) : base(syntax)
93
public
ValueDispatchNode
WhenTrue => IsReversed(Operator) ? Right : Left;
94
public
ValueDispatchNode
WhenFalse => IsReversed(Operator) ? Left : Right;
102
private RelationalDispatch WithLeftAndRight(
ValueDispatchNode
left,
ValueDispatchNode
right)
122
public RelationalDispatch WithTrueAndFalseChildren(
ValueDispatchNode
whenTrue,
ValueDispatchNode
whenFalse)
133
public static
ValueDispatchNode
CreateBalanced(SyntaxNode syntax, ConstantValue value, BinaryOperatorKind op,
ValueDispatchNode
whenTrue,
ValueDispatchNode
whenFalse)
140
private static
ValueDispatchNode
CreateBalancedCore(SyntaxNode syntax, ConstantValue value, BinaryOperatorKind op,
ValueDispatchNode
left,
ValueDispatchNode
right)
151
var
newRight = CreateBalancedCore(syntax, value, op, left: l.Right, right: right);
157
var
newLeft = CreateBalancedCore(syntax, value, op, left: left, right: r.Left);
181
var
A = x.Left;
183
var
B = y.Left;
184
var
C = y.Right;
185
var
D = right;
201
var
x = y.Left;
202
var
C = y.Right;
203
var
D = right;
221
var
A = left;
224
var
B = y.Left;
225
var
C = y.Right;
226
var
D = z.Right;
241
var
A = left;
243
var
B = y.Left;
244
var
z = y.Right;