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