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

Commitaf82cbe

Browse files
committed
2 parents51a19b9 +c2406fd commitaf82cbe

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

‎src/fsharp/IlxGen.fs‎

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2072,7 +2072,14 @@ and GenConstant cenv cgbuf eenv (c,m,ty) sequel =
20722072
| Const.SByte i-> CG.EmitInstr cgbuf(pop0)(Push[ilTy])(mkLdcInt32(int32 i))
20732073
| Const.Int16 i-> CG.EmitInstr cgbuf(pop0)(Push[ilTy])(mkLdcInt32(int32 i))
20742074
| Const.Int32 i-> CG.EmitInstr cgbuf(pop0)(Push[ilTy])(mkLdcInt32 i)
2075-
| Const.Int64 i-> CG.EmitInstr cgbuf(pop0)(Push[ilTy])(iLdcInt64 i)
2075+
| Const.Int64 i->
2076+
// see https://github.com/Microsoft/visualfsharp/pull/3620
2077+
if i>= int64 System.Int32.MinValue&& i<= int64 System.Int32.MaxValuethen
2078+
CG.EmitInstrs cgbuf(pop0)(Push[ilTy])[ mkLdcInt32(int32 i); AI_conv DT_I8]
2079+
elif i>= int64 System.UInt32.MinValue&& i<= int64 System.UInt32.MaxValuethen
2080+
CG.EmitInstrs cgbuf(pop0)(Push[ilTy])[ mkLdcInt32(int32 i); AI_conv DT_U8]
2081+
else
2082+
CG.EmitInstr cgbuf(pop0)(Push[ilTy])(iLdcInt64 i)
20762083
| Const.IntPtr i-> CG.EmitInstrs cgbuf(pop0)(Push[ilTy])[iLdcInt64 i; AI_conv DT_I]
20772084
| Const.Byte i-> CG.EmitInstr cgbuf(pop0)(Push[ilTy])(mkLdcInt32(int32 i))
20782085
| Const.UInt16 i-> CG.EmitInstr cgbuf(pop0)(Push[ilTy])(mkLdcInt32(int32 i))

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp