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)
505
ValueDispatchNode
n = GatherValueDispatchNodes(node, loweredNodes, input);
549
private
ValueDispatchNode
GatherValueDispatchNodes(
558
private
ValueDispatchNode
GatherValueDispatchNodes(
568
return new
ValueDispatchNode
.LeafDispatchNode(node.Syntax, label);
573
return new
ValueDispatchNode
.LeafDispatchNode(node.Syntax, label);
581
var
whenTrue = GatherValueDispatchNodes(testNode.WhenTrue, loweredNodes, input, fac);
582
var
whenFalse = GatherValueDispatchNodes(testNode.WhenFalse, loweredNodes, input, fac);
583
return
ValueDispatchNode
.RelationalDispatch.CreateBalanced(testNode.Syntax, relational.Value, relational.OperatorKind, whenTrue: whenTrue, whenFalse: whenFalse);
603
var
otherwise = GatherValueDispatchNodes(previous.WhenFalse, loweredNodes, input, fac);
609
return new
ValueDispatchNode
.LeafDispatchNode(node.Syntax, label);
617
private
ValueDispatchNode
PushEqualityTestsIntoTree(
619
ValueDispatchNode
otherwise,
628
case
ValueDispatchNode
.LeafDispatchNode leaf:
629
return new
ValueDispatchNode
.SwitchDispatch(syntax, cases, leaf.Label);
630
case
ValueDispatchNode
.SwitchDispatch sd:
631
return new
ValueDispatchNode
.SwitchDispatch(sd.Syntax, sd.Cases.Concat(cases), sd.Otherwise);
632
case
ValueDispatchNode
.RelationalDispatch { Operator: var op, Value: var value, WhenTrue: var whenTrue, WhenFalse: var whenFalse } rel:
658
private void LowerValueDispatchNode(
ValueDispatchNode
n, BoundExpression input)
662
case
ValueDispatchNode
.LeafDispatchNode leaf:
665
case
ValueDispatchNode
.SwitchDispatch eq:
668
case
ValueDispatchNode
.RelationalDispatch rel:
676
private void LowerRelationalDispatchNode(
ValueDispatchNode
.RelationalDispatch rel, BoundExpression input)
679
if (rel.WhenTrue is
ValueDispatchNode
.LeafDispatchNode whenTrue)
685
else if (rel.WhenFalse is
ValueDispatchNode
.LeafDispatchNode whenFalse)
742
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;