未验证 提交 516d7f91 编写于 作者: K Kevin Ransom (msft) 提交者: GitHub

Morefsharpqa (#12948)

* temp

* Revert arcade sdk

* SeqExpressionStepping

* SeqExpressionTailCalls

* temp

* SerializableAttribute

* StaticInit

* SteppingMatch

* Tuples
上级 811c62b8
......@@ -18,48 +18,48 @@ module MethodImplAttribute =
// SOURCE=MethodImplAttribute.ForwardRef.fs SCFLAGS="-a -g --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd MethodImplAttribute.ForwardRef.dll" # MethodImplAttribute.ForwardRef.fs
[<Theory; Directory(__SOURCE_DIRECTORY__, Includes=[|"MethodImplAttribute.ForwardRef.fs"|])>]
let ``MethodImplAttribute.ForwardRef_fs`` compilation =
let ``ForwardRef_fs`` compilation =
compilation
|> verifyCompilation
// SOURCE=MethodImplAttribute.InternalCall.fs SCFLAGS="-a -g --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd MethodImplAttribute.InternalCall.dll" # MethodImplAttribute.InternalCall.fs
[<Theory; Directory(__SOURCE_DIRECTORY__, Includes=[|"MethodImplAttribute.InternalCall.fs"|])>]
let ``MethodImplAttribute.InternalCall_fs`` compilation =
let ``InternalCall_fs`` compilation =
compilation
|> verifyCompilation
// SOURCE=MethodImplAttribute.NoInlining.fs SCFLAGS="-a -g --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd MethodImplAttribute.NoInlining.dll" # MethodImplAttribute.NoInlining.fs
[<Theory; Directory(__SOURCE_DIRECTORY__, Includes=[|"MethodImplAttribute.NoInlining.fs"|])>]
let ``MethodImplAttribute.NoInlining_fs`` compilation =
let ``NoInlining_fs`` compilation =
compilation
|> verifyCompilation
// SOURCE=MethodImplAttribute.AggressiveInlining.fs SCFLAGS="-a -g --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd MethodImplAttribute.AggressiveInlining.dll" # MethodImplAttribute.AggressiveInlining.fs
[<Theory; Directory(__SOURCE_DIRECTORY__, Includes=[|"MethodImplAttribute.AggressiveInlining.fs"|])>]
let ``MethodImplAttribute.AggressiveInlining_fs`` compilation =
let ``AggressiveInlining_fs`` compilation =
compilation
|> verifyCompilation
// SOURCE=MethodImplAttribute.NoOptimization.fs SCFLAGS="-a -g --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd MethodImplAttribute.NoOptimization.dll" # MethodImplAttribute.NoOptimization.fs
[<Theory; Directory(__SOURCE_DIRECTORY__, Includes=[|"MethodImplAttribute.NoOptimization.fs"|])>]
let ``MethodImplAttribute.NoOptimization_fs`` compilation =
let ``NoOptimization_fs`` compilation =
compilation
|> verifyCompilation
// SOURCE=MethodImplAttribute.PreserveSig.fs SCFLAGS="-a -g --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd MethodImplAttribute.PreserveSig.dll" # MethodImplAttribute.PreserveSig.fs
[<Theory; Directory(__SOURCE_DIRECTORY__, Includes=[|"MethodImplAttribute.PreserveSig.fs"|])>]
let ``MethodImplAttribute.PreserveSig_fs`` compilation =
let ``PreserveSig_fs`` compilation =
compilation
|> verifyCompilation
// SOURCE=MethodImplAttribute.Synchronized.fs SCFLAGS="-a -g --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd MethodImplAttribute.Synchronized.dll" # MethodImplAttribute.Synchronized.fs
[<Theory; Directory(__SOURCE_DIRECTORY__, Includes=[|"MethodImplAttribute.Synchronized.fs"|])>]
let ``MethodImplAttribute.Synchronized_fs`` compilation =
let ``Synchronized_fs`` compilation =
compilation
|> verifyCompilation
// SOURCE=MethodImplAttribute.Unmanaged.fs SCFLAGS="-a -g --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd MethodImplAttribute.Unmanaged.dll" # MethodImplAttribute.Unmanaged.fs
[<Theory; Directory(__SOURCE_DIRECTORY__, Includes=[|"MethodImplAttribute.Unmanaged.fs"|])>]
let ``MethodImplAttribute.Unmanaged_fs`` compilation =
let ``Unmanaged_fs`` compilation =
compilation
|> verifyCompilation
......@@ -7,7 +7,7 @@ open FSharp.Test.Compiler
module ``Misc`` =
[<Fact>]
let ``Empty array construct compiles to System.Array.Empty<_>()``() =
let ``Empty array construct compiles to System_Array_Empty<_>()``() =
FSharp """
module Misc
......
namespace FSharp.Compiler.ComponentTests.EmittedIL
open Xunit
open System.IO
open FSharp.Test
open FSharp.Test.Compiler
module SerializableAttribute =
let verifyCompilation compilation =
compilation
|> withOptions [ "--test:EmitFeeFeeAs100001" ]
|> asExe
|> withNoOptimize
|> withEmbeddedPdb
|> withEmbedAllSource
|> ignoreWarnings
|> verifyILBaseline
// SOURCE=ToplevelModule.fs SCFLAGS="-a -g --out:TopLevelModule.dll --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd ToplevelModule.dll" # ToplevelModule.fs - Desktop
[<Theory; Directory(__SOURCE_DIRECTORY__, Includes=[|"ToplevelModule.fs"|])>]
let ``ToplevelModule_fs`` compilation =
compilation
|> verifyCompilation
// SOURCE=ToplevelNamespace.fs SCFLAGS="-a -g --out:ToplevelNamespace.dll --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd ToplevelNamespace.dll" # ToplevelNamespace.fs - Desktop
[<Theory; Directory(__SOURCE_DIRECTORY__, Includes=[|"ToplevelNamespace.fs"|])>]
let ``ToplevelNamespace_fs`` compilation =
compilation
|> verifyCompilation
// SOURCE=ToplevelModule.fs SCFLAGS="-a -g --langversion:preview --out:TopLevelModule-preview.dll --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd ToplevelModule-preview.dll" # ToplevelModule.fs - Desktop preview
[<Theory; Directory(__SOURCE_DIRECTORY__, Includes=[|"ToplevelModule60.fs"|])>]
let ``ToplevelModule_LangVersion60_fs`` compilation =
compilation
|> withLangVersion60
|> verifyCompilation
// SOURCE=ToplevelNamespace.fs SCFLAGS="-a -g --langversion:preview --out:ToplevelNamespace-preview.dll --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd ToplevelNamespace-preview.dll" # ToplevelNamespace.fs - Desktop preview
[<Theory; Directory(__SOURCE_DIRECTORY__, Includes=[|"ToplevelNamespace60.fs"|])>]
let ``ToplevelNamespace_LangVersion60_fs`` compilation =
compilation
|> withLangVersion60
|> verifyCompilation
// Regression test for DevDiv:327356
// top-level module
module ABC
(* type *)
type Expr = Num of int
exception MyExn of int
type A(x:string) = member __.X = x
(* value *)
let add x y = x + y
let greeting = "hello"
module ABC =
(* type *)
type Expr = Num of int
exception MyExn of int
type A(x:string) = member __.X = x
(* value *)
let add x y = x + y
let greeting = "hello"
// Regression test for DevDiv:327356
// top-level namespace
namespace XYZ
(* type *)
type Expr = Num of int
exception MyExn of int
type A(x:string) = member __.X = x
module ABC =
(* type *)
type Expr = Num of int
exception MyExn of int
type A(x:string) = member __.X = x
(* value *)
let add x y = x + y
let greeting = "hello"
module ABC =
(* type *)
type Expr = Num of int
exception MyExn of int
type A(x:string) = member __.X = x
(* value *)
let add x y = x + y
let greeting = "hello"
// Microsoft (R) .NET Framework IL Disassembler. Version 4.8.3928.0
// Copyright (c) Microsoft Corporation. All rights reserved.
// Microsoft (R) .NET IL Disassembler. Version 5.0.0-preview.7.20364.11
......@@ -22,27 +21,29 @@
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 )
// .custom instance void [mscorlib]System.Diagnostics.DebuggableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggableAttribute/DebuggingModes) = ( 01 00 03 01 00 00 00 00 )
.hash algorithm 0x00008004
.ver 0:0:0:0
}
.mresource public FSharpSignatureData.LetBinding01
{
// Offset: 0x00000000 Length: 0x000001B0
// Offset: 0x00000000 Length: 0x000001E8
// WARNING: managed resource file FSharpSignatureData.LetBinding01 created
}
.mresource public FSharpOptimizationData.LetBinding01
{
// Offset: 0x000001B8 Length: 0x00000070
// Offset: 0x000001F0 Length: 0x00000070
// WARNING: managed resource file FSharpOptimizationData.LetBinding01 created
}
.module LetBinding01.exe
// MVID: {61E07031-269D-BEEF-A745-03833170E061}
// MVID: {624CC9CC-269D-BEEF-A745-0383CCC94C62}
.imagebase 0x00400000
.file alignment 0x00000200
.stackreserve 0x00100000
.subsystem 0x0003 // WINDOWS_CUI
.corflags 0x00000001 // ILONLY
// Image base: 0x051E0000
// Image base: 0x04950000
// =============== CLASS MEMBERS DECLARATION ===================
......@@ -81,11 +82,8 @@
.entrypoint
// Code size 33 (0x21)
.maxstack 8
.language '{AB4F38C9-B6E6-43BA-BE3B-58080B2CCCE3}', '{994B45C4-E6E9-11D2-903F-00C04FA302A1}', '{5A869D0B-6611-11D3-BD2A-0000F80849BD}'
.line 5,5 : 1,11 'C:\\GitHub\\dsyme\\fsharp\\tests\\fsharpqa\\source\\CodeGen\\EmittedIL\\StaticInit\\LetBinding01.fs'
IL_0000: call class [FSharp.Core]Microsoft.FSharp.Core.Unit LetBinding01::get_x()
IL_0005: pop
.line 6,6 : 1,19 ''
IL_0006: ldstr "x = %A"
IL_000b: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5<class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2<class [FSharp.Core]Microsoft.FSharp.Core.Unit,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,class [FSharp.Core]Microsoft.FSharp.Core.Unit>::.ctor(string)
IL_0010: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatLine<class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2<class [FSharp.Core]Microsoft.FSharp.Core.Unit,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>)
......@@ -101,3 +99,4 @@
// =============================================================
// *********** DISASSEMBLY COMPLETE ***********************
// WARNING: Created Win32 resource file c:\kevinransom\fsharp\artifacts\bin\FSharp.Compiler.ComponentTests\Debug\net472\tests\EmittedIL\StaticInit\LetBinding01_fs\LetBinding01.res
namespace FSharp.Compiler.ComponentTests.EmittedIL
open Xunit
open System.IO
open FSharp.Test
open FSharp.Test.Compiler
module StaticInit =
let verifyCompilation compilation =
compilation
|> withOptions [ "--test:EmitFeeFeeAs100001" ]
|> asExe
|> withNoOptimize
|> withEmbeddedPdb
|> withEmbedAllSource
|> ignoreWarnings
|> verifyILBaseline
// SOURCE=LetBinding01.fs SCFLAGS=" -g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd LetBinding01.exe" # LetBinding01.fs
[<Theory; Directory(__SOURCE_DIRECTORY__, Includes=[|"LetBinding01.fs"|])>]
let ``LetBinding01_fs`` compilation =
compilation
|> verifyCompilation
// SOURCE=StaticInit_Struct01.fs SCFLAGS="-a -g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd StaticInit_Struct01.dll" # StaticInit_Struct01.fs -
[<Theory; Directory(__SOURCE_DIRECTORY__, Includes=[|"StaticInit_Struct01.fs"|])>]
let ``StaticInit_Struct01_fs`` compilation =
compilation
|> verifyCompilation
// SOURCE=StaticInit_Class01.fs SCFLAGS="-a -g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd StaticInit_Class01.dll" # StaticInit_Class01.fs -
[<Theory; Directory(__SOURCE_DIRECTORY__, Includes=[|"StaticInit_Class01.fs"|])>]
let ``StaticInit_Class01_fs`` compilation =
compilation
|> verifyCompilation
// SOURCE=StaticInit_Module01.fs SCFLAGS="-a -g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd StaticInit_Module01.dll" # StaticInit_Module01.fs -
[<Theory; Directory(__SOURCE_DIRECTORY__, Includes=[|"StaticInit_Module01.fs"|])>]
let ``StaticInit_Module01_fs`` compilation =
compilation
|> verifyCompilation
// Microsoft (R) .NET Framework IL Disassembler. Version 4.8.3928.0
// Copyright (c) Microsoft Corporation. All rights reserved.
// Microsoft (R) .NET IL Disassembler. Version 5.0.0-preview.7.20364.11
......@@ -22,27 +21,29 @@
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 )
// .custom instance void [mscorlib]System.Diagnostics.DebuggableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggableAttribute/DebuggingModes) = ( 01 00 03 01 00 00 00 00 )
.hash algorithm 0x00008004
.ver 0:0:0:0
}
.mresource public FSharpSignatureData.StaticInit_Class01
{
// Offset: 0x00000000 Length: 0x0000032F
// Offset: 0x00000000 Length: 0x0000036D
// WARNING: managed resource file FSharpSignatureData.StaticInit_Class01 created
}
.mresource public FSharpOptimizationData.StaticInit_Class01
{
// Offset: 0x00000338 Length: 0x000000AD
// Offset: 0x00000378 Length: 0x000000AD
// WARNING: managed resource file FSharpOptimizationData.StaticInit_Class01 created
}
.module StaticInit_Class01.dll
// MVID: {61FC3629-EC34-E66E-A745-03832936FC61}
.module StaticInit_Class01.exe
// MVID: {624CC9CC-EC48-71DA-A745-0383CCC94C62}
.imagebase 0x00400000
.file alignment 0x00000200
.stackreserve 0x00100000
.subsystem 0x0003 // WINDOWS_CUI
.corflags 0x00000001 // ILONLY
// Image base: 0x07570000
// Image base: 0x034B0000
// =============== CLASS MEMBERS DECLARATION ===================
......@@ -62,8 +63,6 @@
{
// Code size 9 (0x9)
.maxstack 8
.language '{AB4F38C9-B6E6-43BA-BE3B-58080B2CCCE3}', '{994B45C4-E6E9-11D2-903F-00C04FA302A1}', '{5A869D0B-6611-11D3-BD2A-0000F80849BD}'
.line 4,4 : 6,7 'C:\\GitHub\\dsyme\\fsharp\\tests\\fsharpqa\\source\\CodeGen\\EmittedIL\\StaticInit\\StaticInit_Class01.fs'
IL_0000: ldarg.0
IL_0001: callvirt instance void [mscorlib]System.Object::.ctor()
IL_0006: ldarg.0
......@@ -76,22 +75,17 @@
.custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 )
// Code size 38 (0x26)
.maxstack 8
.line 7,7 : 23,37 ''
IL_0000: nop
.line 100001,100001 : 0,0 ''
IL_0001: volatile.
IL_0003: ldsfld int32 StaticInit_ClassS01/C::init@4
IL_0008: ldc.i4.1
IL_0009: bge.s IL_0014
.line 100001,100001 : 0,0 ''
IL_000b: call void [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::FailStaticInit()
IL_0010: nop
.line 100001,100001 : 0,0 ''
IL_0011: nop
IL_0012: br.s IL_0015
.line 100001,100001 : 0,0 ''
IL_0014: nop
IL_0015: ldsfld int32 StaticInit_ClassS01/C::x
IL_001a: ldstr "2"
......@@ -105,7 +99,6 @@
{
// Code size 13 (0xd)
.maxstack 8
.line 100001,100001 : 0,0 ''
IL_0000: ldc.i4.0
IL_0001: stsfld int32 '<StartupCode$StaticInit_Class01>'.$StaticInit_ClassS01::init@
IL_0006: ldsfld int32 '<StartupCode$StaticInit_Class01>'.$StaticInit_ClassS01::init@
......@@ -124,12 +117,11 @@
.custom instance void [mscorlib]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 )
.custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 )
.custom instance void [mscorlib]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 )
.method private specialname rtspecialname static
void .cctor() cil managed
.method public static void main@() cil managed
{
.entrypoint
// Code size 24 (0x18)
.maxstack 8
.line 6,6 : 12,30 ''
IL_0000: ldstr "1"
IL_0005: callvirt instance int32 [mscorlib]System.String::get_Length()
IL_000a: stsfld int32 StaticInit_ClassS01/C::x
......@@ -137,7 +129,7 @@
IL_0010: volatile.
IL_0012: stsfld int32 StaticInit_ClassS01/C::init@4
IL_0017: ret
} // end of method $StaticInit_ClassS01::.cctor
} // end of method $StaticInit_ClassS01::main@
} // end of class '<StartupCode$StaticInit_Class01>'.$StaticInit_ClassS01
......@@ -145,3 +137,4 @@
// =============================================================
// *********** DISASSEMBLY COMPLETE ***********************
// WARNING: Created Win32 resource file c:\kevinransom\fsharp\artifacts\bin\FSharp.Compiler.ComponentTests\Debug\net472\tests\EmittedIL\StaticInit\StaticInit_Class01_fs\StaticInit_Class01.res
// Microsoft (R) .NET Framework IL Disassembler. Version 4.8.3928.0
// Copyright (c) Microsoft Corporation. All rights reserved.
// Microsoft (R) .NET IL Disassembler. Version 5.0.0-preview.7.20364.11
......@@ -13,7 +12,7 @@
.assembly extern FSharp.Core
{
.publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) // .?_....:
.ver 5:0:0:0
.ver 6:0:0:0
}
.assembly StaticInit_Module01
{
......@@ -22,27 +21,29 @@
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 )
// .custom instance void [mscorlib]System.Diagnostics.DebuggableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggableAttribute/DebuggingModes) = ( 01 00 03 01 00 00 00 00 )
.hash algorithm 0x00008004
.ver 0:0:0:0
}
.mresource public FSharpSignatureData.StaticInit_Module01
{
// Offset: 0x00000000 Length: 0x000002A3
// Offset: 0x00000000 Length: 0x000002E2
// WARNING: managed resource file FSharpSignatureData.StaticInit_Module01 created
}
.mresource public FSharpOptimizationData.StaticInit_Module01
{
// Offset: 0x000002A8 Length: 0x000000DF
// Offset: 0x000002E8 Length: 0x000000DF
// WARNING: managed resource file FSharpOptimizationData.StaticInit_Module01 created
}
.module StaticInit_Module01.dll
// MVID: {60B68B90-705F-DF4F-A745-0383908BB660}
.module StaticInit_Module01.exe
// MVID: {624CC9CC-A09B-51CF-A745-0383CCC94C62}
.imagebase 0x00400000
.file alignment 0x00000200
.stackreserve 0x00100000
.subsystem 0x0003 // WINDOWS_CUI
.corflags 0x00000001 // ILONLY
// Image base: 0x050C0000
// Image base: 0x04F30000
// =============== CLASS MEMBERS DECLARATION ===================
......@@ -110,32 +111,29 @@
.class private abstract auto ansi sealed '<StartupCode$StaticInit_Module01>'.$StaticInit_Module01
extends [mscorlib]System.Object
{
.field static assembly initonly int32 x@5
.field static assembly int32 x@5
.custom instance void [mscorlib]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 )
.field static assembly initonly int32 y@7
.field static assembly int32 y@7
.custom instance void [mscorlib]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 )
.field static assembly initonly int32 z@8
.field static assembly int32 z@8
.custom instance void [mscorlib]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 )
.field static assembly int32 init@
.custom instance void [mscorlib]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 )
.custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 )
.custom instance void [mscorlib]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 )
.method private specialname rtspecialname static
void .cctor() cil managed
.method public static void main@() cil managed
{
.entrypoint
// Code size 64 (0x40)
.maxstack 4
.locals init ([0] int32 x,
[1] int32 y,
[2] int32 z)
.language '{AB4F38C9-B6E6-43BA-BE3B-58080B2CCCE3}', '{994B45C4-E6E9-11D2-903F-00C04FA302A1}', '{5A869D0B-6611-11D3-BD2A-0000F80849BD}'
.line 5,5 : 3,21 'C:\\GitHub\\dsyme\\fsharp\\tests\\fsharpqa\\source\\CodeGen\\EmittedIL\\StaticInit\\StaticInit_Module01.fs'
.locals init (int32 V_0,
int32 V_1,
int32 V_2)
IL_0000: ldstr "1"
IL_0005: callvirt instance int32 [mscorlib]System.String::get_Length()
IL_000a: dup
IL_000b: stsfld int32 '<StartupCode$StaticInit_Module01>'.$StaticInit_Module01::x@5
IL_0010: stloc.0
.line 7,7 : 5,27 ''
IL_0011: call int32 StaticInit_Module01/M::get_x()
IL_0016: ldstr "2"
IL_001b: callvirt instance int32 [mscorlib]System.String::get_Length()
......@@ -143,7 +141,6 @@
IL_0021: dup
IL_0022: stsfld int32 '<StartupCode$StaticInit_Module01>'.$StaticInit_Module01::y@7
IL_0027: stloc.1
.line 8,8 : 5,27 ''
IL_0028: call int32 StaticInit_Module01/M/N::get_y()
IL_002d: ldstr "3"
IL_0032: callvirt instance int32 [mscorlib]System.String::get_Length()
......@@ -152,7 +149,7 @@
IL_0039: stsfld int32 '<StartupCode$StaticInit_Module01>'.$StaticInit_Module01::z@8
IL_003e: stloc.2
IL_003f: ret
} // end of method $StaticInit_Module01::.cctor
} // end of method $StaticInit_Module01::main@
} // end of class '<StartupCode$StaticInit_Module01>'.$StaticInit_Module01
......@@ -160,3 +157,4 @@
// =============================================================
// *********** DISASSEMBLY COMPLETE ***********************
// WARNING: Created Win32 resource file c:\kevinransom\fsharp\artifacts\bin\FSharp.Compiler.ComponentTests\Debug\net472\tests\EmittedIL\StaticInit\StaticInit_Module01_fs\StaticInit_Module01.res
// Microsoft (R) .NET IL Disassembler. Version 5.0.0-preview.7.20364.11
// 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 6:0:0:0
}
.assembly extern netstandard
{
.publickeytoken = (CC 7B 13 FF CD 2D DD 51 ) // .{...-.Q
.ver 2:0:0:0
}
.assembly StaticInit_Struct01
{
.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 03 01 00 00 00 00 )
.hash algorithm 0x00008004
.ver 0:0:0:0
}
.mresource public FSharpSignatureData.StaticInit_Struct01
{
// Offset: 0x00000000 Length: 0x000007E0
// WARNING: managed resource file FSharpSignatureData.StaticInit_Struct01 created
}
.mresource public FSharpOptimizationData.StaticInit_Struct01
{
// Offset: 0x000007E8 Length: 0x0000021F
// WARNING: managed resource file FSharpOptimizationData.StaticInit_Struct01 created
}
.module StaticInit_Struct01.exe
// MVID: {624CCAB9-1F68-8E9A-A745-0383B9CA4C62}
.imagebase 0x00400000
.file alignment 0x00000200
.stackreserve 0x00100000
.subsystem 0x0003 // WINDOWS_CUI
.corflags 0x00000001 // ILONLY
// Image base: 0x034B0000
// =============== CLASS MEMBERS DECLARATION ===================
.class public abstract auto ansi sealed StaticInit_Struct01
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 )
.class sequential ansi serializable sealed nested public C
extends [mscorlib]System.ValueType
implements class [mscorlib]System.IEquatable`1<valuetype StaticInit_Struct01/C>,
[mscorlib]System.Collections.IStructuralEquatable,
class [mscorlib]System.IComparable`1<valuetype StaticInit_Struct01/C>,
[mscorlib]System.IComparable,
[mscorlib]System.Collections.IStructuralComparable
{
.custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 03 00 00 00 00 00 )
.field static assembly int32 x
.field static assembly int32 init@4
.field assembly valuetype [mscorlib]System.DateTime s
.method public hidebysig virtual final
instance int32 CompareTo(valuetype StaticInit_Struct01/C obj) cil managed
{
.custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 )
// Code size 34 (0x22)
.maxstack 4
.locals init (valuetype StaticInit_Struct01/C& V_0,
class [mscorlib]System.Collections.IComparer V_1,
valuetype [mscorlib]System.DateTime V_2,
valuetype [mscorlib]System.DateTime V_3,
class [mscorlib]System.Collections.IComparer V_4)
IL_0000: ldarga.s obj
IL_0002: stloc.0
IL_0003: call class [mscorlib]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer()
IL_0008: stloc.1
IL_0009: ldarg.0
IL_000a: ldfld valuetype [mscorlib]System.DateTime StaticInit_Struct01/C::s
IL_000f: stloc.2
IL_0010: ldloc.0
IL_0011: ldfld valuetype [mscorlib]System.DateTime StaticInit_Struct01/C::s
IL_0016: stloc.3
IL_0017: ldloc.1
IL_0018: stloc.s V_4
IL_001a: ldloc.2
IL_001b: ldloc.3
IL_001c: call int32 [netstandard]System.DateTime::Compare(valuetype [netstandard]System.DateTime,
valuetype [netstandard]System.DateTime)
IL_0021: ret
} // end of method C::CompareTo
.method public hidebysig virtual final
instance int32 CompareTo(object obj) cil managed
{
.custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 )
// Code size 13 (0xd)
.maxstack 8
IL_0000: ldarg.0
IL_0001: ldarg.1
IL_0002: unbox.any StaticInit_Struct01/C
IL_0007: call instance int32 StaticInit_Struct01/C::CompareTo(valuetype StaticInit_Struct01/C)
IL_000c: ret
} // end of method C::CompareTo
.method public hidebysig virtual final
instance int32 CompareTo(object obj,
class [mscorlib]System.Collections.IComparer comp) cil managed
{
.custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 )
// Code size 39 (0x27)
.maxstack 4
.locals init (valuetype StaticInit_Struct01/C V_0,
valuetype StaticInit_Struct01/C& V_1,
class [mscorlib]System.Collections.IComparer V_2,
valuetype [mscorlib]System.DateTime V_3,
valuetype [mscorlib]System.DateTime V_4,
class [mscorlib]System.Collections.IComparer V_5)
IL_0000: ldarg.1
IL_0001: unbox.any StaticInit_Struct01/C
IL_0006: stloc.0
IL_0007: ldloca.s V_0
IL_0009: stloc.1
IL_000a: ldarg.2
IL_000b: stloc.2
IL_000c: ldarg.0
IL_000d: ldfld valuetype [mscorlib]System.DateTime StaticInit_Struct01/C::s
IL_0012: stloc.3
IL_0013: ldloc.1
IL_0014: ldfld valuetype [mscorlib]System.DateTime StaticInit_Struct01/C::s
IL_0019: stloc.s V_4
IL_001b: ldloc.2
IL_001c: stloc.s V_5
IL_001e: ldloc.3
IL_001f: ldloc.s V_4
IL_0021: call int32 [netstandard]System.DateTime::Compare(valuetype [netstandard]System.DateTime,
valuetype [netstandard]System.DateTime)
IL_0026: ret
} // end of method C::CompareTo
.method public hidebysig virtual final
instance int32 GetHashCode(class [mscorlib]System.Collections.IEqualityComparer comp) cil managed
{
.custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 )
// Code size 31 (0x1f)
.maxstack 7
.locals init (int32 V_0)
IL_0000: ldc.i4.0
IL_0001: stloc.0
IL_0002: ldc.i4 0x9e3779b9
IL_0007: ldarg.1
IL_0008: ldarg.0
IL_0009: ldfld valuetype [mscorlib]System.DateTime StaticInit_Struct01/C::s
IL_000e: call int32 [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/HashCompare::GenericHashWithComparerIntrinsic<valuetype [mscorlib]System.DateTime>(class [mscorlib]System.Collections.IEqualityComparer,
!!0)
IL_0013: ldloc.0
IL_0014: ldc.i4.6
IL_0015: shl
IL_0016: ldloc.0
IL_0017: ldc.i4.2
IL_0018: shr
IL_0019: add
IL_001a: add
IL_001b: add
IL_001c: stloc.0
IL_001d: ldloc.0
IL_001e: ret
} // end of method C::GetHashCode
.method public hidebysig virtual final
instance int32 GetHashCode() cil managed
{
.custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 )
// Code size 12 (0xc)
.maxstack 8
IL_0000: ldarg.0
IL_0001: call class [mscorlib]System.Collections.IEqualityComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericEqualityComparer()
IL_0006: call instance int32 StaticInit_Struct01/C::GetHashCode(class [mscorlib]System.Collections.IEqualityComparer)
IL_000b: ret
} // end of method C::GetHashCode
.method public hidebysig virtual final
instance bool Equals(object obj,
class [mscorlib]System.Collections.IEqualityComparer comp) cil managed
{
.custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 )
// Code size 56 (0x38)
.maxstack 4
.locals init (object V_0,
valuetype StaticInit_Struct01/C V_1,
valuetype StaticInit_Struct01/C& V_2,
class [mscorlib]System.Collections.IEqualityComparer V_3,
valuetype [mscorlib]System.DateTime V_4,
valuetype [mscorlib]System.DateTime V_5,
class [mscorlib]System.Collections.IEqualityComparer V_6)
IL_0000: ldarg.1
IL_0001: stloc.0
IL_0002: ldloc.0
IL_0003: isinst StaticInit_Struct01/C
IL_0008: ldnull
IL_0009: cgt.un
IL_000b: brfalse.s IL_0036
IL_000d: ldarg.1
IL_000e: unbox.any StaticInit_Struct01/C
IL_0013: stloc.1
IL_0014: ldloca.s V_1
IL_0016: stloc.2
IL_0017: ldarg.2
IL_0018: stloc.3
IL_0019: ldarg.0
IL_001a: ldfld valuetype [mscorlib]System.DateTime StaticInit_Struct01/C::s
IL_001f: stloc.s V_4
IL_0021: ldloc.2
IL_0022: ldfld valuetype [mscorlib]System.DateTime StaticInit_Struct01/C::s
IL_0027: stloc.s V_5
IL_0029: ldloc.3
IL_002a: stloc.s V_6
IL_002c: ldloc.s V_4
IL_002e: ldloc.s V_5
IL_0030: call bool [netstandard]System.DateTime::Equals(valuetype [netstandard]System.DateTime,
valuetype [netstandard]System.DateTime)
IL_0035: ret
IL_0036: ldc.i4.0
IL_0037: ret
} // end of method C::Equals
.method public specialname rtspecialname
instance void .ctor(valuetype [mscorlib]System.DateTime s) cil managed
{
// Code size 8 (0x8)
.maxstack 8
IL_0000: ldarg.0
IL_0001: ldarg.1
IL_0002: stfld valuetype [mscorlib]System.DateTime StaticInit_Struct01/C::s
IL_0007: ret
} // end of method C::.ctor
.method assembly static int32 f() cil managed
{
.custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 )
// Code size 38 (0x26)
.maxstack 8
IL_0000: nop
IL_0001: volatile.
IL_0003: ldsfld int32 StaticInit_Struct01/C::init@4
IL_0008: ldc.i4.1
IL_0009: bge.s IL_0014
IL_000b: call void [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::FailStaticInit()
IL_0010: nop
IL_0011: nop
IL_0012: br.s IL_0015
IL_0014: nop
IL_0015: ldsfld int32 StaticInit_Struct01/C::x
IL_001a: ldstr "2"
IL_001f: callvirt instance int32 [mscorlib]System.String::get_Length()
IL_0024: add
IL_0025: ret
} // end of method C::f
.method public hidebysig virtual final
instance bool Equals(valuetype StaticInit_Struct01/C obj) cil managed
{
.custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 )
// Code size 21 (0x15)
.maxstack 4
.locals init (valuetype StaticInit_Struct01/C& V_0)
IL_0000: ldarga.s obj
IL_0002: stloc.0
IL_0003: ldarg.0
IL_0004: ldfld valuetype [mscorlib]System.DateTime StaticInit_Struct01/C::s
IL_0009: ldloc.0
IL_000a: ldfld valuetype [mscorlib]System.DateTime StaticInit_Struct01/C::s
IL_000f: call bool [netstandard]System.DateTime::Equals(valuetype [netstandard]System.DateTime,
valuetype [netstandard]System.DateTime)
IL_0014: ret
} // end of method C::Equals
.method public hidebysig virtual final
instance bool Equals(object obj) cil managed
{
.custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 )
// Code size 30 (0x1e)
.maxstack 4
.locals init (object V_0,
valuetype StaticInit_Struct01/C V_1)
IL_0000: ldarg.1
IL_0001: stloc.0
IL_0002: ldloc.0
IL_0003: isinst StaticInit_Struct01/C
IL_0008: ldnull
IL_0009: cgt.un
IL_000b: brfalse.s IL_001c
IL_000d: ldarg.1
IL_000e: unbox.any StaticInit_Struct01/C
IL_0013: stloc.1
IL_0014: ldarg.0
IL_0015: ldloc.1
IL_0016: call instance bool StaticInit_Struct01/C::Equals(valuetype StaticInit_Struct01/C)
IL_001b: ret
IL_001c: ldc.i4.0
IL_001d: ret
} // end of method C::Equals
.method private specialname rtspecialname static
void .cctor() cil managed
{
// Code size 13 (0xd)
.maxstack 8
IL_0000: ldc.i4.0
IL_0001: stsfld int32 '<StartupCode$StaticInit_Struct01>'.$StaticInit_Struct01::init@
IL_0006: ldsfld int32 '<StartupCode$StaticInit_Struct01>'.$StaticInit_Struct01::init@
IL_000b: pop
IL_000c: ret
} // end of method C::.cctor
} // end of class C
} // end of class StaticInit_Struct01
.class private abstract auto ansi sealed '<StartupCode$StaticInit_Struct01>'.$StaticInit_Struct01
extends [mscorlib]System.Object
{
.field static assembly int32 init@
.custom instance void [mscorlib]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 )
.custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 )
.custom instance void [mscorlib]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 )
.method public static void main@() cil managed
{
.entrypoint
// Code size 24 (0x18)
.maxstack 8
IL_0000: ldstr "1"
IL_0005: callvirt instance int32 [mscorlib]System.String::get_Length()
IL_000a: stsfld int32 StaticInit_Struct01/C::x
IL_000f: ldc.i4.1
IL_0010: volatile.
IL_0012: stsfld int32 StaticInit_Struct01/C::init@4
IL_0017: ret
} // end of method $StaticInit_Struct01::main@
} // end of class '<StartupCode$StaticInit_Struct01>'.$StaticInit_Struct01
// =============================================================
// *********** DISASSEMBLY COMPLETE ***********************
// WARNING: Created Win32 resource file c:\kevinransom\fsharp\artifacts\bin\FSharp.Compiler.ComponentTests\Debug\net472\tests\EmittedIL\StaticInit\StaticInit_Struct01_fs\StaticInit_Struct01.res
// Microsoft (R) .NET Framework IL Disassembler. Version 4.8.3928.0
// Copyright (c) Microsoft Corporation. All rights reserved.
// Microsoft (R) .NET IL Disassembler. Version 5.0.0-preview.7.20364.11
......@@ -22,27 +21,29 @@
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 00 00 00 00 00 )
// .custom instance void [mscorlib]System.Diagnostics.DebuggableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggableAttribute/DebuggingModes) = ( 01 00 03 01 00 00 00 00 )
.hash algorithm 0x00008004
.ver 0:0:0:0
}
.mresource public FSharpSignatureData.ValueTupleAliasConstructor
{
// Offset: 0x00000000 Length: 0x000001E0
// Offset: 0x00000000 Length: 0x0000022E
// WARNING: managed resource file FSharpSignatureData.ValueTupleAliasConstructor created
}
.mresource public FSharpOptimizationData.ValueTupleAliasConstructor
{
// Offset: 0x000001E8 Length: 0x00000061
// Offset: 0x00000238 Length: 0x00000061
// WARNING: managed resource file FSharpOptimizationData.ValueTupleAliasConstructor created
}
.module ValueTupleAliasConstructor.exe
// MVID: {61E07031-A8CF-BB34-A745-03833170E061}
// MVID: {624CF392-A8CF-BB34-A745-038392F34C62}
.imagebase 0x00400000
.file alignment 0x00000200
.stackreserve 0x00100000
.subsystem 0x0003 // WINDOWS_CUI
.corflags 0x00000001 // ILONLY
// Image base: 0x05930000
// Image base: 0x03200000
// =============== CLASS MEMBERS DECLARATION ===================
......@@ -79,3 +80,4 @@
// =============================================================
// *********** DISASSEMBLY COMPLETE ***********************
// WARNING: Created Win32 resource file c:\kevinransom\fsharp\artifacts\bin\FSharp.Compiler.ComponentTests\Release\net472\tests\EmittedIL\Tuples\ValueTupleAliasConstructor_fs\ValueTupleAliasConstructor.res
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册