Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit76d9a1d

Browse files
TIHanunknown
authored and
unknown
committed
Changed address optimization to not optimize on top level static bindings.
1 parent3bd5262 commit76d9a1d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

‎src/fsharp/opt.fs‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1800,8 +1800,8 @@ and OptimizeExprOp cenv env (op,tyargs,args,m) =
18001800
lete,_= OptimizeExpr cenv env(exprForValRef m lv)
18011801
letop'=
18021802
match ewith
1803-
//We are only able to get the address of local refs.
1804-
| Expr.Val(v,_,_)whenv.IsLocalRef-> TOp.LValueOp(LGetAddr,v)
1803+
//Do not optimize if it's a top level static binding.
1804+
| Expr.Val(v,_,_)whennot v.IsCompiledAsTopLevel-> TOp.LValueOp(LGetAddr,v)
18051805
|_-> op
18061806
Expr.Op(op',tyargs,args,m),
18071807
{ TotalSize=1;

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp