Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
dotNET Platform
fsharp
提交
fa6e7ccd
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,发现更多精彩内容 >>
提交
fa6e7ccd
编写于
10月 31, 2019
作者:
S
Sergey Tihon
提交者:
Kevin Ransom (msft)
10月 30, 2019
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Moved CodeGen/EmittedIL/TailCalls over to NUnit (#7386)
* TailCalls test migration * fix the diff in IL * fix for netcore
上级
d3a2f7b1
变更
15
隐藏空白更改
内联
并排
Showing
15 changed file
with
255 addition
and
587 deletion
+255
-587
tests/fsharp/Compiler/CodeGen/EmittedIL/TailCalls.fs
tests/fsharp/Compiler/CodeGen/EmittedIL/TailCalls.fs
+253
-0
tests/fsharp/Compiler/ILChecker.fs
tests/fsharp/Compiler/ILChecker.fs
+1
-1
tests/fsharp/FSharpSuite.Tests.fsproj
tests/fsharp/FSharpSuite.Tests.fsproj
+1
-0
tests/fsharpqa/Source/CodeGen/EmittedIL/TailCalls/TailCall01.fs
...fsharpqa/Source/CodeGen/EmittedIL/TailCalls/TailCall01.fs
+0
-4
tests/fsharpqa/Source/CodeGen/EmittedIL/TailCalls/TailCall01.il.bsl
...rpqa/Source/CodeGen/EmittedIL/TailCalls/TailCall01.il.bsl
+0
-111
tests/fsharpqa/Source/CodeGen/EmittedIL/TailCalls/TailCall02.fs
...fsharpqa/Source/CodeGen/EmittedIL/TailCalls/TailCall02.fs
+0
-5
tests/fsharpqa/Source/CodeGen/EmittedIL/TailCalls/TailCall02.il.bsl
...rpqa/Source/CodeGen/EmittedIL/TailCalls/TailCall02.il.bsl
+0
-97
tests/fsharpqa/Source/CodeGen/EmittedIL/TailCalls/TailCall03.fs
...fsharpqa/Source/CodeGen/EmittedIL/TailCalls/TailCall03.fs
+0
-4
tests/fsharpqa/Source/CodeGen/EmittedIL/TailCalls/TailCall03.il.bsl
...rpqa/Source/CodeGen/EmittedIL/TailCalls/TailCall03.il.bsl
+0
-120
tests/fsharpqa/Source/CodeGen/EmittedIL/TailCalls/TailCall04.fs
...fsharpqa/Source/CodeGen/EmittedIL/TailCalls/TailCall04.fs
+0
-5
tests/fsharpqa/Source/CodeGen/EmittedIL/TailCalls/TailCall04.il.bsl
...rpqa/Source/CodeGen/EmittedIL/TailCalls/TailCall04.il.bsl
+0
-112
tests/fsharpqa/Source/CodeGen/EmittedIL/TailCalls/TailCall05.fs
...fsharpqa/Source/CodeGen/EmittedIL/TailCalls/TailCall05.fs
+0
-4
tests/fsharpqa/Source/CodeGen/EmittedIL/TailCalls/TailCall05.il.bsl
...rpqa/Source/CodeGen/EmittedIL/TailCalls/TailCall05.il.bsl
+0
-118
tests/fsharpqa/Source/CodeGen/EmittedIL/TailCalls/env.lst
tests/fsharpqa/Source/CodeGen/EmittedIL/TailCalls/env.lst
+0
-5
tests/fsharpqa/Source/CodeGen/EmittedIL/TailCalls/keep.lst
tests/fsharpqa/Source/CodeGen/EmittedIL/TailCalls/keep.lst
+0
-1
未找到文件。
tests/fsharp/Compiler/CodeGen/EmittedIL/TailCalls.fs
0 → 100644
浏览文件 @
fa6e7ccd
// Copyright (c) Microsoft Corporation. All Rights Reserved. See License.txt in the project root for license information.
namespace
FSharp
.
Compiler
.
UnitTests
.
CodeGen
.
EmittedIL
open
FSharp
.
Compiler
.
UnitTests
open
NUnit
.
Framework
[<
TestFixture
>]
module
``TailCalls``
=
// Regression test for DevDiv:72571
[<
Test
>]
let
``TailCall 01``
()
=
CompilerAssert
.
CompileLibraryAndVerifyILWithOptions
[|
"-g"
;
"--optimize-"
;
"--tailcalls+"
|]
"""
module TailCall01
let foo(x:int, y) = printfn "
%
d
" x
let run() = let x = 0 in foo(x,5)
"""
(
fun
verifier
->
verifier
.
VerifyIL
[
"""
.method public static void foo<a>(int32 x,
!!a y) cil managed
{
.maxstack 4
.locals init (class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2<int32,class [FSharp.Core]Microsoft.FSharp.Core.Unit> V_0,
int32 V_1)
IL_0000: ldstr "
%
d
"
IL_0005: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5<class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2<int32,class [FSharp.Core]Microsoft.FSharp.Core.Unit>,class [runtime]System.IO.TextWriter,class [FSharp.Core]Microsoft.FSharp.Core.Unit,class [FSharp.Core]Microsoft.FSharp.Core.Unit,int32>::.ctor(string)
IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatLine<class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2<int32,class [FSharp.Core]Microsoft.FSharp.Core.Unit>>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4<!!0,class [runtime]System.IO.TextWriter,class [FSharp.Core]Microsoft.FSharp.Core.Unit,class [FSharp.Core]Microsoft.FSharp.Core.Unit>)
IL_000f: stloc.0
IL_0010: ldarg.0
IL_0011: stloc.1
IL_0012: ldloc.0
IL_0013: ldloc.1
IL_0014: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2<int32,class [FSharp.Core]Microsoft.FSharp.Core.Unit>::Invoke(!0)
IL_0019: pop
IL_001a: ret
}
"""
"""
.method public static void run() cil managed
{
.maxstack 4
.locals init (int32 V_0)
IL_0000: ldc.i4.0
IL_0001: stloc.0
IL_0002: ldloc.0
IL_0003: ldc.i4.5
IL_0004: tail.
IL_0006: call void TailCall01::foo<int32>(int32,
!!0)
IL_000b: ret
}
"""
])
[<
Test
>]
let
``TailCall 02``
()
=
CompilerAssert
.
CompileLibraryAndVerifyILWithOptions
[|
"-g"
;
"--optimize-"
;
"--tailcalls+"
|]
"""
module TailCall02
let foo(x:int byref) = x
let run() = let mutable x = 0 in foo(&x)
"""
(
fun
verifier
->
verifier
.
VerifyIL
[
"""
.method public static int32 foo(int32& x) cil managed
{
.maxstack 8
IL_0000: ldarg.0
IL_0001: ldobj [runtime]System.Int32
IL_0006: ret
}
"""
"""
.method public static int32 run() cil managed
{
.maxstack 3
.locals init (int32 V_0)
IL_0000: ldc.i4.0
IL_0001: stloc.0
IL_0002: ldloca.s V_0
IL_0004: call int32 TailCall02::foo(int32&)
IL_0009: ret
}
"""
])
[<
Test
>]
let
``TailCall 03``
()
=
CompilerAssert
.
CompileLibraryAndVerifyILWithOptions
[|
"-g"
;
"--optimize-"
;
"--tailcalls+"
|]
"""
module TailCall03
let foo (x:int byref) (y:int byref) z = printfn "
%
d
" (x+y)
let run() = let mutable x = 0 in foo &x &x 5
"""
(
fun
verifier
->
verifier
.
VerifyIL
[
"""
.method public static void foo<a>(int32& x,
int32& y,
!!a z) cil managed
{
.custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationArgumentCountsAttribute::.ctor(int32[]) = ( 01 00 03 00 00 00 01 00 00 00 01 00 00 00 01 00
00 00 00 00 )
.maxstack 4
.locals init (class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2<int32,class [FSharp.Core]Microsoft.FSharp.Core.Unit> V_0,
int32 V_1)
IL_0000: ldstr "
%
d
"
IL_0005: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5<class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2<int32,class [FSharp.Core]Microsoft.FSharp.Core.Unit>,class [runtime]System.IO.TextWriter,class [FSharp.Core]Microsoft.FSharp.Core.Unit,class [FSharp.Core]Microsoft.FSharp.Core.Unit,int32>::.ctor(string)
IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatLine<class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2<int32,class [FSharp.Core]Microsoft.FSharp.Core.Unit>>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4<!!0,class [runtime]System.IO.TextWriter,class [FSharp.Core]Microsoft.FSharp.Core.Unit,class [FSharp.Core]Microsoft.FSharp.Core.Unit>)
IL_000f: stloc.0
IL_0010: ldarg.0
IL_0011: ldobj [runtime]System.Int32
IL_0016: ldarg.1
IL_0017: ldobj [runtime]System.Int32
IL_001c: add
IL_001d: stloc.1
IL_001e: ldloc.0
IL_001f: ldloc.1
IL_0020: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2<int32,class [FSharp.Core]Microsoft.FSharp.Core.Unit>::Invoke(!0)
IL_0025: pop
IL_0026: ret
}
"""
"""
.method public static void run() cil managed
{
.maxstack 5
.locals init (int32 V_0)
IL_0000: ldc.i4.0
IL_0001: stloc.0
IL_0002: ldloca.s V_0
IL_0004: ldloca.s V_0
IL_0006: ldc.i4.5
IL_0007: call void TailCall03::foo<int32>(int32&,
int32&,
!!0)
IL_000c: nop
IL_000d: ret
}
"""
])
[<
Test
>]
let
``TailCall 04``
()
=
CompilerAssert
.
CompileLibraryAndVerifyILWithOptions
[|
"-g"
;
"--optimize-"
;
"--tailcalls+"
|]
"""
module TailCall04
let foo(x:int byref, y) = printfn "
%
d
" x
let run() = let mutable x = 0 in foo(&x,5)
"""
(
fun
verifier
->
verifier
.
VerifyIL
[
"""
.method public static void foo<a>(int32& x,
!!a y) cil managed
{
.maxstack 4
.locals init (class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2<int32,class [FSharp.Core]Microsoft.FSharp.Core.Unit> V_0,
int32 V_1)
IL_0000: ldstr "
%
d
"
IL_0005: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5<class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2<int32,class [FSharp.Core]Microsoft.FSharp.Core.Unit>,class [runtime]System.IO.TextWriter,class [FSharp.Core]Microsoft.FSharp.Core.Unit,class [FSharp.Core]Microsoft.FSharp.Core.Unit,int32>::.ctor(string)
IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatLine<class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2<int32,class [FSharp.Core]Microsoft.FSharp.Core.Unit>>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4<!!0,class [runtime]System.IO.TextWriter,class [FSharp.Core]Microsoft.FSharp.Core.Unit,class [FSharp.Core]Microsoft.FSharp.Core.Unit>)
IL_000f: stloc.0
IL_0010: ldarg.0
IL_0011: ldobj [runtime]System.Int32
IL_0016: stloc.1
IL_0017: ldloc.0
IL_0018: ldloc.1
IL_0019: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2<int32,class [FSharp.Core]Microsoft.FSharp.Core.Unit>::Invoke(!0)
IL_001e: pop
IL_001f: ret
}
"""
"""
.method public static void run() cil managed
{
.maxstack 4
.locals init (int32 V_0)
IL_0000: ldc.i4.0
IL_0001: stloc.0
IL_0002: ldloca.s V_0
IL_0004: ldc.i4.5
IL_0005: call void TailCall04::foo<int32>(int32&,
!!0)
IL_000a: nop
IL_000b: ret
"""
])
[<
Test
>]
let
``TailCall 05``
()
=
CompilerAssert
.
CompileLibraryAndVerifyILWithOptions
[|
"-g"
;
"--optimize-"
;
"--tailcalls+"
|]
"""
module TailCall05
let foo(x:int byref, y:int byref, z) = printfn "
%
d
" (x+y)
let run() = let mutable x = 0 in foo(&x,&x,5)
"""
(
fun
verifier
->
verifier
.
VerifyIL
[
"""
.method public static void foo<a>(int32& x,
int32& y,
!!a z) cil managed
{
.maxstack 4
.locals init (class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2<int32,class [FSharp.Core]Microsoft.FSharp.Core.Unit> V_0,
int32 V_1)
IL_0000: ldstr "
%
d
"
IL_0005: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5<class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2<int32,class [FSharp.Core]Microsoft.FSharp.Core.Unit>,class [runtime]System.IO.TextWriter,class [FSharp.Core]Microsoft.FSharp.Core.Unit,class [FSharp.Core]Microsoft.FSharp.Core.Unit,int32>::.ctor(string)
IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatLine<class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2<int32,class [FSharp.Core]Microsoft.FSharp.Core.Unit>>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4<!!0,class [runtime]System.IO.TextWriter,class [FSharp.Core]Microsoft.FSharp.Core.Unit,class [FSharp.Core]Microsoft.FSharp.Core.Unit>)
IL_000f: stloc.0
IL_0010: ldarg.0
IL_0011: ldobj [runtime]System.Int32
IL_0016: ldarg.1
IL_0017: ldobj [runtime]System.Int32
IL_001c: add
IL_001d: stloc.1
IL_001e: ldloc.0
IL_001f: ldloc.1
IL_0020: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2<int32,class [FSharp.Core]Microsoft.FSharp.Core.Unit>::Invoke(!0)
IL_0025: pop
IL_0026: ret
}
"""
"""
.method public static void run() cil managed
{
.maxstack 5
.locals init (int32 V_0)
IL_0000: ldc.i4.0
IL_0001: stloc.0
IL_0002: ldloca.s V_0
IL_0004: ldloca.s V_0
IL_0006: ldc.i4.5
IL_0007: call void TailCall05::foo<int32>(int32&,
int32&,
!!0)
IL_000c: nop
IL_000d: ret
}
"""
])
\ No newline at end of file
tests/fsharp/Compiler/ILChecker.fs
浏览文件 @
fa6e7ccd
...
...
@@ -40,7 +40,7 @@ module ILChecker =
let
unifyRuntimeAssemblyName
ilCode
=
System
.
Text
.
RegularExpressions
.
Regex
.
Replace
(
ilCode
,
"
\
[System.Runtime
\
]|
\
[mscorlib
\
]"
,
"[runtime]"
,
"
\
[System.Runtime
\
]|
\
[
System.Runtime.Extensions
\
]|
\
[
mscorlib
\
]"
,
"[runtime]"
,
System
.
Text
.
RegularExpressions
.
RegexOptions
.
Singleline
)
let
text
=
...
...
tests/fsharp/FSharpSuite.Tests.fsproj
浏览文件 @
fa6e7ccd
...
...
@@ -36,6 +36,7 @@
<Compile
Include=
"Compiler\CompilerAssert.fs"
/>
<Compile
Include=
"Compiler\CodeGen\EmittedIL\LiteralValue.fs"
/>
<Compile
Include=
"Compiler\CodeGen\EmittedIL\Mutation.fs"
/>
<Compile
Include=
"Compiler\CodeGen\EmittedIL\TailCalls.fs"
/>
<Compile
Include=
"Compiler\Conformance\BasicGrammarElements\BasicConstants.fs"
/>
<Compile
Include=
"Compiler\ErrorMessages\ConstructorTests.fs"
/>
<Compile
Include=
"Compiler\ErrorMessages\ClassesTests.fs"
/>
...
...
tests/fsharpqa/Source/CodeGen/EmittedIL/TailCalls/TailCall01.fs
已删除
100644 → 0
浏览文件 @
d3a2f7b1
// #NoMono #NoMT #CodeGen #EmittedIL #Tailcall
// Regression test for DevDiv:72571
let
foo
(
x
:
int
,
y
)
=
printfn
"%d"
x
let
run
()
=
let
x
=
0
in
foo
(
x
,
5
)
tests/fsharpqa/Source/CodeGen/EmittedIL/TailCalls/TailCall01.il.bsl
已删除
100644 → 0
浏览文件 @
d3a2f7b1
// Microsoft (R) .NET Framework IL Disassembler. Version 4.6.1055.0
// Copyright (c) Microsoft Corporation. All rights reserved.
// Metadata version: v4.0.30319
.
assembly
extern
mscorlib
{
.
publickeytoken
=
(
B7
7A
5C
56
19
34
E0
89
)
// .z\V.4..
.
ver
4
:
0
:
0
:
0
}
.
assembly
extern
FSharp
.
Core
{
.
publickeytoken
=
(
B0
3F
5F
7F
11
D5
0A
3A
)
// .?_....:
.
ver
4
:
4
:
1
:
0
}
.
assembly
TailCall01
{
.
custom
instance
void
[
FSharp
.
Core
]
Microsoft
.
FSharp
.
Core
.
FSharpInterfaceDataVersionAttribute
::
.
ctor
(
int32
,
int32
,
int32
)
=
(
01
00
02
00
00
00
00
00
00
00
00
00
00
00
00
00
)
// --- The following custom attribute is added automatically, do not uncomment -------
// .custom instance void [mscorlib]System.Diagnostics.DebuggableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggableAttribute/DebuggingModes) = ( 01 00 01 01 00 00 00 00 )
.
hash
algorithm
0x00008004
.
ver
0
:
0
:
0
:
0
}
.
mresource
public
FSharpSignatureData
.
TailCall01
{
// Offset: 0x00000000 Length: 0x0000021D
}
.
mresource
public
FSharpOptimizationData
.
TailCall01
{
// Offset: 0x00000228 Length: 0x0000007C
}
.
module
TailCall01
.
exe
// MVID: {59B19213-7D8F-CF4A-A745-03831392B159}
.
imagebase
0x00400000
.
file
alignment
0x00000200
.
stackreserve
0x00100000
.
subsystem
0x0003
// WINDOWS_CUI
.
corflags
0x00000001
// ILONLY
// Image base: 0x02E90000
// =============== CLASS MEMBERS DECLARATION ===================
.
class
public
abstract
auto
ansi
sealed
TailCall01
extends
[
mscorlib
]
System
.
Object
{
.
custom
instance
void
[
FSharp
.
Core
]
Microsoft
.
FSharp
.
Core
.
CompilationMappingAttribute
::
.
ctor
(
valuetype
[
FSharp
.
Core
]
Microsoft
.
FSharp
.
Core
.
SourceConstructFlags
)
=
(
01
00
07
00
00
00
00
00
)
.
method
public
static
void
foo
<
a
>
(
int32
x
,
!!
a
y
)
cil
managed
{
// Code size 27 (0x1b)
.
maxstack
4
.
locals
init
([
0
]
class
[
FSharp
.
Core
]
Microsoft
.
FSharp
.
Core
.
FSharpFunc
`
2
<
int32
,
class
[
FSharp
.
Core
]
Microsoft
.
FSharp
.
Core
.
Unit
>
V_0
,
[
1
]
int32
V_1
)
.
language
'{AB4F38C9-B6E6-43BA-BE3B-58080B2CCCE3}', '{994B45C4-E6E9-11D2-903F-00C04FA302A1}', '{5A869D0B-6611-11D3-BD2A-0000F80849BD}'
.
line
3
,
3
:
21
,
33
'C:\\GitHub\\dsyme\\visualfsharp\\tests\\fsharpqa\\Source\\CodeGen\\EmittedIL\\TailCalls\\TailCall01.fs'
IL_0000
:
ldstr
"%d"
IL_0005
:
newobj
instance
void
class
[
FSharp
.
Core
]
Microsoft
.
FSharp
.
Core
.
PrintfFormat
`
5
<
class
[
FSharp
.
Core
]
Microsoft
.
FSharp
.
Core
.
FSharpFunc
`
2
<
int32
,
class
[
FSharp
.
Core
]
Microsoft
.
FSharp
.
Core
.
Unit
>
,
class
[
mscorlib
]
System
.
IO
.
TextWriter
,
class
[
FSharp
.
Core
]
Microsoft
.
FSharp
.
Core
.
Unit
,
class
[
FSharp
.
Core
]
Microsoft
.
FSharp
.
Core
.
Unit
,
int32
>
::
.
ctor
(
string
)
IL_000a
:
call
!!
0
[
FSharp
.
Core
]
Microsoft
.
FSharp
.
Core
.
ExtraTopLevelOperators
::
PrintFormatLine
<
class
[
FSharp
.
Core
]
Microsoft
.
FSharp
.
Core
.
FSharpFunc
`
2
<
int32
,
class
[
FSharp
.
Core
]
Microsoft
.
FSharp
.
Core
.
Unit
>>
(
class
[
FSharp
.
Core
]
Microsoft
.
FSharp
.
Core
.
PrintfFormat
`
4
<
!!
0
,
class
[
mscorlib
]
System
.
IO
.
TextWriter
,
class
[
FSharp
.
Core
]
Microsoft
.
FSharp
.
Core
.
Unit
,
class
[
FSharp
.
Core
]
Microsoft
.
FSharp
.
Core
.
Unit
>
)
IL_000f
:
stloc
.
0
IL_0010
:
ldarg
.
0
IL_0011
:
stloc
.
1
IL_0012
:
ldloc
.
0
IL_0013
:
ldloc
.
1
IL_0014
:
callvirt
instance
!
1
class
[
FSharp
.
Core
]
Microsoft
.
FSharp
.
Core
.
FSharpFunc
`
2
<
int32
,
class
[
FSharp
.
Core
]
Microsoft
.
FSharp
.
Core
.
Unit
>
::
Invoke
(
!
0
)
IL_0019
:
pop
IL_001a
:
ret
}
// end of method TailCall01::foo
.
method
public
static
void
run
()
cil
managed
{
// Code size 12 (0xc)
.
maxstack
4
.
locals
init
([
0
]
int32
x
)
.
line
4
,
4
:
13
,
22
''
IL_0000
:
ldc
.
i4
.
0
IL_0001
:
stloc
.
0
.
line
4
,
4
:
26
,
34
''
IL_0002
:
ldloc
.
0
IL_0003
:
ldc
.
i4
.
5
IL_0004
:
tail
.
IL_0006
:
call
void
TailCall01
::
foo
<
int32
>
(
int32
,
!!
0
)
IL_000b
:
ret
}
// end of method TailCall01::run
}
// end of class TailCall01
.
class
private
abstract
auto
ansi
sealed
'<StartupCode$TailCall01>'
.
$
TailCall01
extends
[
mscorlib
]
System
.
Object
{
.
method
public
static
void
main
@
()
cil
managed
{
.
entrypoint
// Code size 1 (0x1)
.
maxstack
8
IL_0000
:
ret
}
// end of method $TailCall01::main@
}
// end of class '<StartupCode$TailCall01>'.$TailCall01
// =============================================================
// *********** DISASSEMBLY COMPLETE ***********************
tests/fsharpqa/Source/CodeGen/EmittedIL/TailCalls/TailCall02.fs
已删除
100644 → 0
浏览文件 @
d3a2f7b1
// #NoMono #NoMT #CodeGen #EmittedIL #Tailcall
// Regression test for DevDiv:72571
let
foo
(
x
:
int
byref
)
=
x
let
run
()
=
let
mutable
x
=
0
in
foo
(&
x
)
tests/fsharpqa/Source/CodeGen/EmittedIL/TailCalls/TailCall02.il.bsl
已删除
100644 → 0
浏览文件 @
d3a2f7b1
// Microsoft (R) .NET Framework IL Disassembler. Version 4.6.1055.0
// Copyright (c) Microsoft Corporation. All rights reserved.
// Metadata version: v4.0.30319
.
assembly
extern
mscorlib
{
.
publickeytoken
=
(
B7
7A
5C
56
19
34
E0
89
)
// .z\V.4..
.
ver
4
:
0
:
0
:
0
}
.
assembly
extern
FSharp
.
Core
{
.
publickeytoken
=
(
B0
3F
5F
7F
11
D5
0A
3A
)
// .?_....:
.
ver
4
:
4
:
1
:
0
}
.
assembly
TailCall02
{
.
custom
instance
void
[
FSharp
.
Core
]
Microsoft
.
FSharp
.
Core
.
FSharpInterfaceDataVersionAttribute
::
.
ctor
(
int32
,
int32
,
int32
)
=
(
01
00
02
00
00
00
00
00
00
00
00
00
00
00
00
00
)
// --- The following custom attribute is added automatically, do not uncomment -------
// .custom instance void [mscorlib]System.Diagnostics.DebuggableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggableAttribute/DebuggingModes) = ( 01 00 01 01 00 00 00 00 )
.
hash
algorithm
0x00008004
.
ver
0
:
0
:
0
:
0
}
.
mresource
public
FSharpSignatureData
.
TailCall02
{
// Offset: 0x00000000 Length: 0x00000202
}
.
mresource
public
FSharpOptimizationData
.
TailCall02
{
// Offset: 0x00000208 Length: 0x0000007C
}
.
module
TailCall02
.
exe
// MVID: {59B19213-7D8F-CE9D-A745-03831392B159}
.
imagebase
0x00400000
.
file
alignment
0x00000200
.
stackreserve
0x00100000
.
subsystem
0x0003
// WINDOWS_CUI
.
corflags
0x00000001
// ILONLY
// Image base: 0x00E20000
// =============== CLASS MEMBERS DECLARATION ===================
.
class
public
abstract
auto
ansi
sealed
TailCall02
extends
[
mscorlib
]
System
.
Object
{
.
custom
instance
void
[
FSharp
.
Core
]
Microsoft
.
FSharp
.
Core
.
CompilationMappingAttribute
::
.
ctor
(
valuetype
[
FSharp
.
Core
]
Microsoft
.
FSharp
.
Core
.
SourceConstructFlags
)
=
(
01
00
07
00
00
00
00
00
)
.
method
public
static
int32
foo
(
int32
& x) cil managed
{
// Code size 7 (0x7)
.
maxstack
8
.
language
'{AB4F38C9-B6E6-43BA-BE3B-58080B2CCCE3}', '{994B45C4-E6E9-11D2-903F-00C04FA302A1}', '{5A869D0B-6611-11D3-BD2A-0000F80849BD}'
.
line
3
,
3
:
24
,
25
'C:\\GitHub\\dsyme\\visualfsharp\\tests\\fsharpqa\\Source\\CodeGen\\EmittedIL\\TailCalls\\TailCall02.fs'
IL_0000
:
ldarg
.
0
IL_0001
:
ldobj
[
mscorlib
]
System
.
Int32
IL_0006
:
ret
}
// end of method TailCall02::foo
.
method
public
static
int32
run
()
cil
managed
{
// Code size 10 (0xa)
.
maxstack
3
.
locals
init
([
0
]
int32
x
)
.
line
4
,
4
:
13
,
30
''
IL_0000
:
ldc
.
i4
.
0
IL_0001
:
stloc
.
0
.
line
4
,
4
:
34
,
41
''
IL_0002
:
ldloca
.
s
x
IL_0004
:
call
int32
TailCall02
::
foo
(
int32
&)
IL_0009
:
ret
}
// end of method TailCall02::run
}
// end of class TailCall02
.
class
private
abstract
auto
ansi
sealed
'<StartupCode$TailCall02>'
.
$
TailCall02
extends
[
mscorlib
]
System
.
Object
{
.
method
public
static
void
main
@
()
cil
managed
{
.
entrypoint
// Code size 1 (0x1)
.
maxstack
8
IL_0000
:
ret
}
// end of method $TailCall02::main@
}
// end of class '<StartupCode$TailCall02>'.$TailCall02
// =============================================================
// *********** DISASSEMBLY COMPLETE ***********************
tests/fsharpqa/Source/CodeGen/EmittedIL/TailCalls/TailCall03.fs
已删除
100644 → 0
浏览文件 @
d3a2f7b1
// #NoMono #NoMT #CodeGen #EmittedIL #Tailcall
// Regression test for DevDiv:72571
let
foo
(
x
:
int
byref
)
(
y
:
int
byref
)
z
=
printfn
"%d"
(
x
+
y
)
let
run
()
=
let
mutable
x
=
0
in
foo
&
x
&
x
5
tests/fsharpqa/Source/CodeGen/EmittedIL/TailCalls/TailCall03.il.bsl
已删除
100644 → 0
浏览文件 @
d3a2f7b1
// Microsoft (R) .NET Framework IL Disassembler. Version 4.6.1055.0
// Copyright (c) Microsoft Corporation. All rights reserved.
// Metadata version: v4.0.30319
.
assembly
extern
mscorlib
{
.
publickeytoken
=
(
B7
7A
5C
56
19
34
E0
89
)
// .z\V.4..
.
ver
4
:
0
:
0
:
0
}
.
assembly
extern
FSharp
.
Core
{
.
publickeytoken
=
(
B0
3F
5F
7F
11
D5
0A
3A
)
// .?_....:
.
ver
4
:
4
:
1
:
0
}
.
assembly
TailCall03
{
.
custom
instance
void
[
FSharp
.
Core
]
Microsoft
.
FSharp
.
Core
.
FSharpInterfaceDataVersionAttribute
::
.
ctor
(
int32
,
int32
,
int32
)
=
(
01
00
02
00
00
00
00
00
00
00
00
00
00
00
00
00
)
// --- The following custom attribute is added automatically, do not uncomment -------
// .custom instance void [mscorlib]System.Diagnostics.DebuggableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggableAttribute/DebuggingModes) = ( 01 00 01 01 00 00 00 00 )
.
hash
algorithm
0x00008004
.
ver
0
:
0
:
0
:
0
}
.
mresource
public
FSharpSignatureData
.
TailCall03
{
// Offset: 0x00000000 Length: 0x00000241
}
.
mresource
public
FSharpOptimizationData
.
TailCall03
{
// Offset: 0x00000248 Length: 0x0000007C
}
.
module
TailCall03
.
exe
// MVID: {59B19213-7D8F-CE88-A745-03831392B159}
.
imagebase
0x00400000
.
file
alignment
0x00000200
.
stackreserve
0x00100000
.
subsystem
0x0003
// WINDOWS_CUI
.
corflags
0x00000001
// ILONLY
// Image base: 0x00E50000
// =============== CLASS MEMBERS DECLARATION ===================
.
class
public
abstract
auto
ansi
sealed
TailCall03
extends
[
mscorlib
]
System
.
Object
{
.
custom
instance
void
[
FSharp
.
Core
]
Microsoft
.
FSharp
.
Core
.
CompilationMappingAttribute
::
.
ctor
(
valuetype
[
FSharp
.
Core
]
Microsoft
.
FSharp
.
Core
.
SourceConstructFlags
)
=
(
01
00
07
00
00
00
00
00
)
.
method
public
static
void
foo
<
a
>
(
int32
& x,
int32
& y,
!!
a
z
)
cil
managed
{
.
custom
instance
void
[
FSharp
.
Core
]
Microsoft
.
FSharp
.
Core
.
CompilationArgumentCountsAttribute
::
.
ctor
(
int32
[])
=
(
01
00
03
00
00
00
01
00
00
00
01
00
00
00
01
00
00
00
00
00
)
// Code size 39 (0x27)
.
maxstack
4
.
locals
init
([
0
]
class
[
FSharp
.
Core
]
Microsoft
.
FSharp
.
Core
.
FSharpFunc
`
2
<
int32
,
class
[
FSharp
.
Core
]
Microsoft
.
FSharp
.
Core
.
Unit
>
V_0
,
[
1
]
int32
V_1
)
.
language
'{AB4F38C9-B6E6-43BA-BE3B-58080B2CCCE3}', '{994B45C4-E6E9-11D2-903F-00C04FA302A1}', '{5A869D0B-6611-11D3-BD2A-0000F80849BD}'
.
line
3
,
3
:
41
,
53
'C:\\GitHub\\dsyme\\visualfsharp\\tests\\fsharpqa\\Source\\CodeGen\\EmittedIL\\TailCalls\\TailCall03.fs'
IL_0000
:
ldstr
"%d"
IL_0005
:
newobj
instance
void
class
[
FSharp
.
Core
]
Microsoft
.
FSharp
.
Core
.
PrintfFormat
`
5
<
class
[
FSharp
.
Core
]
Microsoft
.
FSharp
.
Core
.
FSharpFunc
`
2
<
int32
,
class
[
FSharp
.
Core
]
Microsoft
.
FSharp
.
Core
.
Unit
>
,
class
[
mscorlib
]
System
.
IO
.
TextWriter
,
class
[
FSharp
.
Core
]
Microsoft
.
FSharp
.
Core
.
Unit
,
class
[
FSharp
.
Core
]
Microsoft
.
FSharp
.
Core
.
Unit
,
int32
>
::
.
ctor
(
string
)
IL_000a
:
call
!!
0
[
FSharp
.
Core
]
Microsoft
.
FSharp
.
Core
.
ExtraTopLevelOperators
::
PrintFormatLine
<
class
[
FSharp
.
Core
]
Microsoft
.
FSharp
.
Core
.
FSharpFunc
`
2
<
int32
,
class
[
FSharp
.
Core
]
Microsoft
.
FSharp
.
Core
.
Unit
>>
(
class
[
FSharp
.
Core
]
Microsoft
.
FSharp
.
Core
.
PrintfFormat
`
4
<
!!
0
,
class
[
mscorlib
]
System
.
IO
.
TextWriter
,
class
[
FSharp
.
Core
]
Microsoft
.
FSharp
.
Core
.
Unit
,
class
[
FSharp
.
Core
]
Microsoft
.
FSharp
.
Core
.
Unit
>
)
IL_000f
:
stloc
.
0
IL_0010
:
ldarg
.
0
IL_0011
:
ldobj
[
mscorlib
]
System
.
Int32
IL_0016
:
ldarg
.
1
IL_0017
:
ldobj
[
mscorlib
]
System
.
Int32
IL_001c
:
add
IL_001d
:
stloc
.
1
IL_001e
:
ldloc
.
0
IL_001f
:
ldloc
.
1
IL_0020
:
callvirt
instance
!
1
class
[
FSharp
.
Core
]
Microsoft
.
FSharp
.
Core
.
FSharpFunc
`
2
<
int32
,
class
[
FSharp
.
Core
]
Microsoft
.
FSharp
.
Core
.
Unit
>
::
Invoke
(
!
0
)
IL_0025
:
pop
IL_0026
:
ret
}
// end of method TailCall03::foo
.
method
public
static
void
run
()
cil
managed
{
// Code size 14 (0xe)
.
maxstack
5
.
locals
init
([
0
]
int32
x
)
.
line
4
,
4
:
13
,
30
''
IL_0000
:
ldc
.
i4
.
0
IL_0001
:
stloc
.
0
.
line
4
,
4
:
34
,
45
''
IL_0002
:
ldloca
.
s
x
IL_0004
:
ldloca
.
s
x
IL_0006
:
ldc
.
i4
.
5
IL_0007
:
call
void
TailCall03
::
foo
<
int32
>
(
int32
&,
int32
&,
!!
0
)
IL_000c
:
nop
IL_000d
:
ret
}
// end of method TailCall03::run
}
// end of class TailCall03
.
class
private
abstract
auto
ansi
sealed
'<StartupCode$TailCall03>'
.
$
TailCall03
extends
[
mscorlib
]
System
.
Object
{
.
method
public
static
void
main
@
()
cil
managed
{
.
entrypoint
// Code size 1 (0x1)
.
maxstack
8
IL_0000
:
ret
}
// end of method $TailCall03::main@
}
// end of class '<StartupCode$TailCall03>'.$TailCall03
// =============================================================
// *********** DISASSEMBLY COMPLETE ***********************
tests/fsharpqa/Source/CodeGen/EmittedIL/TailCalls/TailCall04.fs
已删除
100644 → 0
浏览文件 @
d3a2f7b1
// #NoMono #NoMT #CodeGen #EmittedIL #Tailcall
// Regression test for DevDiv:72571
let
foo
(
x
:
int
byref
,
y
)
=
printfn
"%d"
x
let
run
()
=
let
mutable
x
=
0
in
foo
(&
x
,
5
)
tests/fsharpqa/Source/CodeGen/EmittedIL/TailCalls/TailCall04.il.bsl
已删除
100644 → 0
浏览文件 @
d3a2f7b1
// Microsoft (R) .NET Framework IL Disassembler. Version 4.6.1055.0
// Copyright (c) Microsoft Corporation. All rights reserved.
// Metadata version: v4.0.30319
.
assembly
extern
mscorlib
{
.
publickeytoken
=
(
B7
7A
5C
56
19
34
E0
89
)
// .z\V.4..
.
ver
4
:
0
:
0
:
0
}
.
assembly
extern
FSharp
.
Core
{
.
publickeytoken
=
(
B0
3F
5F
7F
11
D5
0A
3A
)
// .?_....:
.
ver
4
:
4
:
1
:
0
}
.
assembly
TailCall04
{
.
custom
instance
void
[
FSharp
.
Core
]
Microsoft
.
FSharp
.
Core
.
FSharpInterfaceDataVersionAttribute
::
.
ctor
(
int32
,
int32
,
int32
)
=
(
01
00
02
00
00
00
00
00
00
00
00
00
00
00
00
00
)
// --- The following custom attribute is added automatically, do not uncomment -------
// .custom instance void [mscorlib]System.Diagnostics.DebuggableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggableAttribute/DebuggingModes) = ( 01 00 01 01 00 00 00 00 )
.
hash
algorithm
0x00008004
.
ver
0
:
0
:
0
:
0
}
.
mresource
public
FSharpSignatureData
.
TailCall04
{
// Offset: 0x00000000 Length: 0x0000022F
}
.
mresource
public
FSharpOptimizationData
.
TailCall04
{
// Offset: 0x00000238 Length: 0x0000007C
}
.
module
TailCall04
.
exe
// MVID: {59B19213-7D8F-CFE3-A745-03831392B159}
.
imagebase
0x00400000
.
file
alignment
0x00000200
.
stackreserve
0x00100000
.
subsystem
0x0003
// WINDOWS_CUI
.
corflags
0x00000001
// ILONLY
// Image base: 0x00B70000
// =============== CLASS MEMBERS DECLARATION ===================
.
class
public
abstract
auto
ansi
sealed
TailCall04
extends
[
mscorlib
]
System
.
Object
{
.
custom
instance
void
[
FSharp
.
Core
]
Microsoft
.
FSharp
.
Core
.
CompilationMappingAttribute
::
.
ctor
(
valuetype
[
FSharp
.
Core
]
Microsoft
.
FSharp
.
Core
.
SourceConstructFlags
)
=
(
01
00
07
00
00
00
00
00
)
.
method
public
static
void
foo
<
a
>
(
int32
& x,
!!
a
y
)
cil
managed
{
// Code size 32 (0x20)
.
maxstack
4
.
locals
init
([
0
]
class
[
FSharp
.
Core
]
Microsoft
.
FSharp
.
Core
.
FSharpFunc
`
2
<
int32
,
class
[
FSharp
.
Core
]
Microsoft
.
FSharp
.
Core
.
Unit
>
V_0
,
[
1
]
int32
V_1
)
.
language
'{AB4F38C9-B6E6-43BA-BE3B-58080B2CCCE3}', '{994B45C4-E6E9-11D2-903F-00C04FA302A1}', '{5A869D0B-6611-11D3-BD2A-0000F80849BD}'
.
line
3
,
3
:
27
,
39
'C:\\GitHub\\dsyme\\visualfsharp\\tests\\fsharpqa\\Source\\CodeGen\\EmittedIL\\TailCalls\\TailCall04.fs'
IL_0000
:
ldstr
"%d"
IL_0005
:
newobj
instance
void
class
[
FSharp
.
Core
]
Microsoft
.
FSharp
.
Core
.
PrintfFormat
`
5
<
class
[
FSharp
.
Core
]
Microsoft
.
FSharp
.
Core
.
FSharpFunc
`
2
<
int32
,
class
[
FSharp
.
Core
]
Microsoft
.
FSharp
.
Core
.
Unit
>
,
class
[
mscorlib
]
System
.
IO
.
TextWriter
,
class
[
FSharp
.
Core
]
Microsoft
.
FSharp
.
Core
.
Unit
,
class
[
FSharp
.
Core
]
Microsoft
.
FSharp
.
Core
.
Unit
,
int32
>
::
.
ctor
(
string
)
IL_000a
:
call
!!
0
[
FSharp
.
Core
]
Microsoft
.
FSharp
.
Core
.
ExtraTopLevelOperators
::
PrintFormatLine
<
class
[
FSharp
.
Core
]
Microsoft
.
FSharp
.
Core
.
FSharpFunc
`
2
<
int32
,
class
[
FSharp
.
Core
]
Microsoft
.
FSharp
.
Core
.
Unit
>>
(
class
[
FSharp
.
Core
]
Microsoft
.
FSharp
.
Core
.
PrintfFormat
`
4
<
!!
0
,
class
[
mscorlib
]
System
.
IO
.
TextWriter
,
class
[
FSharp
.
Core
]
Microsoft
.
FSharp
.
Core
.
Unit
,
class
[
FSharp
.
Core
]
Microsoft
.
FSharp
.
Core
.
Unit
>
)
IL_000f
:
stloc
.
0
IL_0010
:
ldarg
.
0
IL_0011
:
ldobj
[
mscorlib
]
System
.
Int32
IL_0016
:
stloc
.
1
IL_0017
:
ldloc
.
0
IL_0018
:
ldloc
.
1
IL_0019
:
callvirt
instance
!
1
class
[
FSharp
.
Core
]
Microsoft
.
FSharp
.
Core
.
FSharpFunc
`
2
<
int32
,
class
[
FSharp
.
Core
]
Microsoft
.
FSharp
.
Core
.
Unit
>
::
Invoke
(
!
0
)
IL_001e
:
pop
IL_001f
:
ret
}
// end of method TailCall04::foo
.
method
public
static
void
run
()
cil
managed
{
// Code size 12 (0xc)
.
maxstack
4
.
locals
init
([
0
]
int32
x
)
.
line
4
,
4
:
13
,
30
''
IL_0000
:
ldc
.
i4
.
0
IL_0001
:
stloc
.
0
.
line
4
,
4
:
34
,
43
''
IL_0002
:
ldloca
.
s
x
IL_0004
:
ldc
.
i4
.
5
IL_0005
:
call
void
TailCall04
::
foo
<
int32
>
(
int32
&,
!!
0
)
IL_000a
:
nop
IL_000b
:
ret
}
// end of method TailCall04::run
}
// end of class TailCall04
.
class
private
abstract
auto
ansi
sealed
'<StartupCode$TailCall04>'
.
$
TailCall04
extends
[
mscorlib
]
System
.
Object
{
.
method
public
static
void
main
@
()
cil
managed
{
.
entrypoint
// Code size 1 (0x1)
.
maxstack
8
IL_0000
:
ret
}
// end of method $TailCall04::main@
}
// end of class '<StartupCode$TailCall04>'.$TailCall04
// =============================================================
// *********** DISASSEMBLY COMPLETE ***********************
tests/fsharpqa/Source/CodeGen/EmittedIL/TailCalls/TailCall05.fs
已删除
100644 → 0
浏览文件 @
d3a2f7b1
// #NoMono #NoMT #CodeGen #EmittedIL #Tailcall
// Regression test for DevDiv:72571
let
foo
(
x
:
int
byref
,
y
:
int
byref
,
z
)
=
printfn
"%d"
(
x
+
y
)
let
run
()
=
let
mutable
x
=
0
in
foo
(&
x
,&
x
,
5
)
tests/fsharpqa/Source/CodeGen/EmittedIL/TailCalls/TailCall05.il.bsl
已删除
100644 → 0
浏览文件 @
d3a2f7b1
// Microsoft (R) .NET Framework IL Disassembler. Version 4.6.1055.0
// Copyright (c) Microsoft Corporation. All rights reserved.
// Metadata version: v4.0.30319
.
assembly
extern
mscorlib
{
.
publickeytoken
=
(
B7
7A
5C
56
19
34
E0
89
)
// .z\V.4..
.
ver
4
:
0
:
0
:
0
}
.
assembly
extern
FSharp
.
Core
{
.
publickeytoken
=
(
B0
3F
5F
7F
11
D5
0A
3A
)
// .?_....:
.
ver
4
:
4
:
1
:
0
}
.
assembly
TailCall05
{
.
custom
instance
void
[
FSharp
.
Core
]
Microsoft
.
FSharp
.
Core
.
FSharpInterfaceDataVersionAttribute
::
.
ctor
(
int32
,
int32
,
int32
)
=
(
01
00
02
00
00
00
00
00
00
00
00
00
00
00
00
00
)
// --- The following custom attribute is added automatically, do not uncomment -------
// .custom instance void [mscorlib]System.Diagnostics.DebuggableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggableAttribute/DebuggingModes) = ( 01 00 01 01 00 00 00 00 )
.
hash
algorithm
0x00008004
.
ver
0
:
0
:
0
:
0
}
.
mresource
public
FSharpSignatureData
.
TailCall05
{
// Offset: 0x00000000 Length: 0x0000023F
}
.
mresource
public
FSharpOptimizationData
.
TailCall05
{
// Offset: 0x00000248 Length: 0x0000007C
}
.
module
TailCall05
.
exe
// MVID: {59B19213-7D8F-CFC6-A745-03831392B159}
.
imagebase
0x00400000
.
file
alignment
0x00000200
.
stackreserve
0x00100000
.
subsystem
0x0003
// WINDOWS_CUI
.
corflags
0x00000001
// ILONLY
// Image base: 0x03210000
// =============== CLASS MEMBERS DECLARATION ===================
.
class
public
abstract
auto
ansi
sealed
TailCall05
extends
[
mscorlib
]
System
.
Object
{
.
custom
instance
void
[
FSharp
.
Core
]
Microsoft
.
FSharp
.
Core
.
CompilationMappingAttribute
::
.
ctor
(
valuetype
[
FSharp
.
Core
]
Microsoft
.
FSharp
.
Core
.
SourceConstructFlags
)
=
(
01
00
07
00
00
00
00
00
)
.
method
public
static
void
foo
<
a
>
(
int32
& x,
int32
& y,
!!
a
z
)
cil
managed
{
// Code size 39 (0x27)
.
maxstack
4
.
locals
init
([
0
]
class
[
FSharp
.
Core
]
Microsoft
.
FSharp
.
Core
.
FSharpFunc
`
2
<
int32
,
class
[
FSharp
.
Core
]
Microsoft
.
FSharp
.
Core
.
Unit
>
V_0
,
[
1
]
int32
V_1
)
.
language
'{AB4F38C9-B6E6-43BA-BE3B-58080B2CCCE3}', '{994B45C4-E6E9-11D2-903F-00C04FA302A1}', '{5A869D0B-6611-11D3-BD2A-0000F80849BD}'
.
line
3
,
3
:
40
,
52
'C:\\GitHub\\dsyme\\visualfsharp\\tests\\fsharpqa\\Source\\CodeGen\\EmittedIL\\TailCalls\\TailCall05.fs'
IL_0000
:
ldstr
"%d"
IL_0005
:
newobj
instance
void
class
[
FSharp
.
Core
]
Microsoft
.
FSharp
.
Core
.
PrintfFormat
`
5
<
class
[
FSharp
.
Core
]
Microsoft
.
FSharp
.
Core
.
FSharpFunc
`
2
<
int32
,
class
[
FSharp
.
Core
]
Microsoft
.
FSharp
.
Core
.
Unit
>
,
class
[
mscorlib
]
System
.
IO
.
TextWriter
,
class
[
FSharp
.
Core
]
Microsoft
.
FSharp
.
Core
.
Unit
,
class
[
FSharp
.
Core
]
Microsoft
.
FSharp
.
Core
.
Unit
,
int32
>
::
.
ctor
(
string
)
IL_000a
:
call
!!
0
[
FSharp
.
Core
]
Microsoft
.
FSharp
.
Core
.
ExtraTopLevelOperators
::
PrintFormatLine
<
class
[
FSharp
.
Core
]
Microsoft
.
FSharp
.
Core
.
FSharpFunc
`
2
<
int32
,
class
[
FSharp
.
Core
]
Microsoft
.
FSharp
.
Core
.
Unit
>>
(
class
[
FSharp
.
Core
]
Microsoft
.
FSharp
.
Core
.
PrintfFormat
`
4
<
!!
0
,
class
[
mscorlib
]
System
.
IO
.
TextWriter
,
class
[
FSharp
.
Core
]
Microsoft
.
FSharp
.
Core
.
Unit
,
class
[
FSharp
.
Core
]
Microsoft
.
FSharp
.
Core
.
Unit
>
)
IL_000f
:
stloc
.
0
IL_0010
:
ldarg
.
0
IL_0011
:
ldobj
[
mscorlib
]
System
.
Int32
IL_0016
:
ldarg
.
1
IL_0017
:
ldobj
[
mscorlib
]
System
.
Int32
IL_001c
:
add
IL_001d
:
stloc
.
1
IL_001e
:
ldloc
.
0
IL_001f
:
ldloc
.
1
IL_0020
:
callvirt
instance
!
1
class
[
FSharp
.
Core
]
Microsoft
.
FSharp
.
Core
.
FSharpFunc
`
2
<
int32
,
class
[
FSharp
.
Core
]
Microsoft
.
FSharp
.
Core
.
Unit
>
::
Invoke
(
!
0
)
IL_0025
:
pop
IL_0026
:
ret
}
// end of method TailCall05::foo
.
method
public
static
void
run
()
cil
managed
{
// Code size 14 (0xe)
.
maxstack
5
.
locals
init
([
0
]
int32
x
)
.
line
4
,
4
:
13
,
30
''
IL_0000
:
ldc
.
i4
.
0
IL_0001
:
stloc
.
0
.
line
4
,
4
:
34
,
46
''
IL_0002
:
ldloca
.
s
x
IL_0004
:
ldloca
.
s
x
IL_0006
:
ldc
.
i4
.
5
IL_0007
:
call
void
TailCall05
::
foo
<
int32
>
(
int32
&,
int32
&,
!!
0
)
IL_000c
:
nop
IL_000d
:
ret
}
// end of method TailCall05::run
}
// end of class TailCall05
.
class
private
abstract
auto
ansi
sealed
'<StartupCode$TailCall05>'
.
$
TailCall05
extends
[
mscorlib
]
System
.
Object
{
.
method
public
static
void
main
@
()
cil
managed
{
.
entrypoint
// Code size 1 (0x1)
.
maxstack
8
IL_0000
:
ret
}
// end of method $TailCall05::main@
}
// end of class '<StartupCode$TailCall05>'.$TailCall05
// =============================================================
// *********** DISASSEMBLY COMPLETE ***********************
tests/fsharpqa/Source/CodeGen/EmittedIL/TailCalls/env.lst
已删除
100644 → 0
浏览文件 @
d3a2f7b1
SOURCE=TailCall01.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize- --tailcalls+" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd TailCall01.exe" # TailCall01.fs -
SOURCE=TailCall02.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize- --tailcalls+" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd TailCall02.exe" # TailCall02.fs -
SOURCE=TailCall03.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize- --tailcalls+" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd TailCall03.exe" # TailCall03.fs -
SOURCE=TailCall04.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize- --tailcalls+" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd TailCall04.exe" # TailCall04.fs -
SOURCE=TailCall05.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize- --tailcalls+" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd TailCall05.exe" # TailCall05.fs -
tests/fsharpqa/Source/CodeGen/EmittedIL/TailCalls/keep.lst
已删除
100644 → 0
浏览文件 @
d3a2f7b1
*
\ No newline at end of file
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录