Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
lwm1986
roslyn
提交
492ff7ba
R
roslyn
项目概览
lwm1986
/
roslyn
与 Fork 源项目一致
从无法访问的项目Fork
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
R
roslyn
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
未验证
提交
492ff7ba
编写于
5月 05, 2020
作者:
S
Sam Harwell
提交者:
GitHub
5月 05, 2020
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #43982 from sharwell/rm-space
Remove trailing space from BoundDecisionDagNode
上级
26222e1a
2446eaba
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
46 addition
and
47 deletion
+46
-47
src/Compilers/CSharp/Portable/BoundTree/BoundNodes.xml
src/Compilers/CSharp/Portable/BoundTree/BoundNodes.xml
+10
-10
src/Compilers/CSharp/Portable/Generated/BoundNodes.xml.Generated.cs
...ers/CSharp/Portable/Generated/BoundNodes.xml.Generated.cs
+36
-37
未找到文件。
src/Compilers/CSharp/Portable/BoundTree/BoundNodes.xml
浏览文件 @
492ff7ba
...
@@ -1307,31 +1307,31 @@
...
@@ -1307,31 +1307,31 @@
<Field
Name=
"RootNode"
Type=
"BoundDecisionDagNode"
Null=
"disallow"
/>
<Field
Name=
"RootNode"
Type=
"BoundDecisionDagNode"
Null=
"disallow"
/>
</Node>
</Node>
<AbstractNode
Name=
"BoundDecisionDagNode
"
Base=
"BoundNode"
>
<AbstractNode
Name=
"BoundDecisionDagNode"
Base=
"BoundNode"
>
</AbstractNode>
</AbstractNode>
<!-- This node is used to indicate a point in the decision dag where an evaluation is performed, such as invoking Deconstruct. -->
<!-- This node is used to indicate a point in the decision dag where an evaluation is performed, such as invoking Deconstruct. -->
<Node
Name=
"BoundEvaluationDecisionDagNode"
Base=
"BoundDecisionDagNode
"
>
<Node
Name=
"BoundEvaluationDecisionDagNode"
Base=
"BoundDecisionDagNode"
>
<Field
Name=
"Evaluation"
Type=
"BoundDagEvaluation"
Null=
"disallow"
/>
<Field
Name=
"Evaluation"
Type=
"BoundDagEvaluation"
Null=
"disallow"
/>
<Field
Name=
"Next"
Type=
"BoundDecisionDagNode
"
Null=
"disallow"
/>
<Field
Name=
"Next"
Type=
"BoundDecisionDagNode"
Null=
"disallow"
/>
</Node>
</Node>
<!-- This node is used to indicate a point in the decision dag where a test may change the path of the decision dag. -->
<!-- This node is used to indicate a point in the decision dag where a test may change the path of the decision dag. -->
<Node
Name=
"BoundTestDecisionDagNode"
Base=
"BoundDecisionDagNode
"
>
<Node
Name=
"BoundTestDecisionDagNode"
Base=
"BoundDecisionDagNode"
>
<Field
Name=
"Test"
Type=
"BoundDagTest"
Null=
"disallow"
/>
<Field
Name=
"Test"
Type=
"BoundDagTest"
Null=
"disallow"
/>
<Field
Name=
"WhenTrue"
Type=
"BoundDecisionDagNode
"
Null=
"disallow"
/>
<Field
Name=
"WhenTrue"
Type=
"BoundDecisionDagNode"
Null=
"disallow"
/>
<Field
Name=
"WhenFalse"
Type=
"BoundDecisionDagNode
"
Null=
"disallow"
/>
<Field
Name=
"WhenFalse"
Type=
"BoundDecisionDagNode"
Null=
"disallow"
/>
</Node>
</Node>
<Node
Name=
"BoundWhenDecisionDagNode"
Base=
"BoundDecisionDagNode
"
>
<Node
Name=
"BoundWhenDecisionDagNode"
Base=
"BoundDecisionDagNode"
>
<Field
Name=
"Bindings"
Type=
"ImmutableArray<BoundPatternBinding>"
Null=
"disallow"
/>
<Field
Name=
"Bindings"
Type=
"ImmutableArray<BoundPatternBinding>"
Null=
"disallow"
/>
<!--
<!--
WhenExpression is null when there was no when clause in source but there are bindings.
WhenExpression is null when there was no when clause in source but there are bindings.
In that case WhenFalse is null.
In that case WhenFalse is null.
-->
-->
<Field
Name=
"WhenExpression"
Type=
"BoundExpression?"
/>
<Field
Name=
"WhenExpression"
Type=
"BoundExpression?"
/>
<Field
Name=
"WhenTrue"
Type=
"BoundDecisionDagNode
"
Null=
"disallow"
/>
<Field
Name=
"WhenTrue"
Type=
"BoundDecisionDagNode"
Null=
"disallow"
/>
<Field
Name=
"WhenFalse"
Type=
"BoundDecisionDagNode
?"
/>
<Field
Name=
"WhenFalse"
Type=
"BoundDecisionDagNode?"
/>
</Node>
</Node>
<!-- This node is used to indicate a point in the decision dag where the decision has been completed. -->
<!-- This node is used to indicate a point in the decision dag where the decision has been completed. -->
<Node
Name=
"BoundLeafDecisionDagNode"
Base=
"BoundDecisionDagNode
"
>
<Node
Name=
"BoundLeafDecisionDagNode"
Base=
"BoundDecisionDagNode"
>
<Field
Name=
"Label"
Type=
"LabelSymbol"
/>
<Field
Name=
"Label"
Type=
"LabelSymbol"
/>
</Node>
</Node>
...
...
src/Compilers/CSharp/Portable/Generated/BoundNodes.xml.Generated.cs
浏览文件 @
492ff7ba
...
@@ -4410,17 +4410,8 @@ public BoundConvertedSwitchExpression Update(TypeSymbol? naturalTypeOpt, bool wa
...
@@ -4410,17 +4410,8 @@ public BoundConvertedSwitchExpression Update(TypeSymbol? naturalTypeOpt, bool wa
internal sealed partial class BoundDecisionDag : BoundNode
internal sealed partial class BoundDecisionDag : BoundNode
{
{
public BoundDecisionDag(SyntaxNode syntax, BoundDecisionDagNode rootNode, bool hasErrors)
public BoundDecisionDag(SyntaxNode syntax, BoundDecisionDagNode rootNode, bool hasErrors = false)
: base(BoundKind.DecisionDag, syntax, hasErrors)
: base(BoundKind.DecisionDag, syntax, hasErrors || rootNode.HasErrors())
{
RoslynDebug.Assert(rootNode is object, "Field 'rootNode' cannot be null (make the type nullable in BoundNodes.xml to remove this check)");
this.RootNode = rootNode;
}
public BoundDecisionDag(SyntaxNode syntax, BoundDecisionDagNode rootNode)
: base(BoundKind.DecisionDag, syntax)
{
{
RoslynDebug.Assert(rootNode is object, "Field 'rootNode' cannot be null (make the type nullable in BoundNodes.xml to remove this check)");
RoslynDebug.Assert(rootNode is object, "Field 'rootNode' cannot be null (make the type nullable in BoundNodes.xml to remove this check)");
...
@@ -4445,23 +4436,23 @@ public BoundDecisionDag Update(BoundDecisionDagNode rootNode)
...
@@ -4445,23 +4436,23 @@ public BoundDecisionDag Update(BoundDecisionDagNode rootNode)
}
}
}
}
internal abstract partial class BoundDecisionDagNode
: BoundNode
internal abstract partial class BoundDecisionDagNode : BoundNode
{
{
protected BoundDecisionDagNode
(BoundKind kind, SyntaxNode syntax, bool hasErrors)
protected BoundDecisionDagNode(BoundKind kind, SyntaxNode syntax, bool hasErrors)
: base(kind, syntax, hasErrors)
: base(kind, syntax, hasErrors)
{
{
}
}
protected BoundDecisionDagNode
(BoundKind kind, SyntaxNode syntax)
protected BoundDecisionDagNode(BoundKind kind, SyntaxNode syntax)
: base(kind, syntax)
: base(kind, syntax)
{
{
}
}
}
}
internal sealed partial class BoundEvaluationDecisionDagNode : BoundDecisionDagNode
internal sealed partial class BoundEvaluationDecisionDagNode : BoundDecisionDagNode
{
{
public BoundEvaluationDecisionDagNode(SyntaxNode syntax, BoundDagEvaluation evaluation, BoundDecisionDagNode
next, bool hasErrors = false)
public BoundEvaluationDecisionDagNode(SyntaxNode syntax, BoundDagEvaluation evaluation, BoundDecisionDagNode next, bool hasErrors = false)
: base(BoundKind.EvaluationDecisionDagNode, syntax, hasErrors || evaluation.HasErrors() || next.HasErrors())
: base(BoundKind.EvaluationDecisionDagNode, syntax, hasErrors || evaluation.HasErrors() || next.HasErrors())
{
{
...
@@ -4475,11 +4466,11 @@ public BoundEvaluationDecisionDagNode(SyntaxNode syntax, BoundDagEvaluation eval
...
@@ -4475,11 +4466,11 @@ public BoundEvaluationDecisionDagNode(SyntaxNode syntax, BoundDagEvaluation eval
public BoundDagEvaluation Evaluation { get; }
public BoundDagEvaluation Evaluation { get; }
public BoundDecisionDagNode
Next { get; }
public BoundDecisionDagNode Next { get; }
[DebuggerStepThrough]
[DebuggerStepThrough]
public override BoundNode? Accept(BoundTreeVisitor visitor) => visitor.VisitEvaluationDecisionDagNode(this);
public override BoundNode? Accept(BoundTreeVisitor visitor) => visitor.VisitEvaluationDecisionDagNode(this);
public BoundEvaluationDecisionDagNode Update(BoundDagEvaluation evaluation, BoundDecisionDagNode
next)
public BoundEvaluationDecisionDagNode Update(BoundDagEvaluation evaluation, BoundDecisionDagNode next)
{
{
if (evaluation != this.Evaluation || next != this.Next)
if (evaluation != this.Evaluation || next != this.Next)
{
{
...
@@ -4491,9 +4482,9 @@ public BoundEvaluationDecisionDagNode Update(BoundDagEvaluation evaluation, Boun
...
@@ -4491,9 +4482,9 @@ public BoundEvaluationDecisionDagNode Update(BoundDagEvaluation evaluation, Boun
}
}
}
}
internal sealed partial class BoundTestDecisionDagNode : BoundDecisionDagNode
internal sealed partial class BoundTestDecisionDagNode : BoundDecisionDagNode
{
{
public BoundTestDecisionDagNode(SyntaxNode syntax, BoundDagTest test, BoundDecisionDagNode
whenTrue, BoundDecisionDagNode
whenFalse, bool hasErrors = false)
public BoundTestDecisionDagNode(SyntaxNode syntax, BoundDagTest test, BoundDecisionDagNode
whenTrue, BoundDecisionDagNode
whenFalse, bool hasErrors = false)
: base(BoundKind.TestDecisionDagNode, syntax, hasErrors || test.HasErrors() || whenTrue.HasErrors() || whenFalse.HasErrors())
: base(BoundKind.TestDecisionDagNode, syntax, hasErrors || test.HasErrors() || whenTrue.HasErrors() || whenFalse.HasErrors())
{
{
...
@@ -4509,13 +4500,13 @@ public BoundTestDecisionDagNode(SyntaxNode syntax, BoundDagTest test, BoundDecis
...
@@ -4509,13 +4500,13 @@ public BoundTestDecisionDagNode(SyntaxNode syntax, BoundDagTest test, BoundDecis
public BoundDagTest Test { get; }
public BoundDagTest Test { get; }
public BoundDecisionDagNode
WhenTrue { get; }
public BoundDecisionDagNode WhenTrue { get; }
public BoundDecisionDagNode
WhenFalse { get; }
public BoundDecisionDagNode WhenFalse { get; }
[DebuggerStepThrough]
[DebuggerStepThrough]
public override BoundNode? Accept(BoundTreeVisitor visitor) => visitor.VisitTestDecisionDagNode(this);
public override BoundNode? Accept(BoundTreeVisitor visitor) => visitor.VisitTestDecisionDagNode(this);
public BoundTestDecisionDagNode Update(BoundDagTest test, BoundDecisionDagNode
whenTrue, BoundDecisionDagNode
whenFalse)
public BoundTestDecisionDagNode Update(BoundDagTest test, BoundDecisionDagNode
whenTrue, BoundDecisionDagNode
whenFalse)
{
{
if (test != this.Test || whenTrue != this.WhenTrue || whenFalse != this.WhenFalse)
if (test != this.Test || whenTrue != this.WhenTrue || whenFalse != this.WhenFalse)
{
{
...
@@ -4527,9 +4518,9 @@ public BoundTestDecisionDagNode Update(BoundDagTest test, BoundDecisionDagNode
...
@@ -4527,9 +4518,9 @@ public BoundTestDecisionDagNode Update(BoundDagTest test, BoundDecisionDagNode
}
}
}
}
internal sealed partial class BoundWhenDecisionDagNode : BoundDecisionDagNode
internal sealed partial class BoundWhenDecisionDagNode : BoundDecisionDagNode
{
{
public BoundWhenDecisionDagNode(SyntaxNode syntax, ImmutableArray<BoundPatternBinding> bindings, BoundExpression? whenExpression, BoundDecisionDagNode
whenTrue, BoundDecisionDagNode
? whenFalse, bool hasErrors = false)
public BoundWhenDecisionDagNode(SyntaxNode syntax, ImmutableArray<BoundPatternBinding> bindings, BoundExpression? whenExpression, BoundDecisionDagNode
whenTrue, BoundDecisionDagNode
? whenFalse, bool hasErrors = false)
: base(BoundKind.WhenDecisionDagNode, syntax, hasErrors || whenExpression.HasErrors() || whenTrue.HasErrors() || whenFalse.HasErrors())
: base(BoundKind.WhenDecisionDagNode, syntax, hasErrors || whenExpression.HasErrors() || whenTrue.HasErrors() || whenFalse.HasErrors())
{
{
...
@@ -4547,13 +4538,13 @@ public BoundWhenDecisionDagNode(SyntaxNode syntax, ImmutableArray<BoundPatternBi
...
@@ -4547,13 +4538,13 @@ public BoundWhenDecisionDagNode(SyntaxNode syntax, ImmutableArray<BoundPatternBi
public BoundExpression? WhenExpression { get; }
public BoundExpression? WhenExpression { get; }
public BoundDecisionDagNode
WhenTrue { get; }
public BoundDecisionDagNode WhenTrue { get; }
public BoundDecisionDagNode
? WhenFalse { get; }
public BoundDecisionDagNode? WhenFalse { get; }
[DebuggerStepThrough]
[DebuggerStepThrough]
public override BoundNode? Accept(BoundTreeVisitor visitor) => visitor.VisitWhenDecisionDagNode(this);
public override BoundNode? Accept(BoundTreeVisitor visitor) => visitor.VisitWhenDecisionDagNode(this);
public BoundWhenDecisionDagNode Update(ImmutableArray<BoundPatternBinding> bindings, BoundExpression? whenExpression, BoundDecisionDagNode
whenTrue, BoundDecisionDagNode
? whenFalse)
public BoundWhenDecisionDagNode Update(ImmutableArray<BoundPatternBinding> bindings, BoundExpression? whenExpression, BoundDecisionDagNode
whenTrue, BoundDecisionDagNode
? whenFalse)
{
{
if (bindings != this.Bindings || whenExpression != this.WhenExpression || whenTrue != this.WhenTrue || whenFalse != this.WhenFalse)
if (bindings != this.Bindings || whenExpression != this.WhenExpression || whenTrue != this.WhenTrue || whenFalse != this.WhenFalse)
{
{
...
@@ -4565,7 +4556,7 @@ public BoundWhenDecisionDagNode Update(ImmutableArray<BoundPatternBinding> bindi
...
@@ -4565,7 +4556,7 @@ public BoundWhenDecisionDagNode Update(ImmutableArray<BoundPatternBinding> bindi
}
}
}
}
internal sealed partial class BoundLeafDecisionDagNode : BoundDecisionDagNode
internal sealed partial class BoundLeafDecisionDagNode : BoundDecisionDagNode
{
{
public BoundLeafDecisionDagNode(SyntaxNode syntax, LabelSymbol label, bool hasErrors)
public BoundLeafDecisionDagNode(SyntaxNode syntax, LabelSymbol label, bool hasErrors)
: base(BoundKind.LeafDecisionDagNode, syntax, hasErrors)
: base(BoundKind.LeafDecisionDagNode, syntax, hasErrors)
...
@@ -9005,7 +8996,11 @@ internal abstract partial class BoundTreeWalker: BoundTreeVisitor
...
@@ -9005,7 +8996,11 @@ internal abstract partial class BoundTreeWalker: BoundTreeVisitor
this.VisitList(node.SwitchArms);
this.VisitList(node.SwitchArms);
return null;
return null;
}
}
public override BoundNode? VisitDecisionDag(BoundDecisionDag node) => null;
public override BoundNode? VisitDecisionDag(BoundDecisionDag node)
{
this.Visit(node.RootNode);
return null;
}
public override BoundNode? VisitEvaluationDecisionDagNode(BoundEvaluationDecisionDagNode node)
public override BoundNode? VisitEvaluationDecisionDagNode(BoundEvaluationDecisionDagNode node)
{
{
this.Visit(node.Evaluation);
this.Visit(node.Evaluation);
...
@@ -10048,25 +10043,29 @@ internal abstract partial class BoundTreeRewriter : BoundTreeVisitor
...
@@ -10048,25 +10043,29 @@ internal abstract partial class BoundTreeRewriter : BoundTreeVisitor
TypeSymbol? type = this.VisitType(node.Type);
TypeSymbol? type = this.VisitType(node.Type);
return node.Update(naturalTypeOpt, node.WasTargetTyped, expression, switchArms, decisionDag, node.DefaultLabel, node.ReportedNotExhaustive, type);
return node.Update(naturalTypeOpt, node.WasTargetTyped, expression, switchArms, decisionDag, node.DefaultLabel, node.ReportedNotExhaustive, type);
}
}
public override BoundNode? VisitDecisionDag(BoundDecisionDag node) => node;
public override BoundNode? VisitDecisionDag(BoundDecisionDag node)
{
BoundDecisionDagNode rootNode = (BoundDecisionDagNode)this.Visit(node.RootNode);
return node.Update(rootNode);
}
public override BoundNode? VisitEvaluationDecisionDagNode(BoundEvaluationDecisionDagNode node)
public override BoundNode? VisitEvaluationDecisionDagNode(BoundEvaluationDecisionDagNode node)
{
{
BoundDagEvaluation evaluation = (BoundDagEvaluation)this.Visit(node.Evaluation);
BoundDagEvaluation evaluation = (BoundDagEvaluation)this.Visit(node.Evaluation);
BoundDecisionDagNode
next = (BoundDecisionDagNode
)this.Visit(node.Next);
BoundDecisionDagNode
next = (BoundDecisionDagNode
)this.Visit(node.Next);
return node.Update(evaluation, next);
return node.Update(evaluation, next);
}
}
public override BoundNode? VisitTestDecisionDagNode(BoundTestDecisionDagNode node)
public override BoundNode? VisitTestDecisionDagNode(BoundTestDecisionDagNode node)
{
{
BoundDagTest test = (BoundDagTest)this.Visit(node.Test);
BoundDagTest test = (BoundDagTest)this.Visit(node.Test);
BoundDecisionDagNode
whenTrue = (BoundDecisionDagNode
)this.Visit(node.WhenTrue);
BoundDecisionDagNode
whenTrue = (BoundDecisionDagNode
)this.Visit(node.WhenTrue);
BoundDecisionDagNode
whenFalse = (BoundDecisionDagNode
)this.Visit(node.WhenFalse);
BoundDecisionDagNode
whenFalse = (BoundDecisionDagNode
)this.Visit(node.WhenFalse);
return node.Update(test, whenTrue, whenFalse);
return node.Update(test, whenTrue, whenFalse);
}
}
public override BoundNode? VisitWhenDecisionDagNode(BoundWhenDecisionDagNode node)
public override BoundNode? VisitWhenDecisionDagNode(BoundWhenDecisionDagNode node)
{
{
BoundExpression? whenExpression = (BoundExpression?)this.Visit(node.WhenExpression);
BoundExpression? whenExpression = (BoundExpression?)this.Visit(node.WhenExpression);
BoundDecisionDagNode
whenTrue = (BoundDecisionDagNode
)this.Visit(node.WhenTrue);
BoundDecisionDagNode
whenTrue = (BoundDecisionDagNode
)this.Visit(node.WhenTrue);
BoundDecisionDagNode
? whenFalse = (BoundDecisionDagNode
?)this.Visit(node.WhenFalse);
BoundDecisionDagNode
? whenFalse = (BoundDecisionDagNode
?)this.Visit(node.WhenFalse);
return node.Update(node.Bindings, whenExpression, whenTrue, whenFalse);
return node.Update(node.Bindings, whenExpression, whenTrue, whenFalse);
}
}
public override BoundNode? VisitLeafDecisionDagNode(BoundLeafDecisionDagNode node) => node;
public override BoundNode? VisitLeafDecisionDagNode(BoundLeafDecisionDagNode node) => node;
...
@@ -13841,7 +13840,7 @@ public override TreeDumperNode VisitYieldBreakStatement(BoundYieldBreakStatement
...
@@ -13841,7 +13840,7 @@ public override TreeDumperNode VisitYieldBreakStatement(BoundYieldBreakStatement
);
);
public override TreeDumperNode VisitDecisionDag(BoundDecisionDag node, object? arg) => new TreeDumperNode("decisionDag", null, new TreeDumperNode[]
public override TreeDumperNode VisitDecisionDag(BoundDecisionDag node, object? arg) => new TreeDumperNode("decisionDag", null, new TreeDumperNode[]
{
{
new TreeDumperNode("rootNode", n
ode.RootNode, null
),
new TreeDumperNode("rootNode", n
ull, new TreeDumperNode[] { Visit(node.RootNode, null) }
),
new TreeDumperNode("hasErrors", node.HasErrors, null)
new TreeDumperNode("hasErrors", node.HasErrors, null)
}
}
);
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录