Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
dotNET Platform
fsharp
提交
02b41ce3
F
fsharp
项目概览
dotNET Platform
/
fsharp
11 个月 前同步成功
通知
0
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
F
fsharp
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
02b41ce3
编写于
10月 31, 2019
作者:
T
TIHan
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Removed rest of unrelated code changes to fix
上级
eb333d99
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
12 addition
and
12 deletion
+12
-12
src/fsharp/IlxGen.fs
src/fsharp/IlxGen.fs
+12
-12
未找到文件。
src/fsharp/IlxGen.fs
浏览文件 @
02b41ce3
...
...
@@ -847,14 +847,14 @@ and IlxGenEnv =
withinSEH
:
bool
/// Are we inside of a recursive let binding, while loop, or a for loop?
inLoop
:
bool
i
sI
nLoop
:
bool
}
override
__.
ToString
()
=
"<IlxGenEnv>"
let
SetI
nLoop
i
nLoop
eenv
=
if
eenv
.
i
nLoop
=
i
nLoop
then
eenv
else
{
eenv
with
i
nLoop
=
i
nLoop
}
let
SetI
sInLoop
isI
nLoop
eenv
=
if
eenv
.
i
sInLoop
=
isI
nLoop
then
eenv
else
{
eenv
with
i
sInLoop
=
isI
nLoop
}
let
ReplaceTyenv
tyenv
(
eenv
:
IlxGenEnv
)
=
{
eenv
with
tyenv
=
tyenv
}
...
...
@@ -1911,9 +1911,9 @@ let CodeGenThen cenv mgbuf (entryPointInfo, methodName, eenv, alreadyUsedArgs, c
let
innerVals
=
entryPointInfo
|>
List
.
map
(
fun
(
v
,
kind
)
->
(
v
,
(
kind
,
start
)))
(* Call the given code generator *)
codeGenFunction
cgbuf
{
eenv
with
withinSEH
=
false
liveLocals
=
IntMap
.
empty
()
innerVals
=
innerVals
}
codeGenFunction
cgbuf
{
eenv
with
withinSEH
=
false
liveLocals
=
IntMap
.
empty
()
innerVals
=
innerVals
}
let
locals
,
maxStack
,
lab2pc
,
code
,
exnSpecs
,
hasSequencePoints
=
cgbuf
.
Close
()
...
...
@@ -3535,7 +3535,7 @@ and GenTryFinally cenv cgbuf eenv (bodyExpr, handlerExpr, m, resty, spTry, spFin
//--------------------------------------------------------------------------
and
GenForLoop
cenv
cgbuf
eenv
(
spFor
,
v
,
e1
,
dir
,
e2
,
loopBody
,
m
)
sequel
=
let
eenv
=
SetInLoop
true
eenv
let
eenv
=
SetI
sI
nLoop
true
eenv
let
g
=
cenv
.
g
// The JIT/NGen eliminate array-bounds checks for C# loops of form:
...
...
@@ -3626,7 +3626,7 @@ and GenForLoop cenv cgbuf eenv (spFor, v, e1, dir, e2, loopBody, m) sequel =
//--------------------------------------------------------------------------
and
GenWhileLoop
cenv
cgbuf
eenv
(
spWhile
,
e1
,
e2
,
m
)
sequel
=
let
eenv
=
SetInLoop
true
eenv
let
eenv
=
SetI
sI
nLoop
true
eenv
let
finish
=
CG
.
GenerateDelayMark
cgbuf
"while_finish"
let
startTest
=
CG
.
GenerateMark
cgbuf
"startTest"
...
...
@@ -5193,7 +5193,7 @@ and GenLetRecFixup cenv cgbuf eenv (ilxCloSpec: IlxClosureSpec, e, ilField: ILFi
/// Generate letrec bindings
and
GenLetRecBindings
cenv
(
cgbuf
:
CodeGenBuffer
)
eenv
(
allBinds
:
Bindings
,
m
)
=
let
eenv
=
SetInLoop
true
eenv
let
eenv
=
SetI
sI
nLoop
true
eenv
// Fix up recursion for non-toplevel recursive bindings
let
bindsPossiblyRequiringFixup
=
allBinds
|>
List
.
filter
(
fun
b
->
...
...
@@ -5443,7 +5443,7 @@ and GenBindingAfterSequencePoint cenv cgbuf eenv sp (TBind(vspec, rhsExpr, _)) s
let
storage
=
StorageForVal
cenv
.
g
m
vspec
eenv
match
storage
,
rhsExpr
with
// locals are zero-init, no need to initialize them, except if you are in a loop and the local is mutable.
|
Local
(_,
realloc
,
_),
Expr
.
Const
(
Const
.
Zero
,
_,
_)
when
not
realloc
&&
not
(
eenv
.
inLoop
&&
vspec
.
IsMutable
)
->
|
Local
(_,
realloc
,
_),
Expr
.
Const
(
Const
.
Zero
,
_,
_)
when
not
realloc
&&
not
(
eenv
.
i
sI
nLoop
&&
vspec
.
IsMutable
)
->
CommitStartScope
cgbuf
startScopeMarkOpt
|
_
->
GenBindingRhs
cenv
cgbuf
eenv
SPSuppress
vspec
rhsExpr
...
...
@@ -7578,7 +7578,7 @@ let GetEmptyIlxGenEnv (ilg: ILGlobals) ccu =
innerVals
=
[]
sigToImplRemapInfo
=
[]
(* "module remap info" *)
withinSEH
=
false
inLoop
=
false
}
i
sI
nLoop
=
false
}
type
IlxGenResults
=
{
ilTypeDefs
:
ILTypeDef
list
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录