Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
lwm1986
roslyn
提交
dfbbf886
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,发现更多精彩内容 >>
提交
dfbbf886
编写于
2月 10, 2016
作者:
J
John Hamby
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Completed removal of IStatement.
上级
10f6a251
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
30 addition
and
108 deletion
+30
-108
src/Compilers/CSharp/Portable/BoundTree/Expression.cs
src/Compilers/CSharp/Portable/BoundTree/Expression.cs
+5
-23
src/Compilers/CSharp/Portable/BoundTree/Statement.cs
src/Compilers/CSharp/Portable/BoundTree/Statement.cs
+6
-41
src/Compilers/Core/CodeAnalysisTest/Diagnostics/OperationTestAnalyzer.cs
...ore/CodeAnalysisTest/Diagnostics/OperationTestAnalyzer.cs
+2
-2
src/Compilers/Core/Portable/Compilation/Expression.cs
src/Compilers/Core/Portable/Compilation/Expression.cs
+1
-6
src/Compilers/VisualBasic/Portable/BoundTree/Statement.vb
src/Compilers/VisualBasic/Portable/BoundTree/Statement.vb
+16
-36
未找到文件。
src/Compilers/CSharp/Portable/BoundTree/Expression.cs
浏览文件 @
dfbbf886
...
...
@@ -62,14 +62,9 @@ ImmutableArray<IArgument> IInvocationExpression.ArgumentsInSourceOrder
return
sourceOrderArguments
.
ToImmutableAndFree
();
}
}
<<<<<<<
HEAD
ImmutableArray
<
IArgument
>
IHasArgumentsExpression
.
ArgumentsInParameterOrder
=>
DeriveArguments
(
this
.
Arguments
,
this
.
ArgumentNamesOpt
,
this
.
ArgsToParamsOpt
,
this
.
ArgumentRefKindsOpt
,
this
.
Method
.
Parameters
);
=======
ImmutableArray
<
IArgument
>
IInvocationExpression
.
ArgumentsInParameterOrder
=>
DeriveArguments
(
this
.
Arguments
,
this
.
ArgumentNamesOpt
,
this
.
ArgsToParamsOpt
,
this
.
ArgumentRefKindsOpt
,
this
.
Method
.
Parameters
);
>>>>>>>
upstream
/
master
ImmutableArray
<
IArgument
>
IHasArgumentsExpression
.
ArgumentsInParameterOrder
=>
DeriveArguments
(
this
.
Arguments
,
this
.
ArgumentNamesOpt
,
this
.
ArgsToParamsOpt
,
this
.
ArgumentRefKindsOpt
,
this
.
Method
.
Parameters
);
IArgument
IHasArgumentsExpression
.
GetArgumentMatchingParameter
(
IParameterSymbol
parameter
)
{
return
ArgumentMatchingParameter
(
this
.
Arguments
,
this
.
ArgsToParamsOpt
,
this
.
ArgumentNamesOpt
,
this
.
ArgumentRefKindsOpt
,
parameter
.
ContainingSymbol
as
Symbols
.
MethodSymbol
,
parameter
);
...
...
@@ -770,11 +765,7 @@ public override void Accept(OperationVisitor visitor)
}
}
<<<<<<<
HEAD
partial
class
BoundSizeOfOperator
:
ISizeOfExpression
=======
internal
partial
class
BoundSizeOfOperator
:
ITypeOperationExpression
>>>>>>>
upstream
/
master
internal
partial
class
BoundSizeOfOperator
:
ISizeOfExpression
{
ITypeSymbol
ITypeOperationExpression
.
TypeOperand
=>
this
.
SourceType
.
Type
;
...
...
@@ -791,11 +782,7 @@ public override void Accept(OperationVisitor visitor)
}
}
<<<<<<<
HEAD
partial
class
BoundTypeOfOperator
:
ITypeOfExpression
=======
internal
partial
class
BoundTypeOfOperator
:
ITypeOperationExpression
>>>>>>>
upstream
/
master
internal
partial
class
BoundTypeOfOperator
:
ITypeOfExpression
{
ITypeSymbol
ITypeOperationExpression
.
TypeOperand
=>
this
.
SourceType
.
Type
;
...
...
@@ -1063,13 +1050,8 @@ internal partial class BoundBinaryOperator : IBinaryOperatorExpression
IExpression
IBinaryOperatorExpression
.
Left
=>
this
.
Left
;
IExpression
IBinaryOperatorExpression
.
Right
=>
this
.
Right
;
<<<<<<<
HEAD
bool
IHasOperatorMethodExpression
.
UsesOperatorMethod
=>
(
this
.
OperatorKind
&
BinaryOperatorKind
.
TypeMask
)
==
BinaryOperatorKind
.
UserDefined
;
=======
bool
IHasOperatorExpression
.
UsesOperatorMethod
=>
(
this
.
OperatorKind
&
BinaryOperatorKind
.
TypeMask
)
==
BinaryOperatorKind
.
UserDefined
;
>>>>>>>
upstream
/
master
bool
IHasOperatorMethodExpression
.
UsesOperatorMethod
=>
(
this
.
OperatorKind
&
BinaryOperatorKind
.
TypeMask
)
==
BinaryOperatorKind
.
UserDefined
;
IMethodSymbol
IHasOperatorMethodExpression
.
OperatorMethod
=>
this
.
MethodOpt
;
...
...
src/Compilers/CSharp/Portable/BoundTree/Statement.cs
浏览文件 @
dfbbf886
...
...
@@ -8,11 +8,7 @@
namespace
Microsoft.CodeAnalysis.CSharp
{
<<<<<<<
HEAD
partial
class
BoundStatement
:
IOperation
=======
internal
partial
class
BoundStatement
:
IStatement
>>>>>>>
upstream
/
master
internal
partial
class
BoundStatement
:
IOperation
{
OperationKind
IOperation
.
Kind
=>
this
.
StatementKind
;
...
...
@@ -37,13 +33,8 @@ ImmutableArray<IOperation> IBlockStatement.Statements
get
{
// This is to filter out operations of kind None.
<<<<<<<
HEAD
return
(
ImmutableArray
<
IOperation
>)
s_blockStatementsMappings
.
GetValue
(
this
,
return
(
ImmutableArray
<
IOperation
>)
s_blockStatementsMappings
.
GetValue
(
this
,
blockStatement
=>
{
return
blockStatement
.
Statements
.
AsImmutable
<
IOperation
>().
WhereAsArray
(
statement
=>
statement
.
Kind
!=
OperationKind
.
None
);
}
=======
return
(
ImmutableArray
<
IStatement
>)
s_blockStatementsMappings
.
GetValue
(
this
,
blockStatement
=>
{
return
blockStatement
.
Statements
.
AsImmutable
<
IStatement
>().
WhereAsArray
(
statement
=>
statement
.
Kind
!=
OperationKind
.
None
);
}
>>>>>>>
upstream
/
master
);
}
}
...
...
@@ -97,11 +88,7 @@ public override void Accept(OperationVisitor visitor)
}
}
<<<<<<<
HEAD
partial
class
BoundYieldBreakStatement
:
IReturnStatement
=======
internal
partial
class
BoundYieldBreakStatement
>>>>>>>
upstream
/
master
internal
partial
class
BoundYieldBreakStatement
:
IReturnStatement
{
IExpression
IReturnStatement
.
ReturnedValue
=>
null
;
...
...
@@ -135,11 +122,7 @@ public override void Accept(OperationVisitor visitor)
}
}
<<<<<<<
HEAD
partial
class
BoundNoOpStatement
:
IEmptyStatement
=======
internal
partial
class
BoundNoOpStatement
>>>>>>>
upstream
/
master
internal
partial
class
BoundNoOpStatement
:
IEmptyStatement
{
protected
override
OperationKind
StatementKind
=>
OperationKind
.
EmptyStatement
;
...
...
@@ -241,11 +224,7 @@ internal partial class BoundForStatement : IForLoopStatement
protected
override
OperationKind
StatementKind
=>
OperationKind
.
LoopStatement
;
<<<<<<<
HEAD
ImmutableArray
<
IOperation
>
ToStatements
(
BoundStatement
statement
)
=======
private
ImmutableArray
<
IStatement
>
ToStatements
(
BoundStatement
statement
)
>>>>>>>
upstream
/
master
private
ImmutableArray
<
IOperation
>
ToStatements
(
BoundStatement
statement
)
{
BoundStatementList
statementList
=
statement
as
BoundStatementList
;
if
(
statementList
!=
null
)
...
...
@@ -584,11 +563,7 @@ public override void Accept(OperationVisitor visitor)
}
}
<<<<<<<
HEAD
partial
class
BoundBadStatement
:
IInvalidStatement
=======
internal
partial
class
BoundBadStatement
>>>>>>>
upstream
/
master
internal
partial
class
BoundBadStatement
:
IInvalidStatement
{
protected
override
OperationKind
StatementKind
=>
OperationKind
.
InvalidStatement
;
...
...
@@ -612,13 +587,8 @@ ImmutableArray<IVariableDeclaration> IVariableDeclarationStatement.Variables
{
get
{
<<<<<<<
HEAD
return
(
ImmutableArray
<
IVariableDeclaration
>)
s_variablesMappings
.
GetValue
(
this
,
declaration
=>
ImmutableArray
.
Create
<
IVariableDeclaration
>(
new
VariableDeclaration
(
declaration
.
LocalSymbol
,
declaration
.
InitializerOpt
,
declaration
.
Syntax
)));
=======
return
(
ImmutableArray
<
IVariable
>)
s_variablesMappings
.
GetValue
(
this
,
declaration
=>
ImmutableArray
.
Create
<
IVariable
>(
new
VariableDeclaration
(
declaration
.
LocalSymbol
,
declaration
.
InitializerOpt
,
declaration
.
Syntax
)));
>>>>>>>
upstream
/
master
}
}
...
...
@@ -646,13 +616,8 @@ ImmutableArray<IVariableDeclaration> IVariableDeclarationStatement.Variables
{
return
(
ImmutableArray
<
IVariableDeclaration
>)
s_variablesMappings
.
GetValue
(
this
,
multipleDeclarations
=>
<<<<<<<
HEAD
multipleDeclarations
.
LocalDeclarations
.
SelectAsArray
(
declaration
=>
(
IVariableDeclaration
)
new
VariableDeclaration
(
declaration
.
LocalSymbol
,
declaration
.
InitializerOpt
,
declaration
.
Syntax
)));
=======
multipleDeclarations
.
LocalDeclarations
.
SelectAsArray
(
declaration
=>
(
IVariable
)
new
VariableDeclaration
(
declaration
.
LocalSymbol
,
declaration
.
InitializerOpt
,
declaration
.
Syntax
)));
>>>>>>>
upstream
/
master
}
}
...
...
src/Compilers/Core/CodeAnalysisTest/Diagnostics/OperationTestAnalyzer.cs
浏览文件 @
dfbbf886
...
...
@@ -158,7 +158,7 @@ public sealed override void Initialize(AnalysisContext context)
if
(
forLoop
.
Before
.
Length
==
1
)
{
I
Statement
setup
=
forLoop
.
Before
[
0
];
I
Operation
setup
=
forLoop
.
Before
[
0
];
if
(
setup
.
Kind
==
OperationKind
.
ExpressionStatement
&&
((
IExpressionStatement
)
setup
).
Expression
.
Kind
==
OperationKind
.
AssignmentExpression
)
{
IAssignmentExpression
setupAssignment
=
(
IAssignmentExpression
)((
IExpressionStatement
)
setup
).
Expression
;
...
...
@@ -173,7 +173,7 @@ public sealed override void Initialize(AnalysisContext context)
if
(
forLoop
.
AtLoopBottom
.
Length
==
1
)
{
I
Statement
advance
=
forLoop
.
AtLoopBottom
[
0
];
I
Operation
advance
=
forLoop
.
AtLoopBottom
[
0
];
if
(
advance
.
Kind
==
OperationKind
.
ExpressionStatement
)
{
IExpression
advanceExpression
=
((
IExpressionStatement
)
advance
).
Expression
;
...
...
src/Compilers/Core/Portable/Compilation/Expression.cs
浏览文件 @
dfbbf886
...
...
@@ -263,13 +263,8 @@ public IntegerLiteral(long value, ITypeSymbol resultType, SyntaxNode syntax)
this
.
Type
=
resultType
;
this
.
Syntax
=
syntax
;
}
<<<<<<<
HEAD
public
string
Text
=>
_value
.
ToString
();
=======
public
string
Spelling
=>
_value
.
ToString
();
>>>>>>>
upstream
/
master
public
string
Text
=>
_value
.
ToString
();
public
ITypeSymbol
Type
{
get
;
}
...
...
src/Compilers/VisualBasic/Portable/BoundTree/Statement.vb
浏览文件 @
dfbbf886
...
...
@@ -6,13 +6,8 @@ Imports Microsoft.CodeAnalysis.VisualBasic.Symbols
Namespace
Microsoft.CodeAnalysis.VisualBasic
<<<<<<<
HEAD
Partial
Class
BoundStatement
Partial
Friend
Class
BoundStatement
Implements
IOperation
=======
Friend
Partial
Class
BoundStatement
Implements
IStatement
>>>>>>>
upstream
/
master
Private
ReadOnly
Property
IKind
As
OperationKind
Implements
IOperation
.
Kind
Get
...
...
@@ -231,11 +226,11 @@ Namespace Microsoft.CodeAnalysis.VisualBasic
End
Function
Public
Overrides
Sub
Accept
(
visitor
As
OperationVisitor
)
visitor
.
Visit
EmptyStatement
(
Me
)
visitor
.
Visit
NoneOperation
(
Me
)
End
Sub
Public
Overrides
Function
Accept
(
Of
TArgument
,
TResult
)(
visitor
As
OperationVisitor
(
Of
TArgument
,
TResult
),
argument
As
TArgument
)
As
TResult
Return
visitor
.
Visit
EmptyStatement
(
Me
,
argument
)
Return
visitor
.
Visit
NoneOperation
(
Me
,
argument
)
End
Function
End
Class
...
...
@@ -443,11 +438,11 @@ Namespace Microsoft.CodeAnalysis.VisualBasic
End
Function
Public
Overrides
Sub
Accept
(
visitor
As
OperationVisitor
)
visitor
.
Visit
EmptyStatement
(
Me
)
visitor
.
Visit
NoneOperation
(
Me
)
End
Sub
Public
Overrides
Function
Accept
(
Of
TArgument
,
TResult
)(
visitor
As
OperationVisitor
(
Of
TArgument
,
TResult
),
argument
As
TArgument
)
As
TResult
Return
visitor
.
Visit
EmptyStatement
(
Me
,
argument
)
Return
visitor
.
Visit
NoneOperation
(
Me
,
argument
)
End
Function
End
Class
...
...
@@ -879,12 +874,9 @@ Namespace Microsoft.CodeAnalysis.VisualBasic
End
Function
End
Class
<<<<<<<
HEAD
Partial
Class
BoundBadStatement
Partial
Friend
Class
BoundBadStatement
Implements
IInvalidStatement
=======
Friend
Partial
Class
BoundBadStatement
>>>>>>>
upstream
/
master
Protected
Overrides
Function
StatementKind
()
As
OperationKind
Return
OperationKind
.
InvalidStatement
End
Function
...
...
@@ -1165,13 +1157,9 @@ Namespace Microsoft.CodeAnalysis.VisualBasic
End
Function
End
Class
<<<<<<<
HEAD
Partial
Class
BoundNoOpStatement
Partial
Friend
Class
BoundNoOpStatement
Implements
IEmptyStatement
=======
Friend
Partial
Class
BoundNoOpStatement
>>>>>>>
upstream
/
master
Protected
Overrides
Function
StatementKind
()
As
OperationKind
Return
OperationKind
.
EmptyStatement
End
Function
...
...
@@ -1191,11 +1179,11 @@ Namespace Microsoft.CodeAnalysis.VisualBasic
End
Function
Public
Overrides
Sub
Accept
(
visitor
As
OperationVisitor
)
visitor
.
Visit
EmptyStatement
(
Me
)
visitor
.
Visit
NoneOperation
(
Me
)
End
Sub
Public
Overrides
Function
Accept
(
Of
TArgument
,
TResult
)(
visitor
As
OperationVisitor
(
Of
TArgument
,
TResult
),
argument
As
TArgument
)
As
TResult
Return
visitor
.
Visit
EmptyStatement
(
Me
,
argument
)
Return
visitor
.
Visit
NoneOperation
(
Me
,
argument
)
End
Function
End
Class
...
...
@@ -1205,11 +1193,11 @@ Namespace Microsoft.CodeAnalysis.VisualBasic
End
Function
Public
Overrides
Sub
Accept
(
visitor
As
OperationVisitor
)
visitor
.
Visit
EmptyStatement
(
Me
)
visitor
.
Visit
NoneOperation
(
Me
)
End
Sub
Public
Overrides
Function
Accept
(
Of
TArgument
,
TResult
)(
visitor
As
OperationVisitor
(
Of
TArgument
,
TResult
),
argument
As
TArgument
)
As
TResult
Return
visitor
.
Visit
EmptyStatement
(
Me
,
argument
)
Return
visitor
.
Visit
NoneOperation
(
Me
,
argument
)
End
Function
End
Class
...
...
@@ -1219,21 +1207,17 @@ Namespace Microsoft.CodeAnalysis.VisualBasic
End
Function
Public
Overrides
Sub
Accept
(
visitor
As
OperationVisitor
)
visitor
.
Visit
EmptyStatement
(
Me
)
visitor
.
Visit
NoneOperation
(
Me
)
End
Sub
Public
Overrides
Function
Accept
(
Of
TArgument
,
TResult
)(
visitor
As
OperationVisitor
(
Of
TArgument
,
TResult
),
argument
As
TArgument
)
As
TResult
Return
visitor
.
Visit
EmptyStatement
(
Me
,
argument
)
Return
visitor
.
Visit
NoneOperation
(
Me
,
argument
)
End
Function
End
Class
<<<<<<<
HEAD
Partial
Class
BoundStopStatement
Partial
Friend
Class
BoundStopStatement
Implements
IStopStatement
=======
Friend
Partial
Class
BoundStopStatement
>>>>>>>
upstream
/
master
Protected
Overrides
Function
StatementKind
()
As
OperationKind
Return
OperationKind
.
StopStatement
End
Function
...
...
@@ -1247,13 +1231,9 @@ Namespace Microsoft.CodeAnalysis.VisualBasic
End
Function
End
Class
<<<<<<<
HEAD
Partial
Class
BoundEndStatement
Partial
Friend
Class
BoundEndStatement
Implements
IEndStatement
=======
Friend
Partial
Class
BoundEndStatement
>>>>>>>
upstream
/
master
Protected
Overrides
Function
StatementKind
()
As
OperationKind
Return
OperationKind
.
EndStatement
End
Function
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录