Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
lwm1986
roslyn
提交
f63640d2
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,发现更多精彩内容 >>
提交
f63640d2
编写于
9月 24, 2014
作者:
C
ChuckStoner
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Added LocalSymbol.CanScheduleToStack property (changeset 1342014)
上级
97ce79c8
变更
4
显示空白变更内容
内联
并排
Showing
4 changed file
with
15 addition
and
5 deletion
+15
-5
Src/Compilers/CSharp/Portable/CodeGen/Optimizer.cs
Src/Compilers/CSharp/Portable/CodeGen/Optimizer.cs
+1
-2
Src/Compilers/CSharp/Portable/Symbols/LocalSymbol.cs
Src/Compilers/CSharp/Portable/Symbols/LocalSymbol.cs
+5
-0
Src/Compilers/VisualBasic/Portable/CodeGen/Optimizer/StackScheduler.Analyzer.vb
...sic/Portable/CodeGen/Optimizer/StackScheduler.Analyzer.vb
+1
-3
Src/Compilers/VisualBasic/Portable/Symbols/Source/LocalSymbol.vb
...pilers/VisualBasic/Portable/Symbols/Source/LocalSymbol.vb
+8
-0
未找到文件。
Src/Compilers/CSharp/Portable/CodeGen/Optimizer.cs
浏览文件 @
f63640d2
...
...
@@ -1592,8 +1592,7 @@ private void RecordVarWrite(LocalSymbol local)
private
static
bool
CanScheduleToStack
(
LocalSymbol
local
)
{
// cannot schedule constants and pinned locals
return
!(
local
.
IsConst
||
local
.
IsPinned
);
return
local
.
CanScheduleToStack
;
}
private
void
DeclareLocals
(
ImmutableArray
<
LocalSymbol
>
locals
,
int
stack
)
...
...
Src/Compilers/CSharp/Portable/Symbols/LocalSymbol.cs
浏览文件 @
f63640d2
...
...
@@ -23,6 +23,11 @@ protected LocalSymbol()
get
;
}
internal
virtual
bool
CanScheduleToStack
{
get
{
return
!
IsConst
&&
!
IsPinned
;
}
}
internal
abstract
SyntaxToken
IdentifierToken
{
get
;
...
...
Src/Compilers/VisualBasic/Portable/CodeGen/Optimizer/StackScheduler.Analyzer.vb
浏览文件 @
f63640d2
...
...
@@ -1169,9 +1169,7 @@ Namespace Microsoft.CodeAnalysis.VisualBasic.CodeGen
End
Sub
Private
Shared
Function
CanScheduleToStack
(
local
As
LocalSymbol
)
As
Boolean
' cannot schedule constants and catch variables
' in theory catch vars could be scheduled, but are not worth the trouble.
Return
Not
(
local
.
IsConst
OrElse
local
.
IsCatch
)
Return
local
.
CanScheduleToStack
End
Function
Private
Sub
DeclareLocals
(
locals
As
ImmutableArray
(
Of
LocalSymbol
),
stack
As
Integer
)
...
...
Src/Compilers/VisualBasic/Portable/Symbols/Source/LocalSymbol.vb
浏览文件 @
f63640d2
...
...
@@ -248,6 +248,14 @@ Namespace Microsoft.CodeAnalysis.VisualBasic.Symbols
End
Get
End
Property
Friend
Overridable
ReadOnly
Property
CanScheduleToStack
As
Boolean
Get
' cannot schedule constants and catch variables
' in theory catch vars could be scheduled, but are not worth the trouble.
Return
Not
IsConst
AndAlso
Not
IsCatch
End
Get
End
Property
Public
ReadOnly
Property
IsStatic
As
Boolean
Get
Return
Me
.
DeclarationKind
=
LocalDeclarationKind
.
Static
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录