Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
lwm1986
roslyn
提交
1893873b
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,发现更多精彩内容 >>
提交
1893873b
编写于
3月 02, 2015
作者:
C
Charles Stoner
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Correct private field names
上级
3f996871
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
18 addition
and
17 deletion
+18
-17
src/Compilers/VisualBasic/Portable/Lowering/StateMachineRewriter/StateMachineRewriter.StateMachineMethodToClassRewriter.vb
...StateMachineRewriter.StateMachineMethodToClassRewriter.vb
+17
-17
src/Interactive/EditorFeatures/Core/Extensibility/Interactive/InteractiveEvaluator.cs
...es/Core/Extensibility/Interactive/InteractiveEvaluator.cs
+1
-0
未找到文件。
src/Compilers/VisualBasic/Portable/Lowering/StateMachineRewriter/StateMachineRewriter.StateMachineMethodToClassRewriter.vb
浏览文件 @
1893873b
...
...
@@ -47,18 +47,18 @@ Namespace Microsoft.CodeAnalysis.VisualBasic
''' block that we are within has a finalizer state. Initially true as we have the (trivial)
''' finalizer state of -1 at the top level.
''' </summary>
Private
H
asFinalizerState
As
Boolean
=
True
Private
_h
asFinalizerState
As
Boolean
=
True
''' <summary>
''' If hasFinalizerState is true, this is the state for finalization from anywhere in this try block.
''' Initially set to -1, representing the no-op finalization required at the top level.
''' </summary>
Private
C
urrentFinalizerState
As
Integer
=
-
1
Private
_c
urrentFinalizerState
As
Integer
=
-
1
''' <summary>
''' The set of local variables and parameters that were hoisted and need a proxy.
''' </summary>
Private
ReadOnly
H
oistedVariables
As
IReadOnlySet
(
Of
Symbol
)
=
Nothing
Private
ReadOnly
_h
oistedVariables
As
IReadOnlySet
(
Of
Symbol
)
=
Nothing
Private
ReadOnly
_synthesizedLocalOrdinals
As
SynthesizedLocalOrdinalsDispenser
Private
_nextFreeHoistedLocalSlot
As
Integer
...
...
@@ -84,7 +84,7 @@ Namespace Microsoft.CodeAnalysis.VisualBasic
Me
.
F
=
F
Me
.
StateField
=
stateField
Me
.
CachedState
=
F
.
SynthesizedLocal
(
F
.
SpecialType
(
SpecialType
.
System_Int32
),
SynthesizedLocalKind
.
StateMachineCachedState
,
F
.
Syntax
)
Me
.
H
oistedVariables
=
hoistedVariables
Me
.
_h
oistedVariables
=
hoistedVariables
Me
.
_synthesizedLocalOrdinals
=
synthesizedLocalOrdinals
Me
.
_nextFreeHoistedLocalSlot
=
nextFreeHoistedLocalSlot
...
...
@@ -148,15 +148,15 @@ Namespace Microsoft.CodeAnalysis.VisualBasic
Me
.
Dispatches
=
New
Dictionary
(
Of
LabelSymbol
,
List
(
Of
Integer
))()
End
If
If
Not
Me
.
H
asFinalizerState
Then
Me
.
C
urrentFinalizerState
=
Me
.
NextState
If
Not
Me
.
_h
asFinalizerState
Then
Me
.
_c
urrentFinalizerState
=
Me
.
NextState
Me
.
NextState
+=
1
Me
.
H
asFinalizerState
=
True
Me
.
_h
asFinalizerState
=
True
End
If
Dim
resumeLabel
As
GeneratedLabelSymbol
=
Me
.
F
.
GenerateLabel
(
ResumeLabelName
)
Me
.
Dispatches
.
Add
(
resumeLabel
,
New
List
(
Of
Integer
)()
From
{
stateNumber
})
Me
.
FinalizerStateMap
.
Add
(
stateNumber
,
Me
.
C
urrentFinalizerState
)
Me
.
FinalizerStateMap
.
Add
(
stateNumber
,
Me
.
_c
urrentFinalizerState
)
Return
New
StateInfo
(
stateNumber
,
resumeLabel
)
End
Function
...
...
@@ -232,7 +232,7 @@ Namespace Microsoft.CodeAnalysis.VisualBasic
Private
Function
NeedsProxy
(
localOrParameter
As
Symbol
)
As
Boolean
Debug
.
Assert
(
localOrParameter
.
Kind
=
SymbolKind
.
Local
OrElse
localOrParameter
.
Kind
=
SymbolKind
.
Parameter
)
Return
H
oistedVariables
.
Contains
(
localOrParameter
)
Return
_h
oistedVariables
.
Contains
(
localOrParameter
)
End
Function
Friend
MustOverride
Sub
AddProxyFieldsForStateMachineScope
(
proxy
As
TProxy
,
proxyFields
As
ArrayBuilder
(
Of
FieldSymbol
))
...
...
@@ -254,22 +254,22 @@ Namespace Microsoft.CodeAnalysis.VisualBasic
Public
Overrides
Function
VisitTryStatement
(
node
As
BoundTryStatement
)
As
BoundNode
Dim
oldDispatches
As
Dictionary
(
Of
LabelSymbol
,
List
(
Of
Integer
))
=
Me
.
Dispatches
Dim
oldFinalizerState
As
Integer
=
Me
.
C
urrentFinalizerState
Dim
oldHasFinalizerState
As
Boolean
=
Me
.
H
asFinalizerState
Dim
oldFinalizerState
As
Integer
=
Me
.
_c
urrentFinalizerState
Dim
oldHasFinalizerState
As
Boolean
=
Me
.
_h
asFinalizerState
Me
.
Dispatches
=
Nothing
Me
.
C
urrentFinalizerState
=
-
1
Me
.
H
asFinalizerState
=
False
Me
.
_c
urrentFinalizerState
=
-
1
Me
.
_h
asFinalizerState
=
False
Dim
tryBlock
As
BoundBlock
=
Me
.
F
.
Block
(
DirectCast
(
Me
.
Visit
(
node
.
TryBlock
),
BoundStatement
))
Dim
dispatchLabel
As
GeneratedLabelSymbol
=
Nothing
If
Me
.
Dispatches
IsNot
Nothing
Then
dispatchLabel
=
Me
.
F
.
GenerateLabel
(
"tryDispatch"
)
If
Me
.
H
asFinalizerState
Then
If
Me
.
_h
asFinalizerState
Then
' cause the current finalizer state to arrive here and then "return false"
Dim
finalizer
As
GeneratedLabelSymbol
=
Me
.
F
.
GenerateLabel
(
"finalizer"
)
Me
.
Dispatches
.
Add
(
finalizer
,
New
List
(
Of
Integer
)()
From
{
Me
.
C
urrentFinalizerState
})
Me
.
Dispatches
.
Add
(
finalizer
,
New
List
(
Of
Integer
)()
From
{
Me
.
_c
urrentFinalizerState
})
Dim
skipFinalizer
As
GeneratedLabelSymbol
=
Me
.
F
.
GenerateLabel
(
"skipFinalizer"
)
tryBlock
=
Me
.
F
.
Block
(
Me
.
F
.
HiddenSequencePoint
(),
...
...
@@ -293,8 +293,8 @@ Namespace Microsoft.CodeAnalysis.VisualBasic
oldDispatches
.
Add
(
dispatchLabel
,
New
List
(
Of
Integer
)(
From
kv
In
Dispatches
.
Values
From
n
In
kv
Order
By
n
Select
n
))
End
If
Me
.
H
asFinalizerState
=
oldHasFinalizerState
Me
.
C
urrentFinalizerState
=
oldFinalizerState
Me
.
_h
asFinalizerState
=
oldHasFinalizerState
Me
.
_c
urrentFinalizerState
=
oldFinalizerState
Me
.
Dispatches
=
oldDispatches
...
...
src/Interactive/EditorFeatures/Core/Extensibility/Interactive/InteractiveEvaluator.cs
浏览文件 @
1893873b
...
...
@@ -426,6 +426,7 @@ public virtual bool CanExecuteText(string text)
public
Task
<
ExecutionResult
>
ResetAsync
(
bool
initialize
=
true
)
{
GetInteractiveWindow
().
AddLogicalInput
(
_interactiveCommands
.
CommandPrefix
+
"reset"
);
GetInteractiveWindow
().
WriteLine
(
"Resetting execution engine."
);
GetInteractiveWindow
().
Flush
();
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录