Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
lwm1986
roslyn
提交
fbaf5c84
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,发现更多精彩内容 >>
提交
fbaf5c84
编写于
5月 01, 2020
作者:
C
Cyrus Najmabadi
浏览文件
操作
浏览文件
下载
差异文件
Merge remote-tracking branch 'upstream/master' into remoteIndices
上级
c8f1f749
6ff8c82a
变更
24
展开全部
隐藏空白更改
内联
并排
Showing
24 changed file
with
692 addition
and
178 deletion
+692
-178
eng/Version.Details.xml
eng/Version.Details.xml
+2
-2
eng/build.ps1
eng/build.ps1
+8
-0
eng/common/templates/post-build/post-build.yml
eng/common/templates/post-build/post-build.yml
+24
-0
global.json
global.json
+1
-1
src/Compilers/CSharp/Portable/Lowering/LocalRewriter/LocalRewriter_SwitchExpression.cs
.../Lowering/LocalRewriter/LocalRewriter_SwitchExpression.cs
+2
-0
src/Compilers/CSharp/Portable/Lowering/SpillSequenceSpiller.cs
...ompilers/CSharp/Portable/Lowering/SpillSequenceSpiller.cs
+21
-20
src/Compilers/CSharp/Test/Emit/CodeGen/CodeGenAsyncLocalsTests.cs
...ilers/CSharp/Test/Emit/CodeGen/CodeGenAsyncLocalsTests.cs
+33
-33
src/Compilers/CSharp/Test/Emit/CodeGen/PatternTests.cs
src/Compilers/CSharp/Test/Emit/CodeGen/PatternTests.cs
+1
-0
src/Compilers/CSharp/Test/Emit/Emit/EditAndContinue/LocalSlotMappingTests.cs
...p/Test/Emit/Emit/EditAndContinue/LocalSlotMappingTests.cs
+5
-5
src/Compilers/CSharp/Test/Emit/PDB/PDBTests.cs
src/Compilers/CSharp/Test/Emit/PDB/PDBTests.cs
+547
-54
src/EditorFeatures/TestUtilities2/Intellisense/TestState.vb
src/EditorFeatures/TestUtilities2/Intellisense/TestState.vb
+2
-2
src/VisualStudio/IntegrationTest/IntegrationTests/AbstractEditorTest.cs
...io/IntegrationTest/IntegrationTests/AbstractEditorTest.cs
+2
-0
src/VisualStudio/IntegrationTest/TestUtilities/InProcess/TextViewWindow_InProc.cs
...tionTest/TestUtilities/InProcess/TextViewWindow_InProc.cs
+7
-0
src/VisualStudio/IntegrationTest/TestUtilities/OutOfProcess/Editor_OutOfProc.cs
...rationTest/TestUtilities/OutOfProcess/Editor_OutOfProc.cs
+5
-1
src/VisualStudio/IntegrationTest/TestUtilities/OutOfProcess/TextViewWindow_OutOfProc.cs
...st/TestUtilities/OutOfProcess/TextViewWindow_OutOfProc.cs
+6
-0
src/Workspaces/Core/Portable/FindSymbols/FindReferences/DependentTypeFinder_Remote.cs
.../FindSymbols/FindReferences/DependentTypeFinder_Remote.cs
+4
-2
src/Workspaces/Core/Portable/FindSymbols/SymbolFinder_Callers.cs
...kspaces/Core/Portable/FindSymbols/SymbolFinder_Callers.cs
+0
-8
src/Workspaces/Core/Portable/FindSymbols/SymbolFinder_FindReferences_Current.cs
...rtable/FindSymbols/SymbolFinder_FindReferences_Current.cs
+4
-4
src/Workspaces/Core/Portable/FindSymbols/SymbolFinder_FindReferences_Legacy.cs
...ortable/FindSymbols/SymbolFinder_FindReferences_Legacy.cs
+0
-13
src/Workspaces/Core/Portable/FindSymbols/SymbolFinder_Hierarchy.cs
...paces/Core/Portable/FindSymbols/SymbolFinder_Hierarchy.cs
+0
-15
src/Workspaces/Core/Portable/Remote/RemoteArguments.cs
src/Workspaces/Core/Portable/Remote/RemoteArguments.cs
+9
-7
src/Workspaces/Core/Portable/Rename/RenameLocations.cs
src/Workspaces/Core/Portable/Rename/RenameLocations.cs
+4
-3
src/Workspaces/Core/Portable/Rename/Renamer.cs
src/Workspaces/Core/Portable/Rename/Renamer.cs
+4
-7
src/Workspaces/Remote/ServiceHub/Services/CodeAnalysisService_DependentTypeFinder.cs
...ceHub/Services/CodeAnalysisService_DependentTypeFinder.cs
+1
-1
未找到文件。
eng/Version.Details.xml
浏览文件 @
fbaf5c84
...
...
@@ -3,9 +3,9 @@
<ProductDependencies>
</ProductDependencies>
<ToolsetDependencies>
<Dependency
Name=
"Microsoft.DotNet.Arcade.Sdk"
Version=
"1.0.0-beta.202
15
.5"
>
<Dependency
Name=
"Microsoft.DotNet.Arcade.Sdk"
Version=
"1.0.0-beta.202
30
.5"
>
<Uri>
https://github.com/dotnet/arcade
</Uri>
<Sha>
36fd49bf87b14b78d722179b787e6518b5205518
</Sha>
<Sha>
5fd50687c9a9f39bd2ee8221165ea9c1b3f565d9
</Sha>
</Dependency>
<Dependency
Name=
"Microsoft.Net.Compilers.Toolset"
Version=
"3.7.0-1.20210.7"
>
<Uri>
https://github.com/dotnet/roslyn
</Uri>
...
...
eng/build.ps1
浏览文件 @
fbaf5c84
...
...
@@ -410,6 +410,14 @@ function TestUsingOptimizedRunner() {
$dlls
=
$dlls
|
?
{
-not
(
$_
.
FullName
-match
".*\\ref\\.*"
)
}
$dlls
=
$dlls
|
?
{
-not
(
$_
.
FullName
-match
".*/ref/.*"
)
}
if
(
$configuration
-eq
'Debug'
)
{
$excludedConfiguration
=
'Release'
}
else
{
$excludedConfiguration
=
'Debug'
}
$dlls
=
$dlls
|
?
{
-not
((
$_
.
FullName
-match
".*\\
$excludedConfiguration
\\.*"
)
-or
(
$_
.
FullName
-match
".*/
$excludedConfiguration
/.*"
))
}
if
(
$ci
)
{
$args
+=
" -xml"
if
(
$testVsi
)
{
...
...
eng/common/templates/post-build/post-build.yml
浏览文件 @
fbaf5c84
...
...
@@ -365,4 +365,28 @@ stages:
channelId
:
760
transportFeed
:
'
https://pkgs.dev.azure.com/dnceng/_packaging/dotnet3.1-internal-transport/nuget/v3/index.json'
shippingFeed
:
'
https://pkgs.dev.azure.com/dnceng/_packaging/dotnet3.1-internal/nuget/v3/index.json'
symbolsFeed
:
'
https://pkgs.dev.azure.com/dnceng/_packaging/dotnet3.1-internal-symbols/nuget/v3/index.json'
-
template
:
\eng\common\templates\post-build\channels\generic-public-channel.yml
parameters
:
artifactsPublishingAdditionalParameters
:
${{ parameters.artifactsPublishingAdditionalParameters }}
publishInstallersAndChecksums
:
${{ parameters.publishInstallersAndChecksums }}
symbolPublishingAdditionalParameters
:
${{ parameters.symbolPublishingAdditionalParameters }}
stageName
:
'
NETCore_SDK_314xx_Publishing'
channelName
:
'
.NET
Core
SDK
3.1.4xx'
channelId
:
921
transportFeed
:
'
https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet3.1-transport/nuget/v3/index.json'
shippingFeed
:
'
https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet3.1/nuget/v3/index.json'
symbolsFeed
:
'
https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet3.1-symbols/nuget/v3/index.json'
-
template
:
\eng\common\templates\post-build\channels\generic-internal-channel.yml
parameters
:
artifactsPublishingAdditionalParameters
:
${{ parameters.artifactsPublishingAdditionalParameters }}
publishInstallersAndChecksums
:
${{ parameters.publishInstallersAndChecksums }}
symbolPublishingAdditionalParameters
:
${{ parameters.symbolPublishingAdditionalParameters }}
stageName
:
'
NETCore_SDK_314xx_Internal_Publishing'
channelName
:
'
.NET
Core
SDK
3.1.4xx
Internal'
channelId
:
922
transportFeed
:
'
https://pkgs.dev.azure.com/dnceng/_packaging/dotnet3.1-internal-transport/nuget/v3/index.json'
shippingFeed
:
'
https://pkgs.dev.azure.com/dnceng/_packaging/dotnet3.1-internal/nuget/v3/index.json'
symbolsFeed
:
'
https://pkgs.dev.azure.com/dnceng/_packaging/dotnet3.1-internal-symbols/nuget/v3/index.json'
\ No newline at end of file
global.json
浏览文件 @
fbaf5c84
...
...
@@ -7,6 +7,6 @@
"xcopy-msbuild"
:
"16.4.0-alpha"
},
"msbuild-sdks"
:
{
"Microsoft.DotNet.Arcade.Sdk"
:
"1.0.0-beta.202
15
.5"
"Microsoft.DotNet.Arcade.Sdk"
:
"1.0.0-beta.202
30
.5"
}
}
src/Compilers/CSharp/Portable/Lowering/LocalRewriter/LocalRewriter_SwitchExpression.cs
浏览文件 @
fbaf5c84
...
...
@@ -128,6 +128,8 @@ private BoundExpression LowerSwitchExpression(BoundConvertedSwitchExpression nod
result
.
Add
(
_factory
.
Throw
(
thrownExpression
));
}
if
(
GenerateInstrumentation
)
result
.
Add
(
_factory
.
HiddenSequencePoint
());
result
.
Add
(
_factory
.
Label
(
afterSwitchExpression
));
if
(
produceDetailedSequencePoints
)
result
.
Add
(
new
BoundRestorePreviousSequencePoint
(
node
.
Syntax
,
restorePointForEnclosingStatement
));
...
...
src/Compilers/CSharp/Portable/Lowering/SpillSequenceSpiller.cs
浏览文件 @
fbaf5c84
...
...
@@ -37,8 +37,8 @@ private sealed class BoundSpillSequenceBuilder : BoundExpression
private
ArrayBuilder
<
LocalSymbol
>
_locals
;
private
ArrayBuilder
<
BoundStatement
>
_statements
;
public
BoundSpillSequenceBuilder
(
BoundExpression
value
=
null
)
:
base
(
SpillSequenceBuilderKind
,
null
,
value
?.
Type
)
public
BoundSpillSequenceBuilder
(
SyntaxNode
syntax
,
BoundExpression
value
=
null
)
:
base
(
SpillSequenceBuilderKind
,
syntax
,
value
?.
Type
)
{
Debug
.
Assert
(
value
?.
Kind
!=
SpillSequenceBuilderKind
);
this
.
Value
=
value
;
...
...
@@ -77,7 +77,7 @@ public ImmutableArray<BoundStatement> GetStatements()
internal
BoundSpillSequenceBuilder
Update
(
BoundExpression
value
)
{
var
result
=
new
BoundSpillSequenceBuilder
(
value
);
var
result
=
new
BoundSpillSequenceBuilder
(
this
.
Syntax
,
value
);
result
.
_locals
=
_locals
;
result
.
_statements
=
_statements
;
return
result
;
...
...
@@ -285,6 +285,8 @@ private BoundStatement UpdateStatement(BoundSpillSequenceBuilder builder, BoundS
bool
sideEffectsOnly
=
false
)
{
Debug
.
Assert
(
builder
!=
null
);
if
(
builder
.
Syntax
!=
null
)
_F
.
Syntax
=
builder
.
Syntax
;
while
(
true
)
{
...
...
@@ -441,7 +443,7 @@ private BoundStatement UpdateStatement(BoundSpillSequenceBuilder builder, BoundS
if
(
builder
==
null
)
{
builder
=
new
BoundSpillSequenceBuilder
();
builder
=
new
BoundSpillSequenceBuilder
(
lastSpill
<
newList
.
Length
?
(
newList
[
lastSpill
]
as
BoundSpillSequenceBuilder
)?.
Syntax
:
null
);
}
var
result
=
ArrayBuilder
<
BoundExpression
>.
GetInstance
(
newList
.
Length
);
...
...
@@ -545,7 +547,7 @@ public override BoundNode VisitAwaitExpression(BoundAwaitExpression node)
public
override
BoundNode
VisitSpillSequence
(
BoundSpillSequence
node
)
{
var
builder
=
new
BoundSpillSequenceBuilder
();
var
builder
=
new
BoundSpillSequenceBuilder
(
node
.
Syntax
);
// Ensure later errors (e.g. in async rewriting) are associated with the correct node.
_F
.
Syntax
=
node
.
Syntax
;
...
...
@@ -583,7 +585,7 @@ public override BoundNode VisitArrayAccess(BoundArrayAccess node)
// spill the array if there were await expressions in the indices
if
(
builder
==
null
)
{
builder
=
new
BoundSpillSequenceBuilder
();
builder
=
new
BoundSpillSequenceBuilder
(
indicesBuilder
.
Syntax
);
}
expression
=
Spill
(
builder
,
expression
);
...
...
@@ -611,7 +613,7 @@ public override BoundNode VisitArrayCreation(BoundArrayCreation node)
else
{
// spill bounds expressions if initializers contain await
var
boundsBuilder
=
new
BoundSpillSequenceBuilder
();
var
boundsBuilder
=
new
BoundSpillSequenceBuilder
(
builder
.
Syntax
);
bounds
=
VisitExpressionList
(
ref
boundsBuilder
,
node
.
Bounds
,
forceSpill
:
true
);
boundsBuilder
.
Include
(
builder
);
builder
=
boundsBuilder
;
...
...
@@ -662,7 +664,7 @@ public override BoundNode VisitAssignmentOperator(BoundAssignmentOperator node)
else
{
// if the right-hand-side has await, spill the left
var
leftBuilder
=
new
BoundSpillSequenceBuilder
();
var
leftBuilder
=
new
BoundSpillSequenceBuilder
(
builder
.
Syntax
);
switch
(
left
.
Kind
)
{
...
...
@@ -779,7 +781,7 @@ public override BoundNode VisitBinaryOperator(BoundBinaryOperator node)
}
else
{
var
leftBuilder
=
new
BoundSpillSequenceBuilder
();
var
leftBuilder
=
new
BoundSpillSequenceBuilder
(
builder
.
Syntax
);
left
=
VisitExpression
(
ref
leftBuilder
,
node
.
Left
);
left
=
Spill
(
leftBuilder
,
left
);
if
(
node
.
OperatorKind
==
BinaryOperatorKind
.
LogicalBoolOr
||
node
.
OperatorKind
==
BinaryOperatorKind
.
LogicalBoolAnd
)
...
...
@@ -817,7 +819,7 @@ public override BoundNode VisitCall(BoundCall node)
else
if
(
node
.
Method
.
RequiresInstanceReceiver
)
{
// spill the receiver if there were await expressions in the arguments
var
receiverBuilder
=
new
BoundSpillSequenceBuilder
();
var
receiverBuilder
=
new
BoundSpillSequenceBuilder
(
builder
.
Syntax
);
receiver
=
node
.
ReceiverOpt
;
RefKind
refKind
=
ReceiverSpillRefKind
(
receiver
);
...
...
@@ -857,9 +859,9 @@ public override BoundNode VisitConditionalOperator(BoundConditionalOperator node
return
UpdateExpression
(
conditionBuilder
,
node
.
Update
(
node
.
IsRef
,
condition
,
consequence
,
alternative
,
node
.
ConstantValueOpt
,
node
.
Type
));
}
if
(
conditionBuilder
==
null
)
conditionBuilder
=
new
BoundSpillSequenceBuilder
();
if
(
consequenceBuilder
==
null
)
consequenceBuilder
=
new
BoundSpillSequenceBuilder
();
if
(
alternativeBuilder
==
null
)
alternativeBuilder
=
new
BoundSpillSequenceBuilder
();
if
(
conditionBuilder
==
null
)
conditionBuilder
=
new
BoundSpillSequenceBuilder
(
(
consequenceBuilder
??
alternativeBuilder
).
Syntax
);
if
(
consequenceBuilder
==
null
)
consequenceBuilder
=
new
BoundSpillSequenceBuilder
(
alternativeBuilder
.
Syntax
);
if
(
alternativeBuilder
==
null
)
alternativeBuilder
=
new
BoundSpillSequenceBuilder
(
consequenceBuilder
.
Syntax
);
if
(
node
.
Type
.
IsVoidType
())
{
...
...
@@ -952,7 +954,7 @@ public override BoundNode VisitNullCoalescingOperator(BoundNullCoalescingOperato
}
else
{
var
leftBuilder
=
new
BoundSpillSequenceBuilder
();
var
leftBuilder
=
new
BoundSpillSequenceBuilder
(
builder
.
Syntax
);
left
=
VisitExpression
(
ref
leftBuilder
,
node
.
LeftOperand
);
left
=
Spill
(
leftBuilder
,
left
);
...
...
@@ -987,10 +989,9 @@ public override BoundNode VisitLoweredConditionalAccess(BoundLoweredConditionalA
return
UpdateExpression
(
receiverBuilder
,
node
.
Update
(
receiver
,
node
.
HasValueMethodOpt
,
whenNotNull
,
whenNullOpt
,
node
.
Id
,
node
.
Type
));
}
if
(
receiverBuilder
==
null
)
receiverBuilder
=
new
BoundSpillSequenceBuilder
();
if
(
whenNotNullBuilder
==
null
)
whenNotNullBuilder
=
new
BoundSpillSequenceBuilder
();
if
(
whenNullBuilder
==
null
)
whenNullBuilder
=
new
BoundSpillSequenceBuilder
();
if
(
receiverBuilder
==
null
)
receiverBuilder
=
new
BoundSpillSequenceBuilder
((
whenNotNullBuilder
??
whenNullBuilder
).
Syntax
);
if
(
whenNotNullBuilder
==
null
)
whenNotNullBuilder
=
new
BoundSpillSequenceBuilder
(
whenNullBuilder
.
Syntax
);
if
(
whenNullBuilder
==
null
)
whenNullBuilder
=
new
BoundSpillSequenceBuilder
(
whenNotNullBuilder
.
Syntax
);
BoundExpression
condition
;
if
(
receiver
.
Type
.
IsReferenceType
||
receiver
.
Type
.
IsValueType
||
receiverRefKind
==
RefKind
.
None
)
...
...
@@ -1144,7 +1145,7 @@ public override BoundNode VisitPointerElementAccess(BoundPointerElementAccess no
}
else
{
var
expressionBuilder
=
new
BoundSpillSequenceBuilder
();
var
expressionBuilder
=
new
BoundSpillSequenceBuilder
(
builder
.
Syntax
);
expression
=
VisitExpression
(
ref
expressionBuilder
,
node
.
Expression
);
expression
=
Spill
(
expressionBuilder
,
expression
);
expressionBuilder
.
Include
(
builder
);
...
...
@@ -1177,7 +1178,7 @@ public override BoundNode VisitSequence(BoundSequence node)
if
(
builder
==
null
)
{
builder
=
new
BoundSpillSequenceBuilder
();
builder
=
new
BoundSpillSequenceBuilder
(
valueBuilder
.
Syntax
);
}
PromoteAndAddLocals
(
builder
,
node
.
Locals
);
...
...
src/Compilers/CSharp/Test/Emit/CodeGen/CodeGenAsyncLocalsTests.cs
浏览文件 @
fbaf5c84
...
...
@@ -333,39 +333,39 @@ public async Task M(IDisposable disposable)
});
vd
.
VerifyPdb
(
"C.M"
,
@"
<symbols>
<files>
<file id=""1"" name="""" language=""C#"" />
</files>
<methods>
<method containingType=""C"" name=""M"" parameterNames=""disposable"">
<customDebugInfo>
<forwardIterator name=""<M>d__3"" />
<encLocalSlotMap>
<slot kind=""6"" offset=""11"" />
<slot kind=""8"" offset=""11"" />
<slot kind=""0"" offset=""11"" />
<slot kind=""4"" offset=""53"" />
<slot kind=""6"" offset=""98"" />
<slot kind=""8"" offset=""98"" />
<slot kind=""0"" offset=""98"" />
<slot kind=""4"" offset=""151"" />
<slot kind=""4"" offset=""220"" />
<slot kind=""28"" offset=""28
1"" />
<slot kind=""28"" offset=""28
1"" ordinal=""1"" />
<slot kind=""28"" offset=""261
"" />
<slot kind=""28"" offset=""281"" ordinal=""2
"" />
<slot kind=""28"" offset=""281"" ordinal=""3
"" />
<slot kind=""28"" offset=""281"" ordinal=""4
"" />
<slot kind=""4"" offset=""307"" />
<slot kind=""4"" offset=""376"" />
<slot kind=""3"" offset=""410"" />
<slot kind=""2"" offset=""410"" />
</encLocalSlotMap>
</customDebugInfo>
</method>
</methods>
</symbols>
<symbols>
<files>
<file id=""1"" name="""" language=""C#"" />
</files>
<methods>
<method containingType=""C"" name=""M"" parameterNames=""disposable"">
<customDebugInfo>
<forwardIterator name=""<M>d__3"" />
<encLocalSlotMap>
<slot kind=""6"" offset=""11"" />
<slot kind=""8"" offset=""11"" />
<slot kind=""0"" offset=""11"" />
<slot kind=""4"" offset=""53"" />
<slot kind=""6"" offset=""98"" />
<slot kind=""8"" offset=""98"" />
<slot kind=""0"" offset=""98"" />
<slot kind=""4"" offset=""151"" />
<slot kind=""4"" offset=""220"" />
<slot kind=""28"" offset=""26
1"" />
<slot kind=""28"" offset=""26
1"" ordinal=""1"" />
<slot kind=""28"" offset=""261"" ordinal=""2
"" />
<slot kind=""28"" offset=""281
"" />
<slot kind=""28"" offset=""281"" ordinal=""1
"" />
<slot kind=""28"" offset=""281"" ordinal=""2
"" />
<slot kind=""4"" offset=""307"" />
<slot kind=""4"" offset=""376"" />
<slot kind=""3"" offset=""410"" />
<slot kind=""2"" offset=""410"" />
</encLocalSlotMap>
</customDebugInfo>
</method>
</methods>
</symbols>
"
);
}
...
...
src/Compilers/CSharp/Test/Emit/CodeGen/PatternTests.cs
浏览文件 @
fbaf5c84
...
...
@@ -3375,6 +3375,7 @@ .maxstack 2
IL_0022: newobj ""Program..ctor()""
IL_0027: stloc.2
IL_0028: br.s IL_002a
// sequence point: <hidden>
IL_002a: ldc.i4.1
IL_002b: brtrue.s IL_002e
// sequence point: var y = (i s ... }).Chain()
...
...
src/Compilers/CSharp/Test/Emit/Emit/EditAndContinue/LocalSlotMappingTests.cs
浏览文件 @
fbaf5c84
...
...
@@ -4083,7 +4083,7 @@ .maxstack 1
-IL_0027: ldc.i4.0
IL_0028: stloc.s V_4
IL_002a: br.s IL_002c
IL_002c: ldc.i4.1
~
IL_002c: ldc.i4.1
IL_002d: brtrue.s IL_0030
-IL_002f: nop
~IL_0030: ldloc.s V_4
...
...
@@ -4165,7 +4165,7 @@ .maxstack 1
-IL_0026: ldc.i4.2
IL_0027: stloc.s V_5
IL_0029: br.s IL_002b
IL_002b: ldc.i4.1
~
IL_002b: ldc.i4.1
IL_002c: brtrue.s IL_002f
-IL_002e: nop
-IL_002f: ldloc.s V_5
...
...
@@ -4174,7 +4174,7 @@ .maxstack 1
-IL_0035: ldc.i4.3
IL_0036: stloc.s V_4
IL_0038: br.s IL_003a
IL_003a: ldc.i4.1
~
IL_003a: ldc.i4.1
IL_003b: brtrue.s IL_003e
-IL_003d: nop
~IL_003e: ldloc.s V_4
...
...
@@ -4380,7 +4380,7 @@ .maxstack 2
-IL_0023: ldc.i4.2
IL_0024: stloc.s V_7
IL_0026: br.s IL_0028
IL_0028: ldc.i4.1
~
IL_0028: ldc.i4.1
IL_0029: brtrue.s IL_002c
-IL_002b: nop
-IL_002c: ldloc.s V_7
...
...
@@ -4389,7 +4389,7 @@ .maxstack 2
-IL_0032: ldc.i4.1
IL_0033: stloc.s V_5
IL_0035: br.s IL_0037
IL_0037: ldc.i4.1
~
IL_0037: ldc.i4.1
IL_0038: brtrue.s IL_003b
-IL_003a: nop
~IL_003b: ldloc.s V_5
...
...
src/Compilers/CSharp/Test/Emit/PDB/PDBTests.cs
浏览文件 @
fbaf5c84
此差异已折叠。
点击以展开。
src/EditorFeatures/TestUtilities2/Intellisense/TestState.vb
浏览文件 @
fbaf5c84
...
...
@@ -24,8 +24,8 @@ Namespace Microsoft.CodeAnalysis.Editor.UnitTests.IntelliSense
Friend
Class
TestState
Inherits
AbstractCommandHandlerTestState
Private
Const
timeoutMs
=
1
0000
Private
Const
editorTimeoutMs
=
2
0000
Private
Const
timeoutMs
=
6
0000
Private
Const
editorTimeoutMs
=
6
0000
Friend
Const
RoslynItem
=
"RoslynItem"
Friend
ReadOnly
EditorCompletionCommandHandler
As
ICommandHandler
Friend
ReadOnly
CompletionPresenterProvider
As
ICompletionPresenterProvider
...
...
src/VisualStudio/IntegrationTest/IntegrationTests/AbstractEditorTest.cs
浏览文件 @
fbaf5c84
...
...
@@ -68,6 +68,8 @@ protected void SetUpEditor(string markupCode)
{
MarkupTestFile
.
GetPosition
(
markupCode
,
out
string
code
,
out
int
caretPosition
);
VisualStudio
.
Editor
.
DismissCompletionSessions
();
var
originalValue
=
VisualStudio
.
Workspace
.
IsPrettyListingOn
(
LanguageName
);
VisualStudio
.
Workspace
.
SetPrettyListing
(
LanguageName
,
false
);
...
...
src/VisualStudio/IntegrationTest/TestUtilities/InProcess/TextViewWindow_InProc.cs
浏览文件 @
fbaf5c84
...
...
@@ -487,6 +487,13 @@ public void DismissLightBulbSession()
broker
.
DismissSession
(
view
);
});
public
void
DismissCompletionSessions
()
=>
ExecuteOnActiveView
(
view
=>
{
var
broker
=
GetComponentModel
().
GetService
<
ICompletionBroker
>();
broker
.
DismissAllSessions
(
view
);
});
protected
abstract
bool
HasActiveTextView
();
protected
abstract
IWpfTextView
GetActiveTextView
();
...
...
src/VisualStudio/IntegrationTest/TestUtilities/OutOfProcess/Editor_OutOfProc.cs
浏览文件 @
fbaf5c84
...
...
@@ -14,6 +14,7 @@
using
Microsoft.VisualStudio.IntegrationTest.Utilities.InProcess
;
using
Microsoft.VisualStudio.IntegrationTest.Utilities.Input
;
using
UIAutomationClient
;
using
Xunit
;
namespace
Microsoft.VisualStudio.IntegrationTest.Utilities.OutOfProcess
{
...
...
@@ -233,7 +234,10 @@ public bool IsUseSuggestionModeOn()
=>
_editorInProc
.
IsUseSuggestionModeOn
();
public
void
SetUseSuggestionMode
(
bool
value
)
=>
_editorInProc
.
SetUseSuggestionMode
(
value
);
{
Assert
.
False
(
IsCompletionActive
());
_editorInProc
.
SetUseSuggestionMode
(
value
);
}
public
void
WaitForActiveView
(
string
viewName
)
=>
_editorInProc
.
WaitForActiveView
(
viewName
);
...
...
src/VisualStudio/IntegrationTest/TestUtilities/OutOfProcess/TextViewWindow_OutOfProc.cs
浏览文件 @
fbaf5c84
...
...
@@ -77,6 +77,12 @@ public bool IsLightBulbSessionExpanded()
public
void
DismissLightBulbSession
()
=>
_textViewWindowInProc
.
DismissLightBulbSession
();
public
void
DismissCompletionSessions
()
{
WaitForCompletionSet
();
_textViewWindowInProc
.
DismissCompletionSessions
();
}
public
string
[]
GetLightBulbActions
()
=>
_textViewWindowInProc
.
GetLightBulbActions
();
...
...
src/Workspaces/Core/Portable/FindSymbols/FindReferences/DependentTypeFinder_Remote.cs
浏览文件 @
fbaf5c84
...
...
@@ -25,8 +25,10 @@ internal static partial class DependentTypeFinder
{
using
(
Logger
.
LogBlock
(
functionId
,
cancellationToken
))
{
var
project
=
solution
.
GetOriginatingProject
(
type
);
var
client
=
await
RemoteHostClient
.
TryGetClientAsync
(
solution
.
Workspace
,
cancellationToken
).
ConfigureAwait
(
false
);
if
(
client
!=
null
)
if
(
client
!=
null
&&
project
!=
null
)
{
var
result
=
await
client
.
TryRunRemoteAsync
<
ImmutableArray
<
SerializableSymbolAndProjectId
>>(
WellKnownServiceHubServices
.
CodeAnalysisService
,
...
...
@@ -34,7 +36,7 @@ internal static partial class DependentTypeFinder
solution
,
new
object
[]
{
SerializableSymbolAndProjectId
.
Dehydrate
(
solution
,
type
,
cancellationToken
),
SerializableSymbolAndProjectId
.
Create
(
type
,
project
,
cancellationToken
),
projects
?.
Select
(
p
=>
p
.
Id
).
ToArray
(),
transitive
,
},
...
...
src/Workspaces/Core/Portable/FindSymbols/SymbolFinder_Callers.cs
浏览文件 @
fbaf5c84
...
...
@@ -21,9 +21,6 @@ public static partial class SymbolFinder
public
static
Task
<
IEnumerable
<
SymbolCallerInfo
>>
FindCallersAsync
(
ISymbol
symbol
,
Solution
solution
,
CancellationToken
cancellationToken
=
default
)
{
if
(
solution
.
GetOriginatingProjectId
(
symbol
)
==
null
)
throw
new
ArgumentException
(
WorkspacesResources
.
Symbols_project_could_not_be_found_in_the_provided_solution
,
nameof
(
symbol
));
return
FindCallersAsync
(
symbol
,
solution
,
documents
:
null
,
cancellationToken
:
cancellationToken
);
}
...
...
@@ -33,9 +30,6 @@ public static partial class SymbolFinder
public
static
async
Task
<
IEnumerable
<
SymbolCallerInfo
>>
FindCallersAsync
(
ISymbol
symbol
,
Solution
solution
,
IImmutableSet
<
Document
>
documents
,
CancellationToken
cancellationToken
=
default
)
{
if
(
solution
.
GetOriginatingProjectId
(
symbol
)
==
null
)
throw
new
ArgumentException
(
WorkspacesResources
.
Symbols_project_could_not_be_found_in_the_provided_solution
,
nameof
(
symbol
));
symbol
=
symbol
.
OriginalDefinition
;
var
foundSymbol
=
await
FindSourceDefinitionAsync
(
symbol
,
solution
,
cancellationToken
).
ConfigureAwait
(
false
);
symbol
=
foundSymbol
??
symbol
;
...
...
@@ -77,8 +71,6 @@ async Task AddReferencingSymbols(ReferencedSymbol reference, bool isDirect)
IImmutableSet
<
Document
>
documents
,
CancellationToken
cancellationToken
=
default
)
{
Contract
.
ThrowIfNull
(
solution
.
GetOriginatingProjectId
(
symbol
),
WorkspacesResources
.
Symbols_project_could_not_be_found_in_the_provided_solution
);
if
(
symbol
!=
null
)
{
if
(
symbol
.
Kind
==
SymbolKind
.
Event
||
...
...
src/Workspaces/Core/Portable/FindSymbols/SymbolFinder_FindReferences_Current.cs
浏览文件 @
fbaf5c84
...
...
@@ -27,12 +27,12 @@ public static partial class SymbolFinder
FindReferencesSearchOptions
options
,
CancellationToken
cancellationToken
)
{
Contract
.
ThrowIfNull
(
solution
.
GetOriginatingProjectId
(
symbol
),
WorkspacesResources
.
Symbols_project_could_not_be_found_in_the_provided_solution
);
using
(
Logger
.
LogBlock
(
FunctionId
.
FindReference
,
cancellationToken
))
{
var
project
=
solution
.
GetOriginatingProject
(
symbol
);
var
client
=
await
RemoteHostClient
.
TryGetClientAsync
(
solution
.
Workspace
,
cancellationToken
).
ConfigureAwait
(
false
);
if
(
client
!=
null
)
if
(
client
!=
null
&&
project
!=
null
)
{
// Create a callback that we can pass to the server process to hear about the
// results as it finds them. When we hear about results we'll forward them to
...
...
@@ -45,7 +45,7 @@ public static partial class SymbolFinder
solution
,
new
object
[]
{
SerializableSymbolAndProjectId
.
Dehydrate
(
solution
,
symbol
,
cancellationToken
),
SerializableSymbolAndProjectId
.
Create
(
symbol
,
project
,
cancellationToken
),
documents
?.
Select
(
d
=>
d
.
Id
).
ToArray
(),
SerializableFindReferencesSearchOptions
.
Dehydrate
(
options
),
},
...
...
src/Workspaces/Core/Portable/FindSymbols/SymbolFinder_FindReferences_Legacy.cs
浏览文件 @
fbaf5c84
...
...
@@ -29,9 +29,6 @@ public static partial class SymbolFinder
Solution
solution
,
CancellationToken
cancellationToken
=
default
)
{
if
(
solution
.
GetOriginatingProjectId
(
symbol
)
==
null
)
throw
new
ArgumentException
(
WorkspacesResources
.
Symbols_project_could_not_be_found_in_the_provided_solution
,
nameof
(
symbol
));
return
FindReferencesAsync
(
symbol
,
solution
,
FindReferencesSearchOptions
.
Default
,
cancellationToken
);
}
...
...
@@ -41,8 +38,6 @@ public static partial class SymbolFinder
FindReferencesSearchOptions
options
,
CancellationToken
cancellationToken
)
{
Contract
.
ThrowIfNull
(
solution
.
GetOriginatingProjectId
(
symbol
),
WorkspacesResources
.
Symbols_project_could_not_be_found_in_the_provided_solution
);
var
progressCollector
=
new
StreamingProgressCollector
();
await
FindReferencesAsync
(
symbol
,
solution
,
progressCollector
,
...
...
@@ -63,9 +58,6 @@ public static partial class SymbolFinder
IImmutableSet
<
Document
>
documents
,
CancellationToken
cancellationToken
=
default
)
{
if
(
solution
.
GetOriginatingProjectId
(
symbol
)
==
null
)
throw
new
ArgumentException
(
WorkspacesResources
.
Symbols_project_could_not_be_found_in_the_provided_solution
,
nameof
(
symbol
));
return
FindReferencesAsync
(
symbol
,
solution
,
progress
:
null
,
documents
:
documents
,
cancellationToken
:
cancellationToken
);
}
...
...
@@ -85,9 +77,6 @@ public static partial class SymbolFinder
IImmutableSet
<
Document
>
documents
,
CancellationToken
cancellationToken
=
default
)
{
if
(
solution
.
GetOriginatingProjectId
(
symbol
)
==
null
)
throw
new
ArgumentException
(
WorkspacesResources
.
Symbols_project_could_not_be_found_in_the_provided_solution
,
nameof
(
symbol
));
return
FindReferencesAsync
(
symbol
,
solution
,
progress
,
documents
,
FindReferencesSearchOptions
.
Default
,
cancellationToken
);
...
...
@@ -101,8 +90,6 @@ public static partial class SymbolFinder
FindReferencesSearchOptions
options
,
CancellationToken
cancellationToken
)
{
Contract
.
ThrowIfNull
(
solution
.
GetOriginatingProjectId
(
symbol
),
WorkspacesResources
.
Symbols_project_could_not_be_found_in_the_provided_solution
);
progress
??=
NoOpFindReferencesProgress
.
Instance
;
var
streamingProgress
=
new
StreamingProgressCollector
(
new
StreamingFindReferencesProgressAdapter
(
progress
));
...
...
src/Workspaces/Core/Portable/FindSymbols/SymbolFinder_Hierarchy.cs
浏览文件 @
fbaf5c84
...
...
@@ -24,9 +24,6 @@ public static partial class SymbolFinder
public
static
async
Task
<
IEnumerable
<
ISymbol
>>
FindOverridesAsync
(
ISymbol
symbol
,
Solution
solution
,
IImmutableSet
<
Project
>
projects
=
null
,
CancellationToken
cancellationToken
=
default
)
{
if
(
solution
.
GetOriginatingProjectId
(
symbol
)
==
null
)
throw
new
ArgumentException
(
WorkspacesResources
.
Symbols_project_could_not_be_found_in_the_provided_solution
,
nameof
(
symbol
));
return
await
FindOverridesArrayAsync
(
symbol
,
solution
,
projects
,
cancellationToken
).
ConfigureAwait
(
false
);
}
...
...
@@ -86,9 +83,6 @@ public static partial class SymbolFinder
public
static
async
Task
<
IEnumerable
<
ISymbol
>>
FindImplementedInterfaceMembersAsync
(
ISymbol
symbol
,
Solution
solution
,
IImmutableSet
<
Project
>
projects
=
null
,
CancellationToken
cancellationToken
=
default
)
{
if
(
solution
.
GetOriginatingProjectId
(
symbol
)
==
null
)
throw
new
ArgumentException
(
WorkspacesResources
.
Symbols_project_could_not_be_found_in_the_provided_solution
,
nameof
(
symbol
));
return
await
FindImplementedInterfaceMembersArrayAsync
(
symbol
,
solution
,
projects
,
cancellationToken
).
ConfigureAwait
(
false
);
}
...
...
@@ -210,9 +204,6 @@ public static partial class SymbolFinder
if
(
solution
==
null
)
throw
new
ArgumentNullException
(
nameof
(
solution
));
if
(
solution
.
GetOriginatingProjectId
(
type
)
==
null
)
throw
new
ArgumentException
(
WorkspacesResources
.
Symbols_project_could_not_be_found_in_the_provided_solution
,
nameof
(
type
));
return
await
FindDerivedClassesArrayAsync
(
type
,
solution
,
transitive
,
projects
,
cancellationToken
).
ConfigureAwait
(
false
);
}
...
...
@@ -263,9 +254,6 @@ public static partial class SymbolFinder
if
(
solution
==
null
)
throw
new
ArgumentNullException
(
nameof
(
solution
));
if
(
solution
.
GetOriginatingProjectId
(
type
)
==
null
)
throw
new
ArgumentException
(
WorkspacesResources
.
Symbols_project_could_not_be_found_in_the_provided_solution
,
nameof
(
type
));
return
await
FindDerivedInterfacesArrayAsync
(
type
,
solution
,
transitive
,
projects
,
cancellationToken
).
ConfigureAwait
(
false
);
}
...
...
@@ -315,9 +303,6 @@ public static partial class SymbolFinder
if
(
solution
==
null
)
throw
new
ArgumentNullException
(
nameof
(
solution
));
if
(
solution
.
GetOriginatingProjectId
(
type
)
==
null
)
throw
new
ArgumentException
(
WorkspacesResources
.
Symbols_project_could_not_be_found_in_the_provided_solution
,
nameof
(
type
));
return
await
FindImplementationsArrayAsync
(
type
,
solution
,
transitive
,
projects
,
cancellationToken
).
ConfigureAwait
(
false
);
}
...
...
src/Workspaces/Core/Portable/Remote/RemoteArguments.cs
浏览文件 @
fbaf5c84
...
...
@@ -53,16 +53,18 @@ internal class SerializableSymbolAndProjectId
public
static
SerializableSymbolAndProjectId
Dehydrate
(
Solution
solution
,
ISymbol
symbol
,
CancellationToken
cancellationToken
)
{
var
symbolKey
=
symbol
.
GetSymbolKey
(
cancellationToken
);
var
projectId
=
solution
.
GetOriginatingProjectId
(
symbol
);
Contract
.
ThrowIfNull
(
projectId
,
WorkspacesResources
.
Symbols_project_could_not_be_found_in_the_provided_solution
);
var
project
=
solution
.
GetOriginatingProject
(
symbol
);
Contract
.
ThrowIfNull
(
project
,
WorkspacesResources
.
Symbols_project_could_not_be_found_in_the_provided_solution
);
return
new
SerializableSymbolAndProjectId
return
Create
(
symbol
,
project
,
cancellationToken
);
}
public
static
SerializableSymbolAndProjectId
Create
(
ISymbol
symbol
,
Project
project
,
CancellationToken
cancellationToken
)
=>
new
SerializableSymbolAndProjectId
{
SymbolKeyData
=
symbol
Key
.
ToString
(),
ProjectId
=
projectId
,
SymbolKeyData
=
symbol
.
GetSymbolKey
(
cancellationToken
)
.
ToString
(),
ProjectId
=
project
.
Id
,
};
}
public
async
Task
<
ISymbol
>
TryRehydrateAsync
(
Solution
solution
,
CancellationToken
cancellationToken
)
...
...
src/Workspaces/Core/Portable/Rename/RenameLocations.cs
浏览文件 @
fbaf5c84
...
...
@@ -125,14 +125,15 @@ internal sealed partial class RenameLocations
{
Contract
.
ThrowIfNull
(
solution
);
Contract
.
ThrowIfNull
(
symbol
);
Contract
.
ThrowIfNull
(
solution
.
GetOriginatingProjectId
(
symbol
),
WorkspacesResources
.
Symbols_project_could_not_be_found_in_the_provided_solution
);
cancellationToken
.
ThrowIfCancellationRequested
();
using
(
Logger
.
LogBlock
(
FunctionId
.
Renamer_FindRenameLocationsAsync
,
cancellationToken
))
{
var
project
=
solution
.
GetOriginatingProject
(
symbol
);
var
client
=
await
RemoteHostClient
.
TryGetClientAsync
(
solution
.
Workspace
,
cancellationToken
).
ConfigureAwait
(
false
);
if
(
client
!=
null
)
if
(
client
!=
null
&&
project
!=
null
)
{
var
result
=
await
client
.
TryRunRemoteAsync
<
SerializableRenameLocations
>(
WellKnownServiceHubServices
.
CodeAnalysisService
,
...
...
@@ -140,7 +141,7 @@ internal sealed partial class RenameLocations
solution
,
new
object
[]
{
SerializableSymbolAndProjectId
.
Dehydrate
(
solution
,
symbol
,
cancellationToken
),
SerializableSymbolAndProjectId
.
Create
(
symbol
,
project
,
cancellationToken
),
SerializableRenameOptionSet
.
Dehydrate
(
optionSet
),
},
callbackTarget
:
null
,
...
...
src/Workspaces/Core/Portable/Rename/Renamer.cs
浏览文件 @
fbaf5c84
...
...
@@ -27,9 +27,6 @@ public static partial class Renamer
if
(
symbol
==
null
)
throw
new
ArgumentNullException
(
nameof
(
symbol
));
if
(
solution
.
GetOriginatingProjectId
(
symbol
)
==
null
)
throw
new
ArgumentException
(
WorkspacesResources
.
Symbols_project_could_not_be_found_in_the_provided_solution
,
nameof
(
symbol
));
if
(
string
.
IsNullOrEmpty
(
newName
))
throw
new
ArgumentException
(
nameof
(
newName
));
...
...
@@ -117,15 +114,16 @@ internal static Task<RenameLocations> FindRenameLocationsAsync(Solution solution
{
Contract
.
ThrowIfNull
(
solution
);
Contract
.
ThrowIfNull
(
symbol
);
Contract
.
ThrowIfNull
(
solution
.
GetOriginatingProjectId
(
symbol
),
WorkspacesResources
.
Symbols_project_could_not_be_found_in_the_provided_solution
);
Contract
.
ThrowIfTrue
(
string
.
IsNullOrEmpty
(
newName
));
cancellationToken
.
ThrowIfCancellationRequested
();
using
(
Logger
.
LogBlock
(
FunctionId
.
Renamer_RenameSymbolAsync
,
cancellationToken
))
{
var
project
=
solution
.
GetOriginatingProject
(
symbol
);
var
client
=
await
RemoteHostClient
.
TryGetClientAsync
(
solution
.
Workspace
,
cancellationToken
).
ConfigureAwait
(
false
);
if
(
client
!=
null
)
if
(
project
!=
null
&&
client
!=
null
)
{
var
result
=
await
client
.
TryRunRemoteAsync
<
SerializableConflictResolution
>(
WellKnownServiceHubServices
.
CodeAnalysisService
,
...
...
@@ -133,7 +131,7 @@ internal static Task<RenameLocations> FindRenameLocationsAsync(Solution solution
solution
,
new
object
[]
{
SerializableSymbolAndProjectId
.
Dehydrate
(
solution
,
symbol
,
cancellationToken
),
SerializableSymbolAndProjectId
.
Create
(
symbol
,
project
,
cancellationToken
),
newName
,
SerializableRenameOptionSet
.
Dehydrate
(
optionSet
),
nonConflictSymbols
?.
Select
(
s
=>
SerializableSymbolAndProjectId
.
Dehydrate
(
solution
,
s
,
cancellationToken
)).
ToArray
(),
...
...
@@ -163,7 +161,6 @@ internal static Task<RenameLocations> FindRenameLocationsAsync(Solution solution
{
Contract
.
ThrowIfNull
(
solution
);
Contract
.
ThrowIfNull
(
symbol
);
Contract
.
ThrowIfNull
(
solution
.
GetOriginatingProjectId
(
symbol
),
WorkspacesResources
.
Symbols_project_could_not_be_found_in_the_provided_solution
);
Contract
.
ThrowIfTrue
(
string
.
IsNullOrEmpty
(
newName
));
cancellationToken
.
ThrowIfCancellationRequested
();
...
...
src/Workspaces/Remote/ServiceHub/Services/CodeAnalysisService_DependentTypeFinder.cs
浏览文件 @
fbaf5c84
...
...
@@ -37,7 +37,7 @@ internal partial class CodeAnalysisService : IRemoteDependentTypeFinder
var
types
=
await
func
(
namedType
,
solution
,
projects
).
ConfigureAwait
(
false
);
return
types
.
SelectAsArray
(
(
Func
<
INamedTypeSymbol
,
SerializableSymbolAndProjectId
>)(
t
=>
SerializableSymbolAndProjectId
.
Dehydrate
(
solution
,
t
,
cancellationToken
)
));
t
=>
SerializableSymbolAndProjectId
.
Dehydrate
(
solution
,
t
,
cancellationToken
));
}
},
cancellationToken
);
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录