Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
lwm1986
roslyn
提交
b9a6219c
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,发现更多精彩内容 >>
提交
b9a6219c
编写于
5月 24, 2017
作者:
A
Alireza Habibi
提交者:
Julien Couvreur
5月 23, 2017
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Remove dead code (#19320)
Merging on behalf of @alrz.
上级
5dff94f3
变更
11
隐藏空白更改
内联
并排
Showing
11 changed file
with
0 addition
and
164 deletion
+0
-164
src/Compilers/CSharp/Portable/Binder/Binder_Statements.cs
src/Compilers/CSharp/Portable/Binder/Binder_Statements.cs
+0
-5
src/Compilers/CSharp/Portable/Binder/Semantics/Conversions/ConversionsBase.cs
.../Portable/Binder/Semantics/Conversions/ConversionsBase.cs
+0
-16
src/Compilers/CSharp/Portable/Binder/Semantics/OverloadResolution/OverloadResolutionResult.cs
.../Semantics/OverloadResolution/OverloadResolutionResult.cs
+0
-10
src/Compilers/CSharp/Portable/BoundTree/UnboundLambda.cs
src/Compilers/CSharp/Portable/BoundTree/UnboundLambda.cs
+0
-5
src/Compilers/CSharp/Portable/FlowAnalysis/DataFlowPass.cs
src/Compilers/CSharp/Portable/FlowAnalysis/DataFlowPass.cs
+0
-12
src/Compilers/CSharp/Portable/FlowAnalysis/PreciseAbstractFlowPass.cs
...s/CSharp/Portable/FlowAnalysis/PreciseAbstractFlowPass.cs
+0
-5
src/Compilers/CSharp/Portable/FlowAnalysis/VariablesDeclaredWalker.cs
...s/CSharp/Portable/FlowAnalysis/VariablesDeclaredWalker.cs
+0
-10
src/Compilers/CSharp/Portable/Lowering/LocalRewriter/LocalRewriter_Patterns.cs
...Portable/Lowering/LocalRewriter/LocalRewriter_Patterns.cs
+0
-8
src/Compilers/CSharp/Portable/Parser/LanguageParser.cs
src/Compilers/CSharp/Portable/Parser/LanguageParser.cs
+0
-60
src/Compilers/CSharp/Portable/SymbolDisplay/ObjectDisplay.cs
src/Compilers/CSharp/Portable/SymbolDisplay/ObjectDisplay.cs
+0
-15
src/Compilers/CSharp/Portable/Symbols/Metadata/PE/PEMethodSymbol.cs
...ers/CSharp/Portable/Symbols/Metadata/PE/PEMethodSymbol.cs
+0
-18
未找到文件。
src/Compilers/CSharp/Portable/Binder/Binder_Statements.cs
浏览文件 @
b9a6219c
...
...
@@ -960,11 +960,6 @@ private SourceLocalSymbol LocateDeclaredVariableSymbol(VariableDeclaratorSyntax
return
LocateDeclaredVariableSymbol
(
declarator
.
Identifier
,
typeSyntax
,
declarator
.
Initializer
);
}
private
SourceLocalSymbol
LocateDeclaredVariableSymbol
(
SingleVariableDesignationSyntax
designation
,
TypeSyntax
typeSyntax
)
{
return
LocateDeclaredVariableSymbol
(
designation
.
Identifier
,
typeSyntax
,
null
);
}
private
SourceLocalSymbol
LocateDeclaredVariableSymbol
(
SyntaxToken
identifier
,
TypeSyntax
typeSyntax
,
EqualsValueClauseSyntax
equalsValue
)
{
SourceLocalSymbol
localSymbol
=
this
.
LookupLocal
(
identifier
);
...
...
src/Compilers/CSharp/Portable/Binder/Semantics/Conversions/ConversionsBase.cs
浏览文件 @
b9a6219c
...
...
@@ -1431,22 +1431,6 @@ public static bool IsValidExtensionMethodThisArgConversion(Conversion conversion
}
}
private
enum
NumericType
{
SByte
,
Byte
,
Short
,
UShort
,
Int
,
UInt
,
Long
,
ULong
,
Char
,
Float
,
Double
,
Decimal
}
private
const
bool
F
=
false
;
private
const
bool
T
=
true
;
...
...
src/Compilers/CSharp/Portable/Binder/Semantics/OverloadResolution/OverloadResolutionResult.cs
浏览文件 @
b9a6219c
...
...
@@ -90,16 +90,6 @@ public MemberResolutionResult<TMember> BestResult
}
}
private
bool
HasBestResult
{
get
{
EnsureBestResultLoaded
();
return
_bestResultState
.
Value
();
}
}
/// <summary>
/// Returns information about each method that was considered during overload resolution,
/// and what the results of overload resolution were for that method.
...
...
src/Compilers/CSharp/Portable/BoundTree/UnboundLambda.cs
浏览文件 @
b9a6219c
...
...
@@ -380,11 +380,6 @@ private static MethodSymbol DelegateInvokeMethod(NamedTypeSymbol delegateType)
return
delegateType
.
GetDelegateType
()?.
DelegateInvokeMethod
;
}
private
static
ImmutableArray
<
ParameterSymbol
>
DelegateParameters
(
MethodSymbol
invokeMethod
)
{
return
((
object
)
invokeMethod
==
null
)
?
ImmutableArray
<
ParameterSymbol
>.
Empty
:
invokeMethod
.
Parameters
;
}
private
static
TypeSymbol
DelegateReturnType
(
MethodSymbol
invokeMethod
,
out
RefKind
refKind
)
{
if
((
object
)
invokeMethod
==
null
)
...
...
src/Compilers/CSharp/Portable/FlowAnalysis/DataFlowPass.cs
浏览文件 @
b9a6219c
...
...
@@ -1560,18 +1560,6 @@ protected override void VisitPatternSwitchSection(BoundPatternSwitchSection node
base
.
VisitPatternSwitchSection
(
node
,
switchExpression
,
isLastSection
);
}
private
void
CreateSlots
(
BoundPattern
pattern
)
{
if
(
pattern
.
Kind
==
BoundKind
.
DeclarationPattern
)
{
var
local
=
((
BoundDeclarationPattern
)
pattern
).
Variable
as
LocalSymbol
;
if
((
object
)
local
!=
null
)
{
int
slot
=
GetOrCreateSlot
(
local
);
}
}
}
public
override
BoundNode
VisitForStatement
(
BoundForStatement
node
)
{
DeclareVariables
(
node
.
OuterLocals
);
...
...
src/Compilers/CSharp/Portable/FlowAnalysis/PreciseAbstractFlowPass.cs
浏览文件 @
b9a6219c
...
...
@@ -803,11 +803,6 @@ protected virtual void ResolveBranch(PendingBranch pending, LabelSymbol label, B
}
}
private
bool
ResolveBranches
(
BoundLabeledStatement
target
)
{
return
ResolveBranches
(
target
.
Label
,
target
);
}
protected
struct
SavedPending
{
public
readonly
ArrayBuilder
<
PendingBranch
>
PendingBranches
;
...
...
src/Compilers/CSharp/Portable/FlowAnalysis/VariablesDeclaredWalker.cs
浏览文件 @
b9a6219c
...
...
@@ -32,16 +32,6 @@ internal static IEnumerable<Symbol> Analyze(CSharpCompilation compilation, Symbo
private
HashSet
<
Symbol
>
_variablesDeclared
=
new
HashSet
<
Symbol
>();
private
void
Analyze
()
{
// only one pass needed.
regionPlace
=
RegionPlace
.
Before
;
bool
badRegion
=
false
;
SetState
(
ReachableState
());
Scan
(
ref
badRegion
);
if
(
badRegion
)
_variablesDeclared
.
Clear
();
}
internal
VariablesDeclaredWalker
(
CSharpCompilation
compilation
,
Symbol
member
,
BoundNode
node
,
BoundNode
firstInRegion
,
BoundNode
lastInRegion
)
:
base
(
compilation
,
member
,
node
,
firstInRegion
,
lastInRegion
)
{
...
...
src/Compilers/CSharp/Portable/Lowering/LocalRewriter/LocalRewriter_Patterns.cs
浏览文件 @
b9a6219c
...
...
@@ -100,14 +100,6 @@ private BoundExpression MakeIsDeclarationPattern(BoundDeclarationPattern lowered
return
MakeIsDeclarationPattern
(
loweredPattern
.
Syntax
,
loweredInput
,
loweredPattern
.
VariableAccess
,
requiresNullTest
:
loweredInput
.
Type
.
CanContainNull
());
}
/// <summary>
/// Produce a 'logical and' operation that is clearly irrefutable (<see cref="IsIrrefutablePatternTest(BoundExpression)"/>) when it can be.
/// </summary>
BoundExpression
LogicalAndForPatterns
(
BoundExpression
left
,
BoundExpression
right
)
{
return
IsIrrefutablePatternTest
(
left
)
?
_factory
.
MakeSequence
(
left
,
right
)
:
_factory
.
LogicalAnd
(
left
,
right
);
}
/// <summary>
/// Is the test, produced as a result of a pattern-matching operation, always true?
/// Knowing that enables us to construct slightly more efficient code.
...
...
src/Compilers/CSharp/Portable/Parser/LanguageParser.cs
浏览文件 @
b9a6219c
...
...
@@ -42,43 +42,6 @@ internal partial class LanguageParser : SyntaxParser
_syntaxFactory
=
new
ContextAwareSyntax
(
_syntaxFactoryContext
);
}
// Special Name checks
private
static
bool
IsName
(
CSharpSyntaxNode
node
,
SyntaxKind
kind
)
{
if
(
node
.
Kind
==
SyntaxKind
.
IdentifierToken
)
{
return
((
SyntaxToken
)
node
).
ContextualKind
==
kind
;
}
else
if
(
node
.
Kind
==
SyntaxKind
.
IdentifierName
)
{
return
((
IdentifierNameSyntax
)
node
).
Identifier
.
ContextualKind
==
kind
;
}
else
{
return
node
.
ToString
()
==
SyntaxFacts
.
GetText
(
kind
);
}
}
private
static
bool
IsNameGet
(
CSharpSyntaxNode
node
)
{
return
IsName
(
node
,
SyntaxKind
.
GetKeyword
);
}
private
static
bool
IsNameSet
(
CSharpSyntaxNode
node
)
{
return
IsName
(
node
,
SyntaxKind
.
SetKeyword
);
}
private
static
bool
IsNameAdd
(
CSharpSyntaxNode
node
)
{
return
IsName
(
node
,
SyntaxKind
.
AddKeyword
);
}
private
static
bool
IsNameRemove
(
CSharpSyntaxNode
node
)
{
return
IsName
(
node
,
SyntaxKind
.
RemoveKeyword
);
}
private
static
bool
IsSomeWord
(
SyntaxKind
kind
)
{
return
kind
==
SyntaxKind
.
IdentifierToken
||
SyntaxFacts
.
IsKeywordKind
(
kind
);
...
...
@@ -9689,29 +9652,6 @@ private ArgumentSyntax ParseArgumentExpression(bool isIndexer)
return
_syntaxFactory
.
Argument
(
nameColon
,
refOrOutKeyword
,
expression
);
}
private
bool
IsPossibleOutVarDeclaration
()
{
var
tk
=
this
.
CurrentToken
.
Kind
;
if
(
SyntaxFacts
.
IsPredefinedType
(
tk
)
&&
this
.
PeekToken
(
1
).
Kind
!=
SyntaxKind
.
DotToken
)
{
return
true
;
}
var
resetPoint
=
this
.
GetResetPoint
();
try
{
SyntaxToken
lastTokenOfType
;
ScanTypeFlags
st
=
this
.
ScanType
(
out
lastTokenOfType
);
return
st
!=
ScanTypeFlags
.
NotType
&&
this
.
IsTrueIdentifier
();
}
finally
{
this
.
Reset
(
ref
resetPoint
);
this
.
Release
(
ref
resetPoint
);
}
}
private
TypeOfExpressionSyntax
ParseTypeOfExpression
()
{
var
keyword
=
this
.
EatToken
();
...
...
src/Compilers/CSharp/Portable/SymbolDisplay/ObjectDisplay.cs
浏览文件 @
b9a6219c
// Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using
System
;
using
System.Diagnostics
;
using
System.Globalization
;
using
System.Text
;
using
PooledStringBuilder
=
Microsoft
.
CodeAnalysis
.
Collections
.
PooledStringBuilder
;
...
...
@@ -133,20 +132,6 @@ internal static string FormatLiteral(bool value)
return
value
?
"true"
:
"false"
;
}
private
static
bool
TryReplaceQuote
(
char
c
,
char
quote
,
out
string
replaceWith
)
{
Debug
.
Assert
(
quote
==
'"'
||
quote
==
'\''
);
if
(
c
==
quote
)
{
replaceWith
=
"\\"
+
c
;
return
true
;
}
replaceWith
=
null
;
return
false
;
}
/// <summary>
/// Returns true if the character should be replaced and sets
/// <paramref name="replaceWith"/> to the replacement text.
...
...
src/Compilers/CSharp/Portable/Symbols/Metadata/PE/PEMethodSymbol.cs
浏览文件 @
b9a6219c
...
...
@@ -795,24 +795,6 @@ private bool IsValidExtensionMethodSignature()
this
.
ParameterRefKinds
.
IsDefault
&&
// No 'ref' or 'out'
!
this
.
IsParams
();
private
bool
IsValidUserDefinedOperatorIs
()
{
foreach
(
var
parameter
in
this
.
Parameters
)
{
if
(
parameter
.
RefKind
!=
((
parameter
.
Ordinal
==
0
)
?
RefKind
.
None
:
RefKind
.
Out
))
{
return
false
;
}
}
return
(
this
.
ReturnsVoid
||
this
.
ReturnType
.
SpecialType
==
SpecialType
.
System_Boolean
)
&&
!
this
.
IsGenericMethod
&&
!
this
.
IsVararg
&&
this
.
ParameterCount
>
0
&&
!
this
.
IsParams
();
}
private
MethodKind
ComputeMethodKind
()
{
if
(
this
.
HasSpecialName
)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录