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