diff --git a/azure-pipelines-PR.yml b/azure-pipelines-PR.yml index b627fab985c..57c290e1fc2 100644 --- a/azure-pipelines-PR.yml +++ b/azure-pipelines-PR.yml @@ -796,6 +796,7 @@ stages: continueOnError: true condition: always() - job: ILVerify + timeoutInMinutes: 120 pool: name: $(DncEngPublicBuildPool) demands: ImageOverride -equals $(_WindowsMachineQueueName) diff --git a/docs/release-notes/.FSharp.Compiler.Service/11.0.100.md b/docs/release-notes/.FSharp.Compiler.Service/11.0.100.md index 965957dbc0c..a7859f91fed 100644 --- a/docs/release-notes/.FSharp.Compiler.Service/11.0.100.md +++ b/docs/release-notes/.FSharp.Compiler.Service/11.0.100.md @@ -1,11 +1,15 @@ ### Fixed +* Fix inner mutually-recursive `let rec ... and ...` functions under `--realsig+` not being lifted to top-level static methods (TLR), causing `FSharpFunc` closure allocations and loss of `tail.` opcodes — the large struct-mutual-recursion perf regression reported in [Issue #17607](https://github.com/dotnet/fsharp/issues/17607). ([PR #19882](https://github.com/dotnet/fsharp/pull/19882)) +* Fix `TypeLoadException` ("Specialize tried to implicitly override a method with weaker type parameter constraints") and the related CLR crash with constrained inline calls by stripping constraints from closure-class typars in `EraseClosures.convIlxClosureDef`. ([Issue #14492](https://github.com/dotnet/fsharp/issues/14492), [Issue #19075](https://github.com/dotnet/fsharp/issues/19075), [PR #19882](https://github.com/dotnet/fsharp/pull/19882)) + * Suppress hover/symbol resolution for wildcard `_` patterns inside `member _.…` bodies that incorrectly showed `val _: T` tooltip. ([PR #19760](https://github.com/dotnet/fsharp/pull/19760)) * Deduplicate format specifier locations in computation expressions so editor tooling no longer reports duplicate entries for the same `%` specifier. ([Issue #16419](https://github.com/dotnet/fsharp/issues/16419), [PR #19791](https://github.com/dotnet/fsharp/pull/19791)) * Reject non-function bindings for single-case and partial active pattern names with FS1209, matching the existing multi-case behavior. ([PR #19763](https://github.com/dotnet/fsharp/pull/19763)) * Fix FS0421 "The address of the variable cannot be used at this point" incorrectly raised for the discard pattern `let _ = &expr` when `let x = &expr` compiles. ([Issue #18841](https://github.com/dotnet/fsharp/issues/18841), [PR #19811](https://github.com/dotnet/fsharp/pull/19811)) * Honor `--nowarn` and `--warnaserror` for warnings emitted during command-line option parsing ([Issue #19576](https://github.com/dotnet/fsharp/issues/19576), [PR #19776](https://github.com/dotnet/fsharp/pull/19776)) * Fix `[]` prefix attributes being silently dropped on class members, and fix false-positive `AllowMultiple=false` errors when `[]` and `[]` are applied to the same binding. ([Issue #17904](https://github.com/dotnet/fsharp/issues/17904), [Issue #19020](https://github.com/dotnet/fsharp/issues/19020), [PR #19738](https://github.com/dotnet/fsharp/pull/19738)) + * Preserve type abbreviations (`string`, user-defined aliases) in the refined type of bindings introduced after a `| null` pattern in a `match` expression. ([Issue #19646](https://github.com/dotnet/fsharp/issues/19646), [PR #19745](https://github.com/dotnet/fsharp/pull/19745)) * Fix attributes on return type of unparenthesized tuple methods being silently dropped from IL. ([Issue #462](https://github.com/dotnet/fsharp/issues/462), [PR #19714](https://github.com/dotnet/fsharp/pull/19714)) * Fix false-positive nullness warning (FS3261) when pattern matching narrows nullness inside seq/list/array comprehensions. ([Issue #19644](https://github.com/dotnet/fsharp/issues/19644), [PR #19743](https://github.com/dotnet/fsharp/pull/19743)) diff --git a/src/Compiler/AbstractIL/il.fs b/src/Compiler/AbstractIL/il.fs index 5a80b12fbdc..629a3d260bb 100644 --- a/src/Compiler/AbstractIL/il.fs +++ b/src/Compiler/AbstractIL/il.fs @@ -3375,6 +3375,8 @@ let mkILSimpleTypar nm = MetadataIndex = NoMetadataIdx } +/// Returns gp with all constraint state cleared. CustomAttrsStored is also reset because +/// some constraints (notably IsUnmanagedAttribute) are encoded there. let stripILGenericParamConstraints (gp: ILGenericParameterDef) = { gp with Constraints = [] @@ -3382,6 +3384,7 @@ let stripILGenericParamConstraints (gp: ILGenericParameterDef) = HasNotNullableValueTypeConstraint = false HasDefaultConstructorConstraint = false HasAllowsRefStruct = false + CustomAttrsStored = storeILCustomAttrs emptyILCustomAttrs } let genericParamOfGenericActual (_ga: ILType) = mkILSimpleTypar "T" diff --git a/src/Compiler/CodeGen/EraseClosures.fs b/src/Compiler/CodeGen/EraseClosures.fs index 6aef85d40b5..9aad82b0521 100644 --- a/src/Compiler/CodeGen/EraseClosures.fs +++ b/src/Compiler/CodeGen/EraseClosures.fs @@ -484,9 +484,11 @@ let rec convIlxClosureDef cenv encl (td: ILTypeDef) clo = match tyargsl, tmargsl, laterStruct with // CASE 1 - Type abstraction | _ :: _, [], _ -> - let addedGenParams = tyargsl let nowReturnTy = (mkTyOfLambdas cenv laterStruct) + // Both Specialize<> and the T-suffixed closure type must be unconstrained (#14492). + let unconstrainedGenParams = tyargsl |> List.map stripILGenericParamConstraints + // CASE 1a. Split a type abstraction. // Adjust all the argument and environment accesses // Actually that special to do here in the type abstraction case @@ -504,7 +506,7 @@ let rec convIlxClosureDef cenv encl (td: ILTypeDef) clo = let laterTypeName = td.Name + "T" let laterTypeRef = mkILNestedTyRef (ILScopeRef.Local, encl, laterTypeName) - let laterGenericParams = td.GenericParams @ addedGenParams + let laterGenericParams = td.GenericParams @ unconstrainedGenParams let selfFreeVar = let baseName = CompilerGeneratedName("self" + string nowFields.Length) @@ -564,14 +566,12 @@ let rec convIlxClosureDef cenv encl (td: ILTypeDef) clo = let convil = convILMethodBody (Some nowCloSpec, boxReturnTy) clo.cloCode.Value - let specializeGenParams = addedGenParams |> List.map stripILGenericParamConstraints - let nowApplyMethDef = mkILGenericVirtualMethod ( "Specialize", ILCallingConv.Instance, ILMemberAccess.Public, - specializeGenParams, + unconstrainedGenParams, [], mkILReturn cenv.ilg.typ_Object, MethodBody.IL(notlazy convil) diff --git a/src/Compiler/CodeGen/IlxGen.fs b/src/Compiler/CodeGen/IlxGen.fs index 46959e56b22..de0ff0c5c10 100644 --- a/src/Compiler/CodeGen/IlxGen.fs +++ b/src/Compiler/CodeGen/IlxGen.fs @@ -1207,6 +1207,9 @@ and IlxGenEnv = /// Indicates the default "place" for stuff we're currently generating cloc: CompileLocation + /// Non-generic enclosing module (never narrowed by AddEnclosingToEnv). Routing target for TLR lifts. + moduleCloc: CompileLocation + /// Indicates the default "place" for initialization stuff we're currently generating initClassCompLoc: CompileLocation option @@ -10336,7 +10339,22 @@ and AllocValReprWithinExpr cenv cgbuf endMark cloc v eenv = else NoShadowLocal, eenv - ComputeAndAddStorageForLocalValWithValReprInfo (cenv, eenv.intraAssemblyInfo, cenv.options.isInteractive, optShadowLocal) cloc v eenv + // TLR lifts avoid generic enclosing scopes (#17607); namespace-root lifts use the per-file + // init class to avoid generated-name collisions in the shared . + let effectiveCloc = + if v.IsCompiledAsTopLevel && not v.IsMemberOrModuleBinding then + if eenv.moduleCloc.Enclosing.IsEmpty then + CompLocForInitClass eenv.moduleCloc + else + eenv.moduleCloc + else + cloc + + ComputeAndAddStorageForLocalValWithValReprInfo + (cenv, eenv.intraAssemblyInfo, cenv.options.isInteractive, optShadowLocal) + effectiveCloc + v + eenv //-------------------------------------------------------------------------- // Generate stack save/restore and assertions - pulled into letrec by alloc* @@ -10759,9 +10777,12 @@ and GenModuleBinding cenv (cgbuf: CodeGenBuffer) (qname: QualifiedNameOfFile) la // Evaluate bindings for module let hidden = IsHiddenTycon eenv.sigToImplRemapInfo mspec + let moduleLoc = CompLocForFixedModule cenv.options.fragName qname.Text mspec + let eenvinner = { eenv with - cloc = CompLocForFixedModule cenv.options.fragName qname.Text mspec + cloc = moduleLoc + moduleCloc = moduleLoc initLocals = eenv.initLocals && not (EntityHasWellKnownAttribute cenv.g WellKnownEntityAttributes.SkipLocalsInitAttribute mspec) @@ -10827,13 +10848,16 @@ and GenImplFile cenv (mgbuf: AssemblyBuilder) mainInfoOpt eenv (implFile: Checke for anonInfo in anonRecdTypes.Values do mgbuf.GenerateAnonType((fun ilThisTy -> GenToStringMethod cenv eenv ilThisTy m), anonInfo) + let withQName (loc: CompileLocation) = + { loc with + TopImplQualifiedName = qname.Text + Range = m + } + let eenv = { eenv with - cloc = - { eenv.cloc with - TopImplQualifiedName = qname.Text - Range = m - } + cloc = withQName eenv.cloc + moduleCloc = withQName eenv.moduleCloc } cenv.optimizeDuringCodeGen <- optimizeDuringCodeGen @@ -12569,9 +12593,12 @@ let CodegenAssembly cenv eenv mgbuf implFiles = //------------------------------------------------------------------------- let GetEmptyIlxGenEnv (g: TcGlobals) ccu = + let ccuLoc = CompLocForCcu ccu + { tyenv = TypeReprEnv.Empty - cloc = CompLocForCcu ccu + cloc = ccuLoc + moduleCloc = ccuLoc initClassCompLoc = None initFieldName = CompilerGeneratedName "init" staticInitializationName = CompilerGeneratedName "staticInitialization" @@ -12654,8 +12681,11 @@ let GenerateCode (cenv, anonTypeTable, eenv, CheckedAssemblyAfterOptimization im let mgbuf = AssemblyBuilder(cenv, anonTypeTable) let eenv = + let fragLoc = CompLocForFragment cenv.options.fragName cenv.viewCcu + { eenv with - cloc = CompLocForFragment cenv.options.fragName cenv.viewCcu + cloc = fragLoc + moduleCloc = fragLoc delayCodeGen = cenv.options.parallelIlxGenEnabled } diff --git a/src/Compiler/Optimize/InnerLambdasToTopLevelFuncs.fs b/src/Compiler/Optimize/InnerLambdasToTopLevelFuncs.fs index 885917fee37..0e2d1ede692 100644 --- a/src/Compiler/Optimize/InnerLambdasToTopLevelFuncs.fs +++ b/src/Compiler/Optimize/InnerLambdasToTopLevelFuncs.fs @@ -157,6 +157,32 @@ let IsRefusedTLR g (f: Val) = let refuseTest = alreadyChosen || mutableVal || byrefVal || specialVal || dllImportStubOrOtherNeverInline || isResumableCode || isInlineIfLambda refuseTest +/// Under --realsig+, a TLR-lifted helper is emitted at module scope (outside its declaring +/// type when that type is a class). If the helper's body invokes a source-`private` member +/// of a class/struct, the CLR raises MethodAccessException at runtime because IL `private` +/// is type-scoped. +/// +/// Private members of MODULES are not at risk: the lifted helper lands in the same module +/// IL class as the private val. F# RecdFields always compile to IL `assembly` or wider, so +/// field access is safe; only val/method references whose declaring entity is a class need +/// to be checked. +let BodyReferencesTypeScopedPrivate e = + let mutable found = false + let folder = + { ExprFolder0 with + exprIntercept = fun _recurseF noInterceptF z expr -> + if found then z + else + match expr with + | Expr.Val (vref, _, _) when vref.Accessibility.IsPrivate -> + match vref.TryDeclaringEntity with + | Parent eref when not eref.IsModuleOrNamespace -> found <- true + | _ -> () + | _ -> () + noInterceptF z expr } + FoldExpr folder () e |> ignore + found + let IsMandatoryTopLevel (f: Val) = let specialVal = f.MemberInfo.IsSome let isModulBinding = f.IsMemberOrModuleBinding @@ -185,6 +211,11 @@ module Pass1_DetermineTLRAndArities = // Exclude values bound in a decision tree elif Zset.contains f xinfo.DecisionTreeBindings then None + + // Under --realsig+, lifting a helper out of its declaring type would lose access to + // any source-`private` members it references, producing MethodAccessException at runtime. + elif g.realsig && BodyReferencesTypeScopedPrivate e then + None else // Could the binding be TLR? with what arity? let atTopLevel = Zset.contains f xinfo.TopLevelBindings @@ -192,11 +223,7 @@ module Pass1_DetermineTLRAndArities = let nFormals = vss.Length let nMaxApplied = GetMaxNumArgsAtUses xinfo f let arity = min nFormals nMaxApplied - if atTopLevel then - Some (f, arity) - elif g.realsig then - None - else if arity<>0 || not (isNil tps) then + if atTopLevel || arity <> 0 || not (isNil tps) then Some (f, arity) else None diff --git a/tests/FSharp.Compiler.ComponentTests/Conformance/Constraints/Unmanaged.fs b/tests/FSharp.Compiler.ComponentTests/Conformance/Constraints/Unmanaged.fs index 173f18537a5..712333340fa 100644 --- a/tests/FSharp.Compiler.ComponentTests/Conformance/Constraints/Unmanaged.fs +++ b/tests/FSharp.Compiler.ComponentTests/Conformance/Constraints/Unmanaged.fs @@ -526,15 +526,17 @@ Main() |> compile |> shouldSucceed |> verifyIL [""" - .method assembly strict virtual instance class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 DirectInvoke() cil managed - { - .param type T - .custom instance void [runtime]System.Runtime.CompilerServices.IsUnmanagedAttribute::.ctor() = ( 01 00 00 00 ) - - .maxstack 8 - IL_0000: ldsfld class Test/'func@3-1' class Test/'func@3-1'::@_instance - IL_0005: ret - } """] + .method assembly static class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 + func@3() cil managed + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 09 00 00 00 00 00 ) + .param type T + .custom instance void [runtime]System.Runtime.CompilerServices.IsUnmanagedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldsfld class Test/'func@3-1' class Test/'func@3-1'::@_instance + IL_0005: ret + } """] [] diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Inlining/Inlining.fs b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Inlining/Inlining.fs index 5bd346e2075..3358122f743 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Inlining/Inlining.fs +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Inlining/Inlining.fs @@ -28,6 +28,30 @@ module Inlining = |> getCompilation |> verifyCompilation + [] + let ``Regression_TLR_MutualInnerRec_fs`` compilation = + compilation + |> getCompilation + |> verifyCompilation + + [] + let ``Regression_TLR_MutualInnerRec_Point2D_fs`` compilation = + compilation + |> getCompilation + |> verifyCompilation + + [] + let ``Regression_TLR_MutualInnerRec_Generic_fs`` compilation = + compilation + |> getCompilation + |> verifyCompilation + + [] + let ``Regression_TLR_MutualInnerRec_CapturedEnv_fs`` compilation = + compilation + |> getCompilation + |> verifyCompilation + // SOURCE=Match02.fs SCFLAGS="-a --optimize+" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd Match02.dll" # Match02.fs [] let ``Match02_fs`` compilation = diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Inlining/Match01.fs.RealInternalSignatureOn.il.net472.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Inlining/Match01.fs.RealInternalSignatureOn.il.net472.bsl index 3553599f1e1..8ccc25d62ff 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Inlining/Match01.fs.RealInternalSignatureOn.il.net472.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Inlining/Match01.fs.RealInternalSignatureOn.il.net472.bsl @@ -1,21 +1,16 @@ - - - - - .assembly extern runtime { } .assembly extern FSharp.Core { } .assembly assembly { - .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 ) +.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 ) + + - - - .hash algorithm 0x00008004 - .ver 0:0:0:0 +.hash algorithm 0x00008004 +.ver 0:0:0:0 } .module assembly.exe @@ -29,1582 +24,1482 @@ -.class public abstract auto ansi sealed Match01 - extends [runtime]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 abstract auto autochar serializable nested public beforefieldinit Test1 - extends [runtime]System.Object - implements class [runtime]System.IEquatable`1, - [runtime]System.Collections.IStructuralEquatable, - class [runtime]System.IComparable`1, - [runtime]System.IComparable, - [runtime]System.Collections.IStructuralComparable - { - .custom instance void [runtime]System.Diagnostics.DebuggerDisplayAttribute::.ctor(string) = ( 01 00 15 7B 5F 5F 44 65 62 75 67 44 69 73 70 6C - 61 79 28 29 2C 6E 71 7D 00 00 ) - .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 01 00 00 00 00 00 ) - .class abstract auto ansi sealed nested public Tags - extends [runtime]System.Object - { - .field public static literal int32 X11 = int32(0x00000000) - .field public static literal int32 X12 = int32(0x00000001) - .field public static literal int32 X13 = int32(0x00000002) - .field public static literal int32 X14 = int32(0x00000003) - } - - .class auto ansi serializable nested public beforefieldinit specialname X11 - extends Match01/Test1 - { - .custom instance void [runtime]System.Diagnostics.DebuggerTypeProxyAttribute::.ctor(class [runtime]System.Type) = ( 01 00 20 4D 61 74 63 68 30 31 2B 54 65 73 74 31 - 2B 58 31 31 40 44 65 62 75 67 54 79 70 65 50 72 - 6F 78 79 00 00 ) - .custom instance void [runtime]System.Diagnostics.DebuggerDisplayAttribute::.ctor(string) = ( 01 00 15 7B 5F 5F 44 65 62 75 67 44 69 73 70 6C - 61 79 28 29 2C 6E 71 7D 00 00 ) - .field assembly initonly int32 item - .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) - .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) - .method assembly specialname rtspecialname instance void .ctor(int32 item) cil managed - { - .custom instance void System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::.ctor(valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes, - class [runtime]System.Type) = ( 01 00 60 06 00 00 0D 4D 61 74 63 68 30 31 2B 54 - 65 73 74 31 00 00 ) - .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) - - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: ldc.i4.0 - IL_0002: call instance void Match01/Test1::.ctor(int32) - IL_0007: ldarg.0 - IL_0008: ldarg.1 - IL_0009: stfld int32 Match01/Test1/X11::item - IL_000e: ret - } - - .method public hidebysig instance int32 get_Item() cil managed - { - .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) - - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: ldfld int32 Match01/Test1/X11::item - IL_0006: ret - } - - .property instance int32 Item() - { - .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags, - int32, - int32) = ( 01 00 04 00 00 00 00 00 00 00 00 00 00 00 00 00 ) - .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) - .get instance int32 Match01/Test1/X11::get_Item() - } - } - - .class auto ansi serializable nested public beforefieldinit specialname X12 - extends Match01/Test1 - { - .custom instance void [runtime]System.Diagnostics.DebuggerTypeProxyAttribute::.ctor(class [runtime]System.Type) = ( 01 00 20 4D 61 74 63 68 30 31 2B 54 65 73 74 31 - 2B 58 31 32 40 44 65 62 75 67 54 79 70 65 50 72 - 6F 78 79 00 00 ) - .custom instance void [runtime]System.Diagnostics.DebuggerDisplayAttribute::.ctor(string) = ( 01 00 15 7B 5F 5F 44 65 62 75 67 44 69 73 70 6C - 61 79 28 29 2C 6E 71 7D 00 00 ) - .field assembly initonly int32 item - .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) - .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) - .method assembly specialname rtspecialname instance void .ctor(int32 item) cil managed - { - .custom instance void System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::.ctor(valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes, - class [runtime]System.Type) = ( 01 00 60 06 00 00 0D 4D 61 74 63 68 30 31 2B 54 - 65 73 74 31 00 00 ) - .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) - - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: ldc.i4.1 - IL_0002: call instance void Match01/Test1::.ctor(int32) - IL_0007: ldarg.0 - IL_0008: ldarg.1 - IL_0009: stfld int32 Match01/Test1/X12::item - IL_000e: ret - } - - .method public hidebysig instance int32 get_Item() cil managed - { - .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) - - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: ldfld int32 Match01/Test1/X12::item - IL_0006: ret - } - - .property instance int32 Item() - { - .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags, - int32, - int32) = ( 01 00 04 00 00 00 01 00 00 00 00 00 00 00 00 00 ) - .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) - .get instance int32 Match01/Test1/X12::get_Item() - } - } - - .class auto ansi serializable nested public beforefieldinit specialname X13 - extends Match01/Test1 - { - .custom instance void [runtime]System.Diagnostics.DebuggerTypeProxyAttribute::.ctor(class [runtime]System.Type) = ( 01 00 20 4D 61 74 63 68 30 31 2B 54 65 73 74 31 - 2B 58 31 33 40 44 65 62 75 67 54 79 70 65 50 72 - 6F 78 79 00 00 ) - .custom instance void [runtime]System.Diagnostics.DebuggerDisplayAttribute::.ctor(string) = ( 01 00 15 7B 5F 5F 44 65 62 75 67 44 69 73 70 6C - 61 79 28 29 2C 6E 71 7D 00 00 ) - .field assembly initonly int32 item - .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) - .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) - .method assembly specialname rtspecialname instance void .ctor(int32 item) cil managed - { - .custom instance void System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::.ctor(valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes, - class [runtime]System.Type) = ( 01 00 60 06 00 00 0D 4D 61 74 63 68 30 31 2B 54 - 65 73 74 31 00 00 ) - .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) - - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: ldc.i4.2 - IL_0002: call instance void Match01/Test1::.ctor(int32) - IL_0007: ldarg.0 - IL_0008: ldarg.1 - IL_0009: stfld int32 Match01/Test1/X13::item - IL_000e: ret - } - - .method public hidebysig instance int32 get_Item() cil managed - { - .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) - - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: ldfld int32 Match01/Test1/X13::item - IL_0006: ret - } - - .property instance int32 Item() - { - .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags, - int32, - int32) = ( 01 00 04 00 00 00 02 00 00 00 00 00 00 00 00 00 ) - .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) - .get instance int32 Match01/Test1/X13::get_Item() - } - } - - .class auto ansi serializable nested public beforefieldinit specialname X14 - extends Match01/Test1 - { - .custom instance void [runtime]System.Diagnostics.DebuggerTypeProxyAttribute::.ctor(class [runtime]System.Type) = ( 01 00 20 4D 61 74 63 68 30 31 2B 54 65 73 74 31 - 2B 58 31 34 40 44 65 62 75 67 54 79 70 65 50 72 - 6F 78 79 00 00 ) - .custom instance void [runtime]System.Diagnostics.DebuggerDisplayAttribute::.ctor(string) = ( 01 00 15 7B 5F 5F 44 65 62 75 67 44 69 73 70 6C - 61 79 28 29 2C 6E 71 7D 00 00 ) - .field assembly initonly int32 item - .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) - .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) - .method assembly specialname rtspecialname instance void .ctor(int32 item) cil managed - { - .custom instance void System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::.ctor(valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes, - class [runtime]System.Type) = ( 01 00 60 06 00 00 0D 4D 61 74 63 68 30 31 2B 54 - 65 73 74 31 00 00 ) - .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) - - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: ldc.i4.3 - IL_0002: call instance void Match01/Test1::.ctor(int32) - IL_0007: ldarg.0 - IL_0008: ldarg.1 - IL_0009: stfld int32 Match01/Test1/X14::item - IL_000e: ret - } - - .method public hidebysig instance int32 get_Item() cil managed - { - .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) - - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: ldfld int32 Match01/Test1/X14::item - IL_0006: ret - } - - .property instance int32 Item() - { - .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags, - int32, - int32) = ( 01 00 04 00 00 00 03 00 00 00 00 00 00 00 00 00 ) - .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) - .get instance int32 Match01/Test1/X14::get_Item() - } - } - - .class auto ansi nested assembly beforefieldinit specialname X11@DebugTypeProxy - extends [runtime]System.Object - { - .field assembly class Match01/Test1/X11 _obj - .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) - .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) - .method public specialname rtspecialname instance void .ctor(class Match01/Test1/X11 obj) cil managed - { - .custom instance void System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::.ctor(valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes, - class [runtime]System.Type) = ( 01 00 60 06 00 00 0D 4D 61 74 63 68 30 31 2B 54 - 65 73 74 31 00 00 ) - .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) - - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: call instance void [runtime]System.Object::.ctor() - IL_0006: ldarg.0 - IL_0007: ldarg.1 - IL_0008: stfld class Match01/Test1/X11 Match01/Test1/X11@DebugTypeProxy::_obj - IL_000d: ret - } - - .method public hidebysig instance int32 get_Item() cil managed - { - .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) - - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: ldfld class Match01/Test1/X11 Match01/Test1/X11@DebugTypeProxy::_obj - IL_0006: ldfld int32 Match01/Test1/X11::item - IL_000b: ret - } - - .property instance int32 Item() - { - .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags, - int32, - int32) = ( 01 00 04 00 00 00 00 00 00 00 00 00 00 00 00 00 ) - .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) - .get instance int32 Match01/Test1/X11@DebugTypeProxy::get_Item() - } - } - - .class auto ansi nested assembly beforefieldinit specialname X12@DebugTypeProxy - extends [runtime]System.Object - { - .field assembly class Match01/Test1/X12 _obj - .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) - .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) - .method public specialname rtspecialname instance void .ctor(class Match01/Test1/X12 obj) cil managed - { - .custom instance void System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::.ctor(valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes, - class [runtime]System.Type) = ( 01 00 60 06 00 00 0D 4D 61 74 63 68 30 31 2B 54 - 65 73 74 31 00 00 ) - .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) - - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: call instance void [runtime]System.Object::.ctor() - IL_0006: ldarg.0 - IL_0007: ldarg.1 - IL_0008: stfld class Match01/Test1/X12 Match01/Test1/X12@DebugTypeProxy::_obj - IL_000d: ret - } - - .method public hidebysig instance int32 get_Item() cil managed - { - .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) - - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: ldfld class Match01/Test1/X12 Match01/Test1/X12@DebugTypeProxy::_obj - IL_0006: ldfld int32 Match01/Test1/X12::item - IL_000b: ret - } - - .property instance int32 Item() - { - .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags, - int32, - int32) = ( 01 00 04 00 00 00 01 00 00 00 00 00 00 00 00 00 ) - .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) - .get instance int32 Match01/Test1/X12@DebugTypeProxy::get_Item() - } - } - - .class auto ansi nested assembly beforefieldinit specialname X13@DebugTypeProxy - extends [runtime]System.Object - { - .field assembly class Match01/Test1/X13 _obj - .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) - .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) - .method public specialname rtspecialname instance void .ctor(class Match01/Test1/X13 obj) cil managed - { - .custom instance void System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::.ctor(valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes, - class [runtime]System.Type) = ( 01 00 60 06 00 00 0D 4D 61 74 63 68 30 31 2B 54 - 65 73 74 31 00 00 ) - .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) - - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: call instance void [runtime]System.Object::.ctor() - IL_0006: ldarg.0 - IL_0007: ldarg.1 - IL_0008: stfld class Match01/Test1/X13 Match01/Test1/X13@DebugTypeProxy::_obj - IL_000d: ret - } - - .method public hidebysig instance int32 get_Item() cil managed - { - .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) - - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: ldfld class Match01/Test1/X13 Match01/Test1/X13@DebugTypeProxy::_obj - IL_0006: ldfld int32 Match01/Test1/X13::item - IL_000b: ret - } - - .property instance int32 Item() - { - .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags, - int32, - int32) = ( 01 00 04 00 00 00 02 00 00 00 00 00 00 00 00 00 ) - .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) - .get instance int32 Match01/Test1/X13@DebugTypeProxy::get_Item() - } - } - - .class auto ansi nested assembly beforefieldinit specialname X14@DebugTypeProxy - extends [runtime]System.Object - { - .field assembly class Match01/Test1/X14 _obj - .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) - .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) - .method public specialname rtspecialname instance void .ctor(class Match01/Test1/X14 obj) cil managed - { - .custom instance void System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::.ctor(valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes, - class [runtime]System.Type) = ( 01 00 60 06 00 00 0D 4D 61 74 63 68 30 31 2B 54 - 65 73 74 31 00 00 ) - .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) - - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: call instance void [runtime]System.Object::.ctor() - IL_0006: ldarg.0 - IL_0007: ldarg.1 - IL_0008: stfld class Match01/Test1/X14 Match01/Test1/X14@DebugTypeProxy::_obj - IL_000d: ret - } - - .method public hidebysig instance int32 get_Item() cil managed - { - .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) - - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: ldfld class Match01/Test1/X14 Match01/Test1/X14@DebugTypeProxy::_obj - IL_0006: ldfld int32 Match01/Test1/X14::item - IL_000b: ret - } - - .property instance int32 Item() - { - .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags, - int32, - int32) = ( 01 00 04 00 00 00 03 00 00 00 00 00 00 00 00 00 ) - .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) - .get instance int32 Match01/Test1/X14@DebugTypeProxy::get_Item() - } - } - - .class auto ansi serializable sealed nested assembly beforefieldinit clo@4 - extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 - { - .field public class Match01/Test1 this - .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) - .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) - .field public class Match01/Test1 obj - .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) - .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) - .method assembly specialname rtspecialname instance void .ctor(class Match01/Test1 this, class Match01/Test1 obj) cil managed - { - .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) - - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::.ctor() - IL_0006: ldarg.0 - IL_0007: ldarg.1 - IL_0008: stfld class Match01/Test1 Match01/Test1/clo@4::this - IL_000d: ldarg.0 - IL_000e: ldarg.2 - IL_000f: stfld class Match01/Test1 Match01/Test1/clo@4::obj - IL_0014: ret - } - - .method public strict virtual instance int32 Invoke(class [FSharp.Core]Microsoft.FSharp.Core.Unit unitVar) cil managed - { - - .maxstack 7 - .locals init (int32 V_0, - int32 V_1, - class Match01/Test1/X11 V_2, - class Match01/Test1/X11 V_3, - class [runtime]System.Collections.IComparer V_4, - int32 V_5, - int32 V_6, - class Match01/Test1/X12 V_7, - class Match01/Test1/X12 V_8, - class Match01/Test1/X13 V_9, - class Match01/Test1/X13 V_10, - class Match01/Test1/X14 V_11, - class Match01/Test1/X14 V_12) - IL_0000: ldarg.0 - IL_0001: ldfld class Match01/Test1 Match01/Test1/clo@4::this - IL_0006: ldfld int32 Match01/Test1::_tag - IL_000b: stloc.0 - IL_000c: ldarg.0 - IL_000d: ldfld class Match01/Test1 Match01/Test1/clo@4::obj - IL_0012: ldfld int32 Match01/Test1::_tag - IL_0017: stloc.1 - IL_0018: ldloc.0 - IL_0019: ldloc.1 - IL_001a: bne.un IL_013f - - IL_001f: ldarg.0 - IL_0020: ldfld class Match01/Test1 Match01/Test1/clo@4::this - IL_0025: call instance int32 Match01/Test1::get_Tag() - IL_002a: switch ( - IL_003f, - IL_007c, - IL_00bd, - IL_00fe) - IL_003f: ldarg.0 - IL_0040: ldfld class Match01/Test1 Match01/Test1/clo@4::this - IL_0045: castclass Match01/Test1/X11 - IL_004a: stloc.2 - IL_004b: ldarg.0 - IL_004c: ldfld class Match01/Test1 Match01/Test1/clo@4::obj - IL_0051: castclass Match01/Test1/X11 - IL_0056: stloc.3 - IL_0057: call class [runtime]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() - IL_005c: stloc.s V_4 - IL_005e: ldloc.2 - IL_005f: ldfld int32 Match01/Test1/X11::item - IL_0064: stloc.s V_5 - IL_0066: ldloc.3 - IL_0067: ldfld int32 Match01/Test1/X11::item - IL_006c: stloc.s V_6 - IL_006e: ldloc.s V_5 - IL_0070: ldloc.s V_6 - IL_0072: cgt - IL_0074: ldloc.s V_5 - IL_0076: ldloc.s V_6 - IL_0078: clt - IL_007a: sub - IL_007b: ret - - IL_007c: ldarg.0 - IL_007d: ldfld class Match01/Test1 Match01/Test1/clo@4::this - IL_0082: castclass Match01/Test1/X12 - IL_0087: stloc.s V_7 - IL_0089: ldarg.0 - IL_008a: ldfld class Match01/Test1 Match01/Test1/clo@4::obj - IL_008f: castclass Match01/Test1/X12 - IL_0094: stloc.s V_8 - IL_0096: call class [runtime]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() - IL_009b: stloc.s V_4 - IL_009d: ldloc.s V_7 - IL_009f: ldfld int32 Match01/Test1/X12::item - IL_00a4: stloc.s V_5 - IL_00a6: ldloc.s V_8 - IL_00a8: ldfld int32 Match01/Test1/X12::item - IL_00ad: stloc.s V_6 - IL_00af: ldloc.s V_5 - IL_00b1: ldloc.s V_6 - IL_00b3: cgt - IL_00b5: ldloc.s V_5 - IL_00b7: ldloc.s V_6 - IL_00b9: clt - IL_00bb: sub - IL_00bc: ret - - IL_00bd: ldarg.0 - IL_00be: ldfld class Match01/Test1 Match01/Test1/clo@4::this - IL_00c3: castclass Match01/Test1/X13 - IL_00c8: stloc.s V_9 - IL_00ca: ldarg.0 - IL_00cb: ldfld class Match01/Test1 Match01/Test1/clo@4::obj - IL_00d0: castclass Match01/Test1/X13 - IL_00d5: stloc.s V_10 - IL_00d7: call class [runtime]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() - IL_00dc: stloc.s V_4 - IL_00de: ldloc.s V_9 - IL_00e0: ldfld int32 Match01/Test1/X13::item - IL_00e5: stloc.s V_5 - IL_00e7: ldloc.s V_10 - IL_00e9: ldfld int32 Match01/Test1/X13::item - IL_00ee: stloc.s V_6 - IL_00f0: ldloc.s V_5 - IL_00f2: ldloc.s V_6 - IL_00f4: cgt - IL_00f6: ldloc.s V_5 - IL_00f8: ldloc.s V_6 - IL_00fa: clt - IL_00fc: sub - IL_00fd: ret - - IL_00fe: ldarg.0 - IL_00ff: ldfld class Match01/Test1 Match01/Test1/clo@4::this - IL_0104: castclass Match01/Test1/X14 - IL_0109: stloc.s V_11 - IL_010b: ldarg.0 - IL_010c: ldfld class Match01/Test1 Match01/Test1/clo@4::obj - IL_0111: castclass Match01/Test1/X14 - IL_0116: stloc.s V_12 - IL_0118: call class [runtime]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() - IL_011d: stloc.s V_4 - IL_011f: ldloc.s V_11 - IL_0121: ldfld int32 Match01/Test1/X14::item - IL_0126: stloc.s V_5 - IL_0128: ldloc.s V_12 - IL_012a: ldfld int32 Match01/Test1/X14::item - IL_012f: stloc.s V_6 - IL_0131: ldloc.s V_5 - IL_0133: ldloc.s V_6 - IL_0135: cgt - IL_0137: ldloc.s V_5 - IL_0139: ldloc.s V_6 - IL_013b: clt - IL_013d: sub - IL_013e: ret - - IL_013f: ldloc.0 - IL_0140: ldloc.1 - IL_0141: sub - IL_0142: ret - } - - } - - .class auto ansi serializable sealed nested assembly beforefieldinit 'clo@4-1' - extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 - { - .field public class Match01/Test1 this - .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) - .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) - .field public object obj - .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) - .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) - .field public class Match01/Test1 objTemp - .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) - .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) - .method assembly specialname rtspecialname - instance void .ctor(class Match01/Test1 this, - object obj, - class Match01/Test1 objTemp) cil managed - { - .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) - - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::.ctor() - IL_0006: ldarg.0 - IL_0007: ldarg.1 - IL_0008: stfld class Match01/Test1 Match01/Test1/'clo@4-1'::this - IL_000d: ldarg.0 - IL_000e: ldarg.2 - IL_000f: stfld object Match01/Test1/'clo@4-1'::obj - IL_0014: ldarg.0 - IL_0015: ldarg.3 - IL_0016: stfld class Match01/Test1 Match01/Test1/'clo@4-1'::objTemp - IL_001b: ret - } - - .method public strict virtual instance int32 Invoke(class [FSharp.Core]Microsoft.FSharp.Core.Unit unitVar) cil managed - { - - .maxstack 7 - .locals init (int32 V_0, - int32 V_1, - class Match01/Test1/X11 V_2, - class Match01/Test1/X11 V_3, - int32 V_4, - int32 V_5, - class Match01/Test1/X12 V_6, - class Match01/Test1/X12 V_7, - class Match01/Test1/X13 V_8, - class Match01/Test1/X13 V_9, - class Match01/Test1/X14 V_10, - class Match01/Test1/X14 V_11) - IL_0000: ldarg.0 - IL_0001: ldfld object Match01/Test1/'clo@4-1'::obj - IL_0006: unbox.any Match01/Test1 - IL_000b: brfalse IL_0137 - - IL_0010: ldarg.0 - IL_0011: ldfld class Match01/Test1 Match01/Test1/'clo@4-1'::this - IL_0016: ldfld int32 Match01/Test1::_tag - IL_001b: stloc.0 - IL_001c: ldarg.0 - IL_001d: ldfld class Match01/Test1 Match01/Test1/'clo@4-1'::objTemp - IL_0022: ldfld int32 Match01/Test1::_tag - IL_0027: stloc.1 - IL_0028: ldloc.0 - IL_0029: ldloc.1 - IL_002a: bne.un IL_0133 - - IL_002f: ldarg.0 - IL_0030: ldfld class Match01/Test1 Match01/Test1/'clo@4-1'::this - IL_0035: call instance int32 Match01/Test1::get_Tag() - IL_003a: switch ( - IL_004f, - IL_0085, - IL_00bf, - IL_00f9) - IL_004f: ldarg.0 - IL_0050: ldfld class Match01/Test1 Match01/Test1/'clo@4-1'::this - IL_0055: castclass Match01/Test1/X11 - IL_005a: stloc.2 - IL_005b: ldarg.0 - IL_005c: ldfld class Match01/Test1 Match01/Test1/'clo@4-1'::objTemp - IL_0061: castclass Match01/Test1/X11 - IL_0066: stloc.3 - IL_0067: ldloc.2 - IL_0068: ldfld int32 Match01/Test1/X11::item - IL_006d: stloc.s V_4 - IL_006f: ldloc.3 - IL_0070: ldfld int32 Match01/Test1/X11::item - IL_0075: stloc.s V_5 - IL_0077: ldloc.s V_4 - IL_0079: ldloc.s V_5 - IL_007b: cgt - IL_007d: ldloc.s V_4 - IL_007f: ldloc.s V_5 - IL_0081: clt - IL_0083: sub - IL_0084: ret - - IL_0085: ldarg.0 - IL_0086: ldfld class Match01/Test1 Match01/Test1/'clo@4-1'::this - IL_008b: castclass Match01/Test1/X12 - IL_0090: stloc.s V_6 - IL_0092: ldarg.0 - IL_0093: ldfld class Match01/Test1 Match01/Test1/'clo@4-1'::objTemp - IL_0098: castclass Match01/Test1/X12 - IL_009d: stloc.s V_7 - IL_009f: ldloc.s V_6 - IL_00a1: ldfld int32 Match01/Test1/X12::item - IL_00a6: stloc.s V_4 - IL_00a8: ldloc.s V_7 - IL_00aa: ldfld int32 Match01/Test1/X12::item - IL_00af: stloc.s V_5 - IL_00b1: ldloc.s V_4 - IL_00b3: ldloc.s V_5 - IL_00b5: cgt - IL_00b7: ldloc.s V_4 - IL_00b9: ldloc.s V_5 - IL_00bb: clt - IL_00bd: sub - IL_00be: ret - - IL_00bf: ldarg.0 - IL_00c0: ldfld class Match01/Test1 Match01/Test1/'clo@4-1'::this - IL_00c5: castclass Match01/Test1/X13 - IL_00ca: stloc.s V_8 - IL_00cc: ldarg.0 - IL_00cd: ldfld class Match01/Test1 Match01/Test1/'clo@4-1'::objTemp - IL_00d2: castclass Match01/Test1/X13 - IL_00d7: stloc.s V_9 - IL_00d9: ldloc.s V_8 - IL_00db: ldfld int32 Match01/Test1/X13::item - IL_00e0: stloc.s V_4 - IL_00e2: ldloc.s V_9 - IL_00e4: ldfld int32 Match01/Test1/X13::item - IL_00e9: stloc.s V_5 - IL_00eb: ldloc.s V_4 - IL_00ed: ldloc.s V_5 - IL_00ef: cgt - IL_00f1: ldloc.s V_4 - IL_00f3: ldloc.s V_5 - IL_00f5: clt - IL_00f7: sub - IL_00f8: ret - - IL_00f9: ldarg.0 - IL_00fa: ldfld class Match01/Test1 Match01/Test1/'clo@4-1'::this - IL_00ff: castclass Match01/Test1/X14 - IL_0104: stloc.s V_10 - IL_0106: ldarg.0 - IL_0107: ldfld class Match01/Test1 Match01/Test1/'clo@4-1'::objTemp - IL_010c: castclass Match01/Test1/X14 - IL_0111: stloc.s V_11 - IL_0113: ldloc.s V_10 - IL_0115: ldfld int32 Match01/Test1/X14::item - IL_011a: stloc.s V_4 - IL_011c: ldloc.s V_11 - IL_011e: ldfld int32 Match01/Test1/X14::item - IL_0123: stloc.s V_5 - IL_0125: ldloc.s V_4 - IL_0127: ldloc.s V_5 - IL_0129: cgt - IL_012b: ldloc.s V_4 - IL_012d: ldloc.s V_5 - IL_012f: clt - IL_0131: sub - IL_0132: ret - - IL_0133: ldloc.0 - IL_0134: ldloc.1 - IL_0135: sub - IL_0136: ret - - IL_0137: ldc.i4.1 - IL_0138: ret - } - - } - - .field assembly initonly int32 _tag - .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) - .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) - .method assembly specialname rtspecialname instance void .ctor(int32 _tag) cil managed - { - .custom instance void System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::.ctor(valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes, - class [runtime]System.Type) = ( 01 00 E0 07 00 00 0D 4D 61 74 63 68 30 31 2B 54 - 65 73 74 31 00 00 ) - .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) - - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: call instance void [runtime]System.Object::.ctor() - IL_0006: ldarg.0 - IL_0007: ldarg.1 - IL_0008: stfld int32 Match01/Test1::_tag - IL_000d: ret - } - - .method public static class Match01/Test1 NewX11(int32 item) cil managed - { - .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags, - int32) = ( 01 00 08 00 00 00 00 00 00 00 00 00 ) - .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) - - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: newobj instance void Match01/Test1/X11::.ctor(int32) - IL_0006: ret - } - - .method public hidebysig instance bool get_IsX11() cil managed - { - .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) - - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: call instance int32 Match01/Test1::get_Tag() - IL_0006: ldc.i4.0 - IL_0007: ceq - IL_0009: ret - } - - .method public static class Match01/Test1 NewX12(int32 item) cil managed - { - .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags, - int32) = ( 01 00 08 00 00 00 01 00 00 00 00 00 ) - .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) - - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: newobj instance void Match01/Test1/X12::.ctor(int32) - IL_0006: ret - } - - .method public hidebysig instance bool get_IsX12() cil managed - { - .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) - - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: call instance int32 Match01/Test1::get_Tag() - IL_0006: ldc.i4.1 - IL_0007: ceq - IL_0009: ret - } - - .method public static class Match01/Test1 NewX13(int32 item) cil managed - { - .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags, - int32) = ( 01 00 08 00 00 00 02 00 00 00 00 00 ) - .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) - - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: newobj instance void Match01/Test1/X13::.ctor(int32) - IL_0006: ret - } - - .method public hidebysig instance bool get_IsX13() cil managed - { - .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) - - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: call instance int32 Match01/Test1::get_Tag() - IL_0006: ldc.i4.2 - IL_0007: ceq - IL_0009: ret - } - - .method public static class Match01/Test1 NewX14(int32 item) cil managed - { - .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags, - int32) = ( 01 00 08 00 00 00 03 00 00 00 00 00 ) - .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) - - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: newobj instance void Match01/Test1/X14::.ctor(int32) - IL_0006: ret - } - - .method public hidebysig instance bool get_IsX14() cil managed - { - .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) - - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: call instance int32 Match01/Test1::get_Tag() - IL_0006: ldc.i4.3 - IL_0007: ceq - IL_0009: ret - } - - .method public hidebysig instance int32 get_Tag() cil managed - { - .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) - - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: ldfld int32 Match01/Test1::_tag - IL_0006: ret - } - - .method assembly hidebysig specialname instance object __DebugDisplay() cil managed - { - .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) - - .maxstack 8 - IL_0000: ldstr "%+0.8A" - IL_0005: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5,class [FSharp.Core]Microsoft.FSharp.Core.Unit,string,string,string>::.ctor(string) - IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) - IL_000f: ldarg.0 - IL_0010: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) - IL_0015: ret - } - - .method public strict virtual instance string ToString() cil managed - { - .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - - .maxstack 8 - IL_0000: ldstr "%+A" - IL_0005: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5,class [FSharp.Core]Microsoft.FSharp.Core.Unit,string,string,class Match01/Test1>::.ctor(string) - IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) - IL_000f: ldarg.0 - IL_0010: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) - IL_0015: ret - } - - .method public hidebysig virtual final instance int32 CompareTo(class Match01/Test1 obj) cil managed - { - .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - - .maxstack 4 - .locals init (class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 V_0) - IL_0000: ldarg.0 - IL_0001: brfalse.s IL_001a - - IL_0003: ldarg.1 - IL_0004: brfalse.s IL_0018 - - IL_0006: ldarg.0 - IL_0007: ldarg.1 - IL_0008: newobj instance void Match01/Test1/clo@4::.ctor(class Match01/Test1, - class Match01/Test1) - IL_000d: stloc.0 - IL_000e: ldloc.0 - IL_000f: ldnull - IL_0010: tail. - IL_0012: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) - IL_0017: ret - - IL_0018: ldc.i4.1 - IL_0019: ret - - IL_001a: ldarg.1 - IL_001b: brfalse.s IL_001f - - IL_001d: ldc.i4.m1 - IL_001e: ret - - IL_001f: ldc.i4.0 - IL_0020: ret - } - - .method public hidebysig virtual final instance int32 CompareTo(object obj) cil managed - { - .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: ldarg.1 - IL_0002: unbox.any Match01/Test1 - IL_0007: callvirt instance int32 Match01/Test1::CompareTo(class Match01/Test1) - IL_000c: ret - } - - .method public hidebysig virtual final instance int32 CompareTo(object obj, class [runtime]System.Collections.IComparer comp) cil managed - { - .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - - .maxstack 5 - .locals init (class Match01/Test1 V_0, - class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 V_1) - IL_0000: ldarg.1 - IL_0001: unbox.any Match01/Test1 - IL_0006: stloc.0 - IL_0007: ldarg.0 - IL_0008: brfalse.s IL_001d - - IL_000a: ldarg.0 - IL_000b: ldarg.1 - IL_000c: ldloc.0 - IL_000d: newobj instance void Match01/Test1/'clo@4-1'::.ctor(class Match01/Test1, - object, - class Match01/Test1) - IL_0012: stloc.1 - IL_0013: ldloc.1 - IL_0014: ldnull - IL_0015: tail. - IL_0017: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) - IL_001c: ret - - IL_001d: ldarg.1 - IL_001e: unbox.any Match01/Test1 - IL_0023: brfalse.s IL_0027 - - IL_0025: ldc.i4.m1 - IL_0026: ret - - IL_0027: ldc.i4.0 - IL_0028: ret - } - - .method public hidebysig virtual final instance int32 GetHashCode(class [runtime]System.Collections.IEqualityComparer comp) cil managed - { - .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - - .maxstack 7 - .locals init (int32 V_0, - class Match01/Test1/X11 V_1, - class Match01/Test1/X12 V_2, - class Match01/Test1/X13 V_3, - class Match01/Test1/X14 V_4) - IL_0000: ldarg.0 - IL_0001: brfalse IL_00a5 - - IL_0006: ldc.i4.0 - IL_0007: stloc.0 - IL_0008: ldarg.0 - IL_0009: call instance int32 Match01/Test1::get_Tag() - IL_000e: switch ( - IL_0023, - IL_0043, - IL_0063, - IL_0083) - IL_0023: ldarg.0 - IL_0024: castclass Match01/Test1/X11 - IL_0029: stloc.1 - IL_002a: ldc.i4.0 - IL_002b: stloc.0 - IL_002c: ldc.i4 0x9e3779b9 - IL_0031: ldloc.1 - IL_0032: ldfld int32 Match01/Test1/X11::item - IL_0037: ldloc.0 - IL_0038: ldc.i4.6 - IL_0039: shl - IL_003a: ldloc.0 - IL_003b: ldc.i4.2 - IL_003c: shr - IL_003d: add - IL_003e: add - IL_003f: add - IL_0040: stloc.0 - IL_0041: ldloc.0 - IL_0042: ret - - IL_0043: ldarg.0 - IL_0044: castclass Match01/Test1/X12 - IL_0049: stloc.2 - IL_004a: ldc.i4.1 - IL_004b: stloc.0 - IL_004c: ldc.i4 0x9e3779b9 - IL_0051: ldloc.2 - IL_0052: ldfld int32 Match01/Test1/X12::item - IL_0057: ldloc.0 - IL_0058: ldc.i4.6 - IL_0059: shl - IL_005a: ldloc.0 - IL_005b: ldc.i4.2 - IL_005c: shr - IL_005d: add - IL_005e: add - IL_005f: add - IL_0060: stloc.0 - IL_0061: ldloc.0 - IL_0062: ret - - IL_0063: ldarg.0 - IL_0064: castclass Match01/Test1/X13 - IL_0069: stloc.3 - IL_006a: ldc.i4.2 - IL_006b: stloc.0 - IL_006c: ldc.i4 0x9e3779b9 - IL_0071: ldloc.3 - IL_0072: ldfld int32 Match01/Test1/X13::item - IL_0077: ldloc.0 - IL_0078: ldc.i4.6 - IL_0079: shl - IL_007a: ldloc.0 - IL_007b: ldc.i4.2 - IL_007c: shr - IL_007d: add - IL_007e: add - IL_007f: add - IL_0080: stloc.0 - IL_0081: ldloc.0 - IL_0082: ret - - IL_0083: ldarg.0 - IL_0084: castclass Match01/Test1/X14 - IL_0089: stloc.s V_4 - IL_008b: ldc.i4.3 - IL_008c: stloc.0 - IL_008d: ldc.i4 0x9e3779b9 - IL_0092: ldloc.s V_4 - IL_0094: ldfld int32 Match01/Test1/X14::item - IL_0099: ldloc.0 - IL_009a: ldc.i4.6 - IL_009b: shl - IL_009c: ldloc.0 - IL_009d: ldc.i4.2 - IL_009e: shr - IL_009f: add - IL_00a0: add - IL_00a1: add - IL_00a2: stloc.0 - IL_00a3: ldloc.0 - IL_00a4: ret - - IL_00a5: ldc.i4.0 - IL_00a6: ret - } - - .method public hidebysig virtual final instance int32 GetHashCode() cil managed - { - .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: call class [runtime]System.Collections.IEqualityComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericEqualityComparer() - IL_0006: callvirt instance int32 Match01/Test1::GetHashCode(class [runtime]System.Collections.IEqualityComparer) - IL_000b: ret - } - - .method public hidebysig instance bool Equals(class Match01/Test1 obj, class [runtime]System.Collections.IEqualityComparer comp) cil managed - { - .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - - .maxstack 4 - .locals init (int32 V_0, - int32 V_1, - class Match01/Test1/X11 V_2, - class Match01/Test1/X11 V_3, - class Match01/Test1/X12 V_4, - class Match01/Test1/X12 V_5, - class Match01/Test1/X13 V_6, - class Match01/Test1/X13 V_7, - class Match01/Test1/X14 V_8, - class Match01/Test1/X14 V_9) - IL_0000: ldarg.0 - IL_0001: brfalse IL_00c0 - - IL_0006: ldarg.1 - IL_0007: brfalse IL_00be - - IL_000c: ldarg.0 - IL_000d: ldfld int32 Match01/Test1::_tag - IL_0012: stloc.0 - IL_0013: ldarg.1 - IL_0014: ldfld int32 Match01/Test1::_tag - IL_0019: stloc.1 - IL_001a: ldloc.0 - IL_001b: ldloc.1 - IL_001c: bne.un IL_00bc - - IL_0021: ldarg.0 - IL_0022: call instance int32 Match01/Test1::get_Tag() - IL_0027: switch ( - IL_003c, - IL_0059, - IL_007a, - IL_009b) - IL_003c: ldarg.0 - IL_003d: castclass Match01/Test1/X11 - IL_0042: stloc.2 - IL_0043: ldarg.1 - IL_0044: castclass Match01/Test1/X11 - IL_0049: stloc.3 - IL_004a: ldloc.2 - IL_004b: ldfld int32 Match01/Test1/X11::item - IL_0050: ldloc.3 - IL_0051: ldfld int32 Match01/Test1/X11::item - IL_0056: ceq - IL_0058: ret - - IL_0059: ldarg.0 - IL_005a: castclass Match01/Test1/X12 - IL_005f: stloc.s V_4 - IL_0061: ldarg.1 - IL_0062: castclass Match01/Test1/X12 - IL_0067: stloc.s V_5 - IL_0069: ldloc.s V_4 - IL_006b: ldfld int32 Match01/Test1/X12::item - IL_0070: ldloc.s V_5 - IL_0072: ldfld int32 Match01/Test1/X12::item - IL_0077: ceq - IL_0079: ret - - IL_007a: ldarg.0 - IL_007b: castclass Match01/Test1/X13 - IL_0080: stloc.s V_6 - IL_0082: ldarg.1 - IL_0083: castclass Match01/Test1/X13 - IL_0088: stloc.s V_7 - IL_008a: ldloc.s V_6 - IL_008c: ldfld int32 Match01/Test1/X13::item - IL_0091: ldloc.s V_7 - IL_0093: ldfld int32 Match01/Test1/X13::item - IL_0098: ceq - IL_009a: ret - - IL_009b: ldarg.0 - IL_009c: castclass Match01/Test1/X14 - IL_00a1: stloc.s V_8 - IL_00a3: ldarg.1 - IL_00a4: castclass Match01/Test1/X14 - IL_00a9: stloc.s V_9 - IL_00ab: ldloc.s V_8 - IL_00ad: ldfld int32 Match01/Test1/X14::item - IL_00b2: ldloc.s V_9 - IL_00b4: ldfld int32 Match01/Test1/X14::item - IL_00b9: ceq - IL_00bb: ret - - IL_00bc: ldc.i4.0 - IL_00bd: ret - - IL_00be: ldc.i4.0 - IL_00bf: ret - - IL_00c0: ldarg.1 - IL_00c1: ldnull - IL_00c2: cgt.un - IL_00c4: ldc.i4.0 - IL_00c5: ceq - IL_00c7: ret - } - - .method public hidebysig virtual final instance bool Equals(object obj, class [runtime]System.Collections.IEqualityComparer comp) cil managed - { - .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - - .maxstack 5 - .locals init (class Match01/Test1 V_0) - IL_0000: ldarg.1 - IL_0001: isinst Match01/Test1 - IL_0006: stloc.0 - IL_0007: ldloc.0 - IL_0008: brfalse.s IL_0013 - - IL_000a: ldarg.0 - IL_000b: ldloc.0 - IL_000c: ldarg.2 - IL_000d: callvirt instance bool Match01/Test1::Equals(class Match01/Test1, - class [runtime]System.Collections.IEqualityComparer) - IL_0012: ret - - IL_0013: ldc.i4.0 - IL_0014: ret - } - - .method public hidebysig virtual final instance bool Equals(class Match01/Test1 obj) cil managed - { - .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - - .maxstack 4 - .locals init (int32 V_0, - int32 V_1, - class Match01/Test1/X11 V_2, - class Match01/Test1/X11 V_3, - class Match01/Test1/X12 V_4, - class Match01/Test1/X12 V_5, - class Match01/Test1/X13 V_6, - class Match01/Test1/X13 V_7, - class Match01/Test1/X14 V_8, - class Match01/Test1/X14 V_9) - IL_0000: ldarg.0 - IL_0001: brfalse IL_00c0 - - IL_0006: ldarg.1 - IL_0007: brfalse IL_00be - - IL_000c: ldarg.0 - IL_000d: ldfld int32 Match01/Test1::_tag - IL_0012: stloc.0 - IL_0013: ldarg.1 - IL_0014: ldfld int32 Match01/Test1::_tag - IL_0019: stloc.1 - IL_001a: ldloc.0 - IL_001b: ldloc.1 - IL_001c: bne.un IL_00bc - - IL_0021: ldarg.0 - IL_0022: call instance int32 Match01/Test1::get_Tag() - IL_0027: switch ( - IL_003c, - IL_0059, - IL_007a, - IL_009b) - IL_003c: ldarg.0 - IL_003d: castclass Match01/Test1/X11 - IL_0042: stloc.2 - IL_0043: ldarg.1 - IL_0044: castclass Match01/Test1/X11 - IL_0049: stloc.3 - IL_004a: ldloc.2 - IL_004b: ldfld int32 Match01/Test1/X11::item - IL_0050: ldloc.3 - IL_0051: ldfld int32 Match01/Test1/X11::item - IL_0056: ceq - IL_0058: ret - - IL_0059: ldarg.0 - IL_005a: castclass Match01/Test1/X12 - IL_005f: stloc.s V_4 - IL_0061: ldarg.1 - IL_0062: castclass Match01/Test1/X12 - IL_0067: stloc.s V_5 - IL_0069: ldloc.s V_4 - IL_006b: ldfld int32 Match01/Test1/X12::item - IL_0070: ldloc.s V_5 - IL_0072: ldfld int32 Match01/Test1/X12::item - IL_0077: ceq - IL_0079: ret - - IL_007a: ldarg.0 - IL_007b: castclass Match01/Test1/X13 - IL_0080: stloc.s V_6 - IL_0082: ldarg.1 - IL_0083: castclass Match01/Test1/X13 - IL_0088: stloc.s V_7 - IL_008a: ldloc.s V_6 - IL_008c: ldfld int32 Match01/Test1/X13::item - IL_0091: ldloc.s V_7 - IL_0093: ldfld int32 Match01/Test1/X13::item - IL_0098: ceq - IL_009a: ret - - IL_009b: ldarg.0 - IL_009c: castclass Match01/Test1/X14 - IL_00a1: stloc.s V_8 - IL_00a3: ldarg.1 - IL_00a4: castclass Match01/Test1/X14 - IL_00a9: stloc.s V_9 - IL_00ab: ldloc.s V_8 - IL_00ad: ldfld int32 Match01/Test1/X14::item - IL_00b2: ldloc.s V_9 - IL_00b4: ldfld int32 Match01/Test1/X14::item - IL_00b9: ceq - IL_00bb: ret - - IL_00bc: ldc.i4.0 - IL_00bd: ret - - IL_00be: ldc.i4.0 - IL_00bf: ret - - IL_00c0: ldarg.1 - IL_00c1: ldnull - IL_00c2: cgt.un - IL_00c4: ldc.i4.0 - IL_00c5: ceq - IL_00c7: ret - } - - .method public hidebysig virtual final instance bool Equals(object obj) cil managed - { - .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - - .maxstack 4 - .locals init (class Match01/Test1 V_0) - IL_0000: ldarg.1 - IL_0001: isinst Match01/Test1 - IL_0006: stloc.0 - IL_0007: ldloc.0 - IL_0008: brfalse.s IL_0012 - - IL_000a: ldarg.0 - IL_000b: ldloc.0 - IL_000c: callvirt instance bool Match01/Test1::Equals(class Match01/Test1) - IL_0011: ret - - IL_0012: ldc.i4.0 - IL_0013: ret - } - - .property instance int32 Tag() - { - .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) - .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) - .get instance int32 Match01/Test1::get_Tag() - } - .property instance bool IsX11() - { - .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) - .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) - .get instance bool Match01/Test1::get_IsX11() - } - .property instance bool IsX12() - { - .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) - .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) - .get instance bool Match01/Test1::get_IsX12() - } - .property instance bool IsX13() - { - .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) - .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) - .get instance bool Match01/Test1::get_IsX13() - } - .property instance bool IsX14() - { - .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) - .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) - .get instance bool Match01/Test1::get_IsX14() - } - } - - .method public static int32 select1(class Match01/Test1 x) cil managed - { - - .maxstack 8 - IL_0000: nop - IL_0001: ldarg.0 - IL_0002: call instance int32 Match01/Test1::get_Tag() - IL_0007: switch ( - IL_001c, - IL_0028, - IL_002a, - IL_002c) - IL_001c: ldarg.0 - IL_001d: castclass Match01/Test1/X11 - IL_0022: ldfld int32 Match01/Test1/X11::item - IL_0027: ret - - IL_0028: ldc.i4.2 - IL_0029: ret - - IL_002a: ldc.i4.3 - IL_002b: ret - - IL_002c: ldc.i4.4 - IL_002d: ret - } - - .method public static int32 fm(class Match01/Test1 y) cil managed - { - - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: call int32 Match01::select1(class Match01/Test1) - IL_0006: ret - } - -} - -.class private abstract auto ansi sealed ''.$Match01 - extends [runtime]System.Object -{ - .method public static void main@() cil managed - { - .entrypoint - - .maxstack 8 - IL_0000: ret - } +.class public abstract auto ansi sealed assembly +extends [runtime]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 abstract auto autochar serializable nested public beforefieldinit Test1 +extends [runtime]System.Object +implements class [runtime]System.IEquatable`1, +[runtime]System.Collections.IStructuralEquatable, +class [runtime]System.IComparable`1, +[runtime]System.IComparable, +[runtime]System.Collections.IStructuralComparable +{ +.custom instance void [runtime]System.Diagnostics.DebuggerDisplayAttribute::.ctor(string) = ( 01 00 15 7B 5F 5F 44 65 62 75 67 44 69 73 70 6C +61 79 28 29 2C 6E 71 7D 00 00 ) +.custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 01 00 00 00 00 00 ) +.class abstract auto ansi sealed nested public Tags +extends [runtime]System.Object +{ +.field public static literal int32 X11 = int32(0x00000000) +.field public static literal int32 X12 = int32(0x00000001) +.field public static literal int32 X13 = int32(0x00000002) +.field public static literal int32 X14 = int32(0x00000003) +} + +.class auto ansi serializable nested public beforefieldinit specialname X11 +extends assembly/Test1 +{ +.custom instance void [runtime]System.Diagnostics.DebuggerTypeProxyAttribute::.ctor(class [runtime]System.Type) = ( 01 00 20 4D 61 74 63 68 30 31 2B 54 65 73 74 31 +2B 58 31 31 40 44 65 62 75 67 54 79 70 65 50 72 +6F 78 79 00 00 ) +.custom instance void [runtime]System.Diagnostics.DebuggerDisplayAttribute::.ctor(string) = ( 01 00 15 7B 5F 5F 44 65 62 75 67 44 69 73 70 6C +61 79 28 29 2C 6E 71 7D 00 00 ) +.field assembly initonly int32 item +.custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) +.custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) +.custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) +.method assembly specialname rtspecialname instance void .ctor(int32 item) cil managed +{ +.custom instance void System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::.ctor(valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes, +class [runtime]System.Type) = ( 01 00 60 06 00 00 0D 4D 61 74 63 68 30 31 2B 54 +65 73 74 31 00 00 ) +.custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) +.custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) + +.maxstack 8 +IL_0000: ldarg.0 +IL_0001: ldc.i4.0 +IL_0002: call instance void assembly/Test1::.ctor(int32) +IL_0007: ldarg.0 +IL_0008: ldarg.1 +IL_0009: stfld int32 assembly/Test1/X11::item +IL_000e: ret +} + +.method public hidebysig instance int32 get_Item() cil managed +{ +.custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) +.custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) + +.maxstack 8 +IL_0000: ldarg.0 +IL_0001: ldfld int32 assembly/Test1/X11::item +IL_0006: ret +} + +.property instance int32 Item() +{ +.custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags, +int32, +int32) = ( 01 00 04 00 00 00 00 00 00 00 00 00 00 00 00 00 ) +.custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) +.custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) +.get instance int32 assembly/Test1/X11::get_Item() +} +} + +.class auto ansi serializable nested public beforefieldinit specialname X12 +extends assembly/Test1 +{ +.custom instance void [runtime]System.Diagnostics.DebuggerTypeProxyAttribute::.ctor(class [runtime]System.Type) = ( 01 00 20 4D 61 74 63 68 30 31 2B 54 65 73 74 31 +2B 58 31 32 40 44 65 62 75 67 54 79 70 65 50 72 +6F 78 79 00 00 ) +.custom instance void [runtime]System.Diagnostics.DebuggerDisplayAttribute::.ctor(string) = ( 01 00 15 7B 5F 5F 44 65 62 75 67 44 69 73 70 6C +61 79 28 29 2C 6E 71 7D 00 00 ) +.field assembly initonly int32 item +.custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) +.custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) +.custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) +.method assembly specialname rtspecialname instance void .ctor(int32 item) cil managed +{ +.custom instance void System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::.ctor(valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes, +class [runtime]System.Type) = ( 01 00 60 06 00 00 0D 4D 61 74 63 68 30 31 2B 54 +65 73 74 31 00 00 ) +.custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) +.custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) + +.maxstack 8 +IL_0000: ldarg.0 +IL_0001: ldc.i4.1 +IL_0002: call instance void assembly/Test1::.ctor(int32) +IL_0007: ldarg.0 +IL_0008: ldarg.1 +IL_0009: stfld int32 assembly/Test1/X12::item +IL_000e: ret +} + +.method public hidebysig instance int32 get_Item() cil managed +{ +.custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) +.custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) + +.maxstack 8 +IL_0000: ldarg.0 +IL_0001: ldfld int32 assembly/Test1/X12::item +IL_0006: ret +} + +.property instance int32 Item() +{ +.custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags, +int32, +int32) = ( 01 00 04 00 00 00 01 00 00 00 00 00 00 00 00 00 ) +.custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) +.custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) +.get instance int32 assembly/Test1/X12::get_Item() +} +} + +.class auto ansi serializable nested public beforefieldinit specialname X13 +extends assembly/Test1 +{ +.custom instance void [runtime]System.Diagnostics.DebuggerTypeProxyAttribute::.ctor(class [runtime]System.Type) = ( 01 00 20 4D 61 74 63 68 30 31 2B 54 65 73 74 31 +2B 58 31 33 40 44 65 62 75 67 54 79 70 65 50 72 +6F 78 79 00 00 ) +.custom instance void [runtime]System.Diagnostics.DebuggerDisplayAttribute::.ctor(string) = ( 01 00 15 7B 5F 5F 44 65 62 75 67 44 69 73 70 6C +61 79 28 29 2C 6E 71 7D 00 00 ) +.field assembly initonly int32 item +.custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) +.custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) +.custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) +.method assembly specialname rtspecialname instance void .ctor(int32 item) cil managed +{ +.custom instance void System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::.ctor(valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes, +class [runtime]System.Type) = ( 01 00 60 06 00 00 0D 4D 61 74 63 68 30 31 2B 54 +65 73 74 31 00 00 ) +.custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) +.custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) + +.maxstack 8 +IL_0000: ldarg.0 +IL_0001: ldc.i4.2 +IL_0002: call instance void assembly/Test1::.ctor(int32) +IL_0007: ldarg.0 +IL_0008: ldarg.1 +IL_0009: stfld int32 assembly/Test1/X13::item +IL_000e: ret +} + +.method public hidebysig instance int32 get_Item() cil managed +{ +.custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) +.custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) + +.maxstack 8 +IL_0000: ldarg.0 +IL_0001: ldfld int32 assembly/Test1/X13::item +IL_0006: ret +} + +.property instance int32 Item() +{ +.custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags, +int32, +int32) = ( 01 00 04 00 00 00 02 00 00 00 00 00 00 00 00 00 ) +.custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) +.custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) +.get instance int32 assembly/Test1/X13::get_Item() +} +} + +.class auto ansi serializable nested public beforefieldinit specialname X14 +extends assembly/Test1 +{ +.custom instance void [runtime]System.Diagnostics.DebuggerTypeProxyAttribute::.ctor(class [runtime]System.Type) = ( 01 00 20 4D 61 74 63 68 30 31 2B 54 65 73 74 31 +2B 58 31 34 40 44 65 62 75 67 54 79 70 65 50 72 +6F 78 79 00 00 ) +.custom instance void [runtime]System.Diagnostics.DebuggerDisplayAttribute::.ctor(string) = ( 01 00 15 7B 5F 5F 44 65 62 75 67 44 69 73 70 6C +61 79 28 29 2C 6E 71 7D 00 00 ) +.field assembly initonly int32 item +.custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) +.custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) +.custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) +.method assembly specialname rtspecialname instance void .ctor(int32 item) cil managed +{ +.custom instance void System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::.ctor(valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes, +class [runtime]System.Type) = ( 01 00 60 06 00 00 0D 4D 61 74 63 68 30 31 2B 54 +65 73 74 31 00 00 ) +.custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) +.custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) + +.maxstack 8 +IL_0000: ldarg.0 +IL_0001: ldc.i4.3 +IL_0002: call instance void assembly/Test1::.ctor(int32) +IL_0007: ldarg.0 +IL_0008: ldarg.1 +IL_0009: stfld int32 assembly/Test1/X14::item +IL_000e: ret +} + +.method public hidebysig instance int32 get_Item() cil managed +{ +.custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) +.custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) + +.maxstack 8 +IL_0000: ldarg.0 +IL_0001: ldfld int32 assembly/Test1/X14::item +IL_0006: ret +} + +.property instance int32 Item() +{ +.custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags, +int32, +int32) = ( 01 00 04 00 00 00 03 00 00 00 00 00 00 00 00 00 ) +.custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) +.custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) +.get instance int32 assembly/Test1/X14::get_Item() +} +} + +.class auto ansi nested assembly beforefieldinit specialname X11@DebugTypeProxy +extends [runtime]System.Object +{ +.field assembly class assembly/Test1/X11 _obj +.custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) +.custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) +.custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) +.method public specialname rtspecialname instance void .ctor(class assembly/Test1/X11 obj) cil managed +{ +.custom instance void System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::.ctor(valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes, +class [runtime]System.Type) = ( 01 00 60 06 00 00 0D 4D 61 74 63 68 30 31 2B 54 +65 73 74 31 00 00 ) +.custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) +.custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) + +.maxstack 8 +IL_0000: ldarg.0 +IL_0001: call instance void [runtime]System.Object::.ctor() +IL_0006: ldarg.0 +IL_0007: ldarg.1 +IL_0008: stfld class assembly/Test1/X11 assembly/Test1/X11@DebugTypeProxy::_obj +IL_000d: ret +} + +.method public hidebysig instance int32 get_Item() cil managed +{ +.custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) +.custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) + +.maxstack 8 +IL_0000: ldarg.0 +IL_0001: ldfld class assembly/Test1/X11 assembly/Test1/X11@DebugTypeProxy::_obj +IL_0006: ldfld int32 assembly/Test1/X11::item +IL_000b: ret +} + +.property instance int32 Item() +{ +.custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags, +int32, +int32) = ( 01 00 04 00 00 00 00 00 00 00 00 00 00 00 00 00 ) +.custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) +.custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) +.get instance int32 assembly/Test1/X11@DebugTypeProxy::get_Item() +} +} + +.class auto ansi nested assembly beforefieldinit specialname X12@DebugTypeProxy +extends [runtime]System.Object +{ +.field assembly class assembly/Test1/X12 _obj +.custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) +.custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) +.custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) +.method public specialname rtspecialname instance void .ctor(class assembly/Test1/X12 obj) cil managed +{ +.custom instance void System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::.ctor(valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes, +class [runtime]System.Type) = ( 01 00 60 06 00 00 0D 4D 61 74 63 68 30 31 2B 54 +65 73 74 31 00 00 ) +.custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) +.custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) + +.maxstack 8 +IL_0000: ldarg.0 +IL_0001: call instance void [runtime]System.Object::.ctor() +IL_0006: ldarg.0 +IL_0007: ldarg.1 +IL_0008: stfld class assembly/Test1/X12 assembly/Test1/X12@DebugTypeProxy::_obj +IL_000d: ret +} + +.method public hidebysig instance int32 get_Item() cil managed +{ +.custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) +.custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) + +.maxstack 8 +IL_0000: ldarg.0 +IL_0001: ldfld class assembly/Test1/X12 assembly/Test1/X12@DebugTypeProxy::_obj +IL_0006: ldfld int32 assembly/Test1/X12::item +IL_000b: ret +} + +.property instance int32 Item() +{ +.custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags, +int32, +int32) = ( 01 00 04 00 00 00 01 00 00 00 00 00 00 00 00 00 ) +.custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) +.custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) +.get instance int32 assembly/Test1/X12@DebugTypeProxy::get_Item() +} +} + +.class auto ansi nested assembly beforefieldinit specialname X13@DebugTypeProxy +extends [runtime]System.Object +{ +.field assembly class assembly/Test1/X13 _obj +.custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) +.custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) +.custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) +.method public specialname rtspecialname instance void .ctor(class assembly/Test1/X13 obj) cil managed +{ +.custom instance void System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::.ctor(valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes, +class [runtime]System.Type) = ( 01 00 60 06 00 00 0D 4D 61 74 63 68 30 31 2B 54 +65 73 74 31 00 00 ) +.custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) +.custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) + +.maxstack 8 +IL_0000: ldarg.0 +IL_0001: call instance void [runtime]System.Object::.ctor() +IL_0006: ldarg.0 +IL_0007: ldarg.1 +IL_0008: stfld class assembly/Test1/X13 assembly/Test1/X13@DebugTypeProxy::_obj +IL_000d: ret +} + +.method public hidebysig instance int32 get_Item() cil managed +{ +.custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) +.custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) + +.maxstack 8 +IL_0000: ldarg.0 +IL_0001: ldfld class assembly/Test1/X13 assembly/Test1/X13@DebugTypeProxy::_obj +IL_0006: ldfld int32 assembly/Test1/X13::item +IL_000b: ret +} + +.property instance int32 Item() +{ +.custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags, +int32, +int32) = ( 01 00 04 00 00 00 02 00 00 00 00 00 00 00 00 00 ) +.custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) +.custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) +.get instance int32 assembly/Test1/X13@DebugTypeProxy::get_Item() +} +} + +.class auto ansi nested assembly beforefieldinit specialname X14@DebugTypeProxy +extends [runtime]System.Object +{ +.field assembly class assembly/Test1/X14 _obj +.custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) +.custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) +.custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) +.method public specialname rtspecialname instance void .ctor(class assembly/Test1/X14 obj) cil managed +{ +.custom instance void System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::.ctor(valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes, +class [runtime]System.Type) = ( 01 00 60 06 00 00 0D 4D 61 74 63 68 30 31 2B 54 +65 73 74 31 00 00 ) +.custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) +.custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) + +.maxstack 8 +IL_0000: ldarg.0 +IL_0001: call instance void [runtime]System.Object::.ctor() +IL_0006: ldarg.0 +IL_0007: ldarg.1 +IL_0008: stfld class assembly/Test1/X14 assembly/Test1/X14@DebugTypeProxy::_obj +IL_000d: ret +} + +.method public hidebysig instance int32 get_Item() cil managed +{ +.custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) +.custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) + +.maxstack 8 +IL_0000: ldarg.0 +IL_0001: ldfld class assembly/Test1/X14 assembly/Test1/X14@DebugTypeProxy::_obj +IL_0006: ldfld int32 assembly/Test1/X14::item +IL_000b: ret +} + +.property instance int32 Item() +{ +.custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags, +int32, +int32) = ( 01 00 04 00 00 00 03 00 00 00 00 00 00 00 00 00 ) +.custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) +.custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) +.get instance int32 assembly/Test1/X14@DebugTypeProxy::get_Item() +} +} + +.field assembly initonly int32 _tag +.custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) +.custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) +.custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) +.method assembly specialname rtspecialname instance void .ctor(int32 _tag) cil managed +{ +.custom instance void System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::.ctor(valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes, +class [runtime]System.Type) = ( 01 00 E0 07 00 00 0D 4D 61 74 63 68 30 31 2B 54 +65 73 74 31 00 00 ) +.custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) +.custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) + +.maxstack 8 +IL_0000: ldarg.0 +IL_0001: call instance void [runtime]System.Object::.ctor() +IL_0006: ldarg.0 +IL_0007: ldarg.1 +IL_0008: stfld int32 assembly/Test1::_tag +IL_000d: ret +} + +.method public static class assembly/Test1 NewX11(int32 item) cil managed +{ +.custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags, +int32) = ( 01 00 08 00 00 00 00 00 00 00 00 00 ) +.custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) +.custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) + +.maxstack 8 +IL_0000: ldarg.0 +IL_0001: newobj instance void assembly/Test1/X11::.ctor(int32) +IL_0006: ret +} + +.method public hidebysig instance bool get_IsX11() cil managed +{ +.custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) +.custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) + +.maxstack 8 +IL_0000: ldarg.0 +IL_0001: call instance int32 assembly/Test1::get_Tag() +IL_0006: ldc.i4.0 +IL_0007: ceq +IL_0009: ret +} + +.method public static class assembly/Test1 NewX12(int32 item) cil managed +{ +.custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags, +int32) = ( 01 00 08 00 00 00 01 00 00 00 00 00 ) +.custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) +.custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) + +.maxstack 8 +IL_0000: ldarg.0 +IL_0001: newobj instance void assembly/Test1/X12::.ctor(int32) +IL_0006: ret +} + +.method public hidebysig instance bool get_IsX12() cil managed +{ +.custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) +.custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) + +.maxstack 8 +IL_0000: ldarg.0 +IL_0001: call instance int32 assembly/Test1::get_Tag() +IL_0006: ldc.i4.1 +IL_0007: ceq +IL_0009: ret +} + +.method public static class assembly/Test1 NewX13(int32 item) cil managed +{ +.custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags, +int32) = ( 01 00 08 00 00 00 02 00 00 00 00 00 ) +.custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) +.custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) + +.maxstack 8 +IL_0000: ldarg.0 +IL_0001: newobj instance void assembly/Test1/X13::.ctor(int32) +IL_0006: ret +} + +.method public hidebysig instance bool get_IsX13() cil managed +{ +.custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) +.custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) + +.maxstack 8 +IL_0000: ldarg.0 +IL_0001: call instance int32 assembly/Test1::get_Tag() +IL_0006: ldc.i4.2 +IL_0007: ceq +IL_0009: ret +} + +.method public static class assembly/Test1 NewX14(int32 item) cil managed +{ +.custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags, +int32) = ( 01 00 08 00 00 00 03 00 00 00 00 00 ) +.custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) +.custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) + +.maxstack 8 +IL_0000: ldarg.0 +IL_0001: newobj instance void assembly/Test1/X14::.ctor(int32) +IL_0006: ret +} + +.method public hidebysig instance bool get_IsX14() cil managed +{ +.custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) +.custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) + +.maxstack 8 +IL_0000: ldarg.0 +IL_0001: call instance int32 assembly/Test1::get_Tag() +IL_0006: ldc.i4.3 +IL_0007: ceq +IL_0009: ret +} + +.method public hidebysig instance int32 get_Tag() cil managed +{ +.custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) +.custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) + +.maxstack 8 +IL_0000: ldarg.0 +IL_0001: ldfld int32 assembly/Test1::_tag +IL_0006: ret +} + +.method assembly hidebysig specialname instance object __DebugDisplay() cil managed +{ +.custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) +.custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) + +.maxstack 8 +IL_0000: ldstr "%+0.8A" +IL_0005: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5,class [FSharp.Core]Microsoft.FSharp.Core.Unit,string,string,string>::.ctor(string) +IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) +IL_000f: ldarg.0 +IL_0010: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) +IL_0015: ret +} + +.method public strict virtual instance string ToString() cil managed +{ +.custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + +.maxstack 8 +IL_0000: ldstr "%+A" +IL_0005: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5,class [FSharp.Core]Microsoft.FSharp.Core.Unit,string,string,class assembly/Test1>::.ctor(string) +IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) +IL_000f: ldarg.0 +IL_0010: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) +IL_0015: ret +} + +.method public hidebysig virtual final instance int32 CompareTo(class assembly/Test1 obj) cil managed +{ +.custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + +.maxstack 8 +IL_0000: ldarg.0 +IL_0001: brfalse.s IL_0011 + +IL_0003: ldarg.1 +IL_0004: brfalse.s IL_000f + +IL_0006: ldarg.0 +IL_0007: ldarg.1 +IL_0008: ldnull +IL_0009: call int32 assembly::CompareTo$cont@4(class assembly/Test1, +class assembly/Test1, +class [FSharp.Core]Microsoft.FSharp.Core.Unit) +IL_000e: ret + +IL_000f: ldc.i4.1 +IL_0010: ret + +IL_0011: ldarg.1 +IL_0012: brfalse.s IL_0016 + +IL_0014: ldc.i4.m1 +IL_0015: ret + +IL_0016: ldc.i4.0 +IL_0017: ret +} + +.method public hidebysig virtual final instance int32 CompareTo(object obj) cil managed +{ +.custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + +.maxstack 8 +IL_0000: ldarg.0 +IL_0001: ldarg.1 +IL_0002: unbox.any assembly/Test1 +IL_0007: callvirt instance int32 assembly/Test1::CompareTo(class assembly/Test1) +IL_000c: ret +} + +.method public hidebysig virtual final instance int32 CompareTo(object obj, class [runtime]System.Collections.IComparer comp) cil managed +{ +.custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + +.maxstack 6 +.locals init (class assembly/Test1 V_0) +IL_0000: ldarg.1 +IL_0001: unbox.any assembly/Test1 +IL_0006: stloc.0 +IL_0007: ldarg.0 +IL_0008: brfalse.s IL_0014 + +IL_000a: ldarg.0 +IL_000b: ldarg.1 +IL_000c: ldloc.0 +IL_000d: ldnull +IL_000e: call int32 assembly::'CompareTo$cont@4-1'(class assembly/Test1, +object, +class assembly/Test1, +class [FSharp.Core]Microsoft.FSharp.Core.Unit) +IL_0013: ret + +IL_0014: ldarg.1 +IL_0015: unbox.any assembly/Test1 +IL_001a: brfalse.s IL_001e + +IL_001c: ldc.i4.m1 +IL_001d: ret + +IL_001e: ldc.i4.0 +IL_001f: ret +} + +.method public hidebysig virtual final instance int32 GetHashCode(class [runtime]System.Collections.IEqualityComparer comp) cil managed +{ +.custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + +.maxstack 7 +.locals init (int32 V_0, +class assembly/Test1/X11 V_1, +class assembly/Test1/X12 V_2, +class assembly/Test1/X13 V_3, +class assembly/Test1/X14 V_4) +IL_0000: ldarg.0 +IL_0001: brfalse IL_00a5 + +IL_0006: ldc.i4.0 +IL_0007: stloc.0 +IL_0008: ldarg.0 +IL_0009: call instance int32 assembly/Test1::get_Tag() +IL_000e: switch ( +IL_0023, +IL_0043, +IL_0063, +IL_0083) +IL_0023: ldarg.0 +IL_0024: castclass assembly/Test1/X11 +IL_0029: stloc.1 +IL_002a: ldc.i4.0 +IL_002b: stloc.0 +IL_002c: ldc.i4 0x9e3779b9 +IL_0031: ldloc.1 +IL_0032: ldfld int32 assembly/Test1/X11::item +IL_0037: ldloc.0 +IL_0038: ldc.i4.6 +IL_0039: shl +IL_003a: ldloc.0 +IL_003b: ldc.i4.2 +IL_003c: shr +IL_003d: add +IL_003e: add +IL_003f: add +IL_0040: stloc.0 +IL_0041: ldloc.0 +IL_0042: ret + +IL_0043: ldarg.0 +IL_0044: castclass assembly/Test1/X12 +IL_0049: stloc.2 +IL_004a: ldc.i4.1 +IL_004b: stloc.0 +IL_004c: ldc.i4 0x9e3779b9 +IL_0051: ldloc.2 +IL_0052: ldfld int32 assembly/Test1/X12::item +IL_0057: ldloc.0 +IL_0058: ldc.i4.6 +IL_0059: shl +IL_005a: ldloc.0 +IL_005b: ldc.i4.2 +IL_005c: shr +IL_005d: add +IL_005e: add +IL_005f: add +IL_0060: stloc.0 +IL_0061: ldloc.0 +IL_0062: ret + +IL_0063: ldarg.0 +IL_0064: castclass assembly/Test1/X13 +IL_0069: stloc.3 +IL_006a: ldc.i4.2 +IL_006b: stloc.0 +IL_006c: ldc.i4 0x9e3779b9 +IL_0071: ldloc.3 +IL_0072: ldfld int32 assembly/Test1/X13::item +IL_0077: ldloc.0 +IL_0078: ldc.i4.6 +IL_0079: shl +IL_007a: ldloc.0 +IL_007b: ldc.i4.2 +IL_007c: shr +IL_007d: add +IL_007e: add +IL_007f: add +IL_0080: stloc.0 +IL_0081: ldloc.0 +IL_0082: ret + +IL_0083: ldarg.0 +IL_0084: castclass assembly/Test1/X14 +IL_0089: stloc.s V_4 +IL_008b: ldc.i4.3 +IL_008c: stloc.0 +IL_008d: ldc.i4 0x9e3779b9 +IL_0092: ldloc.s V_4 +IL_0094: ldfld int32 assembly/Test1/X14::item +IL_0099: ldloc.0 +IL_009a: ldc.i4.6 +IL_009b: shl +IL_009c: ldloc.0 +IL_009d: ldc.i4.2 +IL_009e: shr +IL_009f: add +IL_00a0: add +IL_00a1: add +IL_00a2: stloc.0 +IL_00a3: ldloc.0 +IL_00a4: ret + +IL_00a5: ldc.i4.0 +IL_00a6: ret +} + +.method public hidebysig virtual final instance int32 GetHashCode() cil managed +{ +.custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + +.maxstack 8 +IL_0000: ldarg.0 +IL_0001: call class [runtime]System.Collections.IEqualityComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericEqualityComparer() +IL_0006: callvirt instance int32 assembly/Test1::GetHashCode(class [runtime]System.Collections.IEqualityComparer) +IL_000b: ret +} + +.method public hidebysig instance bool Equals(class assembly/Test1 obj, class [runtime]System.Collections.IEqualityComparer comp) cil managed +{ +.custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + +.maxstack 4 +.locals init (int32 V_0, +int32 V_1, +class assembly/Test1/X11 V_2, +class assembly/Test1/X11 V_3, +class assembly/Test1/X12 V_4, +class assembly/Test1/X12 V_5, +class assembly/Test1/X13 V_6, +class assembly/Test1/X13 V_7, +class assembly/Test1/X14 V_8, +class assembly/Test1/X14 V_9) +IL_0000: ldarg.0 +IL_0001: brfalse IL_00c0 + +IL_0006: ldarg.1 +IL_0007: brfalse IL_00be + +IL_000c: ldarg.0 +IL_000d: ldfld int32 assembly/Test1::_tag +IL_0012: stloc.0 +IL_0013: ldarg.1 +IL_0014: ldfld int32 assembly/Test1::_tag +IL_0019: stloc.1 +IL_001a: ldloc.0 +IL_001b: ldloc.1 +IL_001c: bne.un IL_00bc + +IL_0021: ldarg.0 +IL_0022: call instance int32 assembly/Test1::get_Tag() +IL_0027: switch ( +IL_003c, +IL_0059, +IL_007a, +IL_009b) +IL_003c: ldarg.0 +IL_003d: castclass assembly/Test1/X11 +IL_0042: stloc.2 +IL_0043: ldarg.1 +IL_0044: castclass assembly/Test1/X11 +IL_0049: stloc.3 +IL_004a: ldloc.2 +IL_004b: ldfld int32 assembly/Test1/X11::item +IL_0050: ldloc.3 +IL_0051: ldfld int32 assembly/Test1/X11::item +IL_0056: ceq +IL_0058: ret + +IL_0059: ldarg.0 +IL_005a: castclass assembly/Test1/X12 +IL_005f: stloc.s V_4 +IL_0061: ldarg.1 +IL_0062: castclass assembly/Test1/X12 +IL_0067: stloc.s V_5 +IL_0069: ldloc.s V_4 +IL_006b: ldfld int32 assembly/Test1/X12::item +IL_0070: ldloc.s V_5 +IL_0072: ldfld int32 assembly/Test1/X12::item +IL_0077: ceq +IL_0079: ret + +IL_007a: ldarg.0 +IL_007b: castclass assembly/Test1/X13 +IL_0080: stloc.s V_6 +IL_0082: ldarg.1 +IL_0083: castclass assembly/Test1/X13 +IL_0088: stloc.s V_7 +IL_008a: ldloc.s V_6 +IL_008c: ldfld int32 assembly/Test1/X13::item +IL_0091: ldloc.s V_7 +IL_0093: ldfld int32 assembly/Test1/X13::item +IL_0098: ceq +IL_009a: ret + +IL_009b: ldarg.0 +IL_009c: castclass assembly/Test1/X14 +IL_00a1: stloc.s V_8 +IL_00a3: ldarg.1 +IL_00a4: castclass assembly/Test1/X14 +IL_00a9: stloc.s V_9 +IL_00ab: ldloc.s V_8 +IL_00ad: ldfld int32 assembly/Test1/X14::item +IL_00b2: ldloc.s V_9 +IL_00b4: ldfld int32 assembly/Test1/X14::item +IL_00b9: ceq +IL_00bb: ret + +IL_00bc: ldc.i4.0 +IL_00bd: ret + +IL_00be: ldc.i4.0 +IL_00bf: ret + +IL_00c0: ldarg.1 +IL_00c1: ldnull +IL_00c2: cgt.un +IL_00c4: ldc.i4.0 +IL_00c5: ceq +IL_00c7: ret +} + +.method public hidebysig virtual final instance bool Equals(object obj, class [runtime]System.Collections.IEqualityComparer comp) cil managed +{ +.custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + +.maxstack 5 +.locals init (class assembly/Test1 V_0) +IL_0000: ldarg.1 +IL_0001: isinst assembly/Test1 +IL_0006: stloc.0 +IL_0007: ldloc.0 +IL_0008: brfalse.s IL_0013 + +IL_000a: ldarg.0 +IL_000b: ldloc.0 +IL_000c: ldarg.2 +IL_000d: callvirt instance bool assembly/Test1::Equals(class assembly/Test1, +class [runtime]System.Collections.IEqualityComparer) +IL_0012: ret + +IL_0013: ldc.i4.0 +IL_0014: ret +} + +.method public hidebysig virtual final instance bool Equals(class assembly/Test1 obj) cil managed +{ +.custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + +.maxstack 4 +.locals init (int32 V_0, +int32 V_1, +class assembly/Test1/X11 V_2, +class assembly/Test1/X11 V_3, +class assembly/Test1/X12 V_4, +class assembly/Test1/X12 V_5, +class assembly/Test1/X13 V_6, +class assembly/Test1/X13 V_7, +class assembly/Test1/X14 V_8, +class assembly/Test1/X14 V_9) +IL_0000: ldarg.0 +IL_0001: brfalse IL_00c0 + +IL_0006: ldarg.1 +IL_0007: brfalse IL_00be + +IL_000c: ldarg.0 +IL_000d: ldfld int32 assembly/Test1::_tag +IL_0012: stloc.0 +IL_0013: ldarg.1 +IL_0014: ldfld int32 assembly/Test1::_tag +IL_0019: stloc.1 +IL_001a: ldloc.0 +IL_001b: ldloc.1 +IL_001c: bne.un IL_00bc + +IL_0021: ldarg.0 +IL_0022: call instance int32 assembly/Test1::get_Tag() +IL_0027: switch ( +IL_003c, +IL_0059, +IL_007a, +IL_009b) +IL_003c: ldarg.0 +IL_003d: castclass assembly/Test1/X11 +IL_0042: stloc.2 +IL_0043: ldarg.1 +IL_0044: castclass assembly/Test1/X11 +IL_0049: stloc.3 +IL_004a: ldloc.2 +IL_004b: ldfld int32 assembly/Test1/X11::item +IL_0050: ldloc.3 +IL_0051: ldfld int32 assembly/Test1/X11::item +IL_0056: ceq +IL_0058: ret + +IL_0059: ldarg.0 +IL_005a: castclass assembly/Test1/X12 +IL_005f: stloc.s V_4 +IL_0061: ldarg.1 +IL_0062: castclass assembly/Test1/X12 +IL_0067: stloc.s V_5 +IL_0069: ldloc.s V_4 +IL_006b: ldfld int32 assembly/Test1/X12::item +IL_0070: ldloc.s V_5 +IL_0072: ldfld int32 assembly/Test1/X12::item +IL_0077: ceq +IL_0079: ret + +IL_007a: ldarg.0 +IL_007b: castclass assembly/Test1/X13 +IL_0080: stloc.s V_6 +IL_0082: ldarg.1 +IL_0083: castclass assembly/Test1/X13 +IL_0088: stloc.s V_7 +IL_008a: ldloc.s V_6 +IL_008c: ldfld int32 assembly/Test1/X13::item +IL_0091: ldloc.s V_7 +IL_0093: ldfld int32 assembly/Test1/X13::item +IL_0098: ceq +IL_009a: ret + +IL_009b: ldarg.0 +IL_009c: castclass assembly/Test1/X14 +IL_00a1: stloc.s V_8 +IL_00a3: ldarg.1 +IL_00a4: castclass assembly/Test1/X14 +IL_00a9: stloc.s V_9 +IL_00ab: ldloc.s V_8 +IL_00ad: ldfld int32 assembly/Test1/X14::item +IL_00b2: ldloc.s V_9 +IL_00b4: ldfld int32 assembly/Test1/X14::item +IL_00b9: ceq +IL_00bb: ret + +IL_00bc: ldc.i4.0 +IL_00bd: ret + +IL_00be: ldc.i4.0 +IL_00bf: ret + +IL_00c0: ldarg.1 +IL_00c1: ldnull +IL_00c2: cgt.un +IL_00c4: ldc.i4.0 +IL_00c5: ceq +IL_00c7: ret +} + +.method public hidebysig virtual final instance bool Equals(object obj) cil managed +{ +.custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + +.maxstack 4 +.locals init (class assembly/Test1 V_0) +IL_0000: ldarg.1 +IL_0001: isinst assembly/Test1 +IL_0006: stloc.0 +IL_0007: ldloc.0 +IL_0008: brfalse.s IL_0012 + +IL_000a: ldarg.0 +IL_000b: ldloc.0 +IL_000c: callvirt instance bool assembly/Test1::Equals(class assembly/Test1) +IL_0011: ret + +IL_0012: ldc.i4.0 +IL_0013: ret +} + +.property instance int32 Tag() +{ +.custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) +.custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) +.custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) +.get instance int32 assembly/Test1::get_Tag() +} +.property instance bool IsX11() +{ +.custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) +.custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) +.custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) +.get instance bool assembly/Test1::get_IsX11() +} +.property instance bool IsX12() +{ +.custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) +.custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) +.custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) +.get instance bool assembly/Test1::get_IsX12() +} +.property instance bool IsX13() +{ +.custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) +.custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) +.custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) +.get instance bool assembly/Test1::get_IsX13() +} +.property instance bool IsX14() +{ +.custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) +.custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) +.custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) +.get instance bool assembly/Test1::get_IsX14() +} +} + +.method public static int32 select1(class assembly/Test1 x) cil managed +{ + +.maxstack 8 +IL_0000: nop +IL_0001: ldarg.0 +IL_0002: call instance int32 assembly/Test1::get_Tag() +IL_0007: switch ( +IL_001c, +IL_0028, +IL_002a, +IL_002c) +IL_001c: ldarg.0 +IL_001d: castclass assembly/Test1/X11 +IL_0022: ldfld int32 assembly/Test1/X11::item +IL_0027: ret + +IL_0028: ldc.i4.2 +IL_0029: ret + +IL_002a: ldc.i4.3 +IL_002b: ret + +IL_002c: ldc.i4.4 +IL_002d: ret +} + +.method public static int32 fm(class assembly/Test1 y) cil managed +{ + +.maxstack 8 +IL_0000: ldarg.0 +IL_0001: call int32 assembly::select1(class assembly/Test1) +IL_0006: ret +} + +.method assembly static int32 CompareTo$cont@4(class assembly/Test1 this, +class assembly/Test1 obj, +class [FSharp.Core]Microsoft.FSharp.Core.Unit unitVar) cil managed +{ +.custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + +.maxstack 5 +.locals init (int32 V_0, +int32 V_1, +class assembly/Test1/X11 V_2, +class assembly/Test1/X11 V_3, +class [runtime]System.Collections.IComparer V_4, +int32 V_5, +int32 V_6, +class assembly/Test1/X12 V_7, +class assembly/Test1/X12 V_8, +class assembly/Test1/X13 V_9, +class assembly/Test1/X13 V_10, +class assembly/Test1/X14 V_11, +class assembly/Test1/X14 V_12) +IL_0000: ldarg.0 +IL_0001: ldfld int32 assembly/Test1::_tag +IL_0006: stloc.0 +IL_0007: ldarg.1 +IL_0008: ldfld int32 assembly/Test1::_tag +IL_000d: stloc.1 +IL_000e: ldloc.0 +IL_000f: ldloc.1 +IL_0010: bne.un IL_0108 + +IL_0015: ldarg.0 +IL_0016: call instance int32 assembly/Test1::get_Tag() +IL_001b: switch ( +IL_0030, +IL_0063, +IL_009a, +IL_00d1) +IL_0030: ldarg.0 +IL_0031: castclass assembly/Test1/X11 +IL_0036: stloc.2 +IL_0037: ldarg.1 +IL_0038: castclass assembly/Test1/X11 +IL_003d: stloc.3 +IL_003e: call class [runtime]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() +IL_0043: stloc.s V_4 +IL_0045: ldloc.2 +IL_0046: ldfld int32 assembly/Test1/X11::item +IL_004b: stloc.s V_5 +IL_004d: ldloc.3 +IL_004e: ldfld int32 assembly/Test1/X11::item +IL_0053: stloc.s V_6 +IL_0055: ldloc.s V_5 +IL_0057: ldloc.s V_6 +IL_0059: cgt +IL_005b: ldloc.s V_5 +IL_005d: ldloc.s V_6 +IL_005f: clt +IL_0061: sub +IL_0062: ret + +IL_0063: ldarg.0 +IL_0064: castclass assembly/Test1/X12 +IL_0069: stloc.s V_7 +IL_006b: ldarg.1 +IL_006c: castclass assembly/Test1/X12 +IL_0071: stloc.s V_8 +IL_0073: call class [runtime]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() +IL_0078: stloc.s V_4 +IL_007a: ldloc.s V_7 +IL_007c: ldfld int32 assembly/Test1/X12::item +IL_0081: stloc.s V_5 +IL_0083: ldloc.s V_8 +IL_0085: ldfld int32 assembly/Test1/X12::item +IL_008a: stloc.s V_6 +IL_008c: ldloc.s V_5 +IL_008e: ldloc.s V_6 +IL_0090: cgt +IL_0092: ldloc.s V_5 +IL_0094: ldloc.s V_6 +IL_0096: clt +IL_0098: sub +IL_0099: ret + +IL_009a: ldarg.0 +IL_009b: castclass assembly/Test1/X13 +IL_00a0: stloc.s V_9 +IL_00a2: ldarg.1 +IL_00a3: castclass assembly/Test1/X13 +IL_00a8: stloc.s V_10 +IL_00aa: call class [runtime]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() +IL_00af: stloc.s V_4 +IL_00b1: ldloc.s V_9 +IL_00b3: ldfld int32 assembly/Test1/X13::item +IL_00b8: stloc.s V_5 +IL_00ba: ldloc.s V_10 +IL_00bc: ldfld int32 assembly/Test1/X13::item +IL_00c1: stloc.s V_6 +IL_00c3: ldloc.s V_5 +IL_00c5: ldloc.s V_6 +IL_00c7: cgt +IL_00c9: ldloc.s V_5 +IL_00cb: ldloc.s V_6 +IL_00cd: clt +IL_00cf: sub +IL_00d0: ret + +IL_00d1: ldarg.0 +IL_00d2: castclass assembly/Test1/X14 +IL_00d7: stloc.s V_11 +IL_00d9: ldarg.1 +IL_00da: castclass assembly/Test1/X14 +IL_00df: stloc.s V_12 +IL_00e1: call class [runtime]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() +IL_00e6: stloc.s V_4 +IL_00e8: ldloc.s V_11 +IL_00ea: ldfld int32 assembly/Test1/X14::item +IL_00ef: stloc.s V_5 +IL_00f1: ldloc.s V_12 +IL_00f3: ldfld int32 assembly/Test1/X14::item +IL_00f8: stloc.s V_6 +IL_00fa: ldloc.s V_5 +IL_00fc: ldloc.s V_6 +IL_00fe: cgt +IL_0100: ldloc.s V_5 +IL_0102: ldloc.s V_6 +IL_0104: clt +IL_0106: sub +IL_0107: ret + +IL_0108: ldloc.0 +IL_0109: ldloc.1 +IL_010a: sub +IL_010b: ret +} + +.method assembly static int32 'CompareTo$cont@4-1'(class assembly/Test1 this, +object obj, +class assembly/Test1 objTemp, +class [FSharp.Core]Microsoft.FSharp.Core.Unit unitVar) cil managed +{ +.custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + +.maxstack 5 +.locals init (int32 V_0, +int32 V_1, +class assembly/Test1/X11 V_2, +class assembly/Test1/X11 V_3, +int32 V_4, +int32 V_5, +class assembly/Test1/X12 V_6, +class assembly/Test1/X12 V_7, +class assembly/Test1/X13 V_8, +class assembly/Test1/X13 V_9, +class assembly/Test1/X14 V_10, +class assembly/Test1/X14 V_11) +IL_0000: ldarg.1 +IL_0001: unbox.any assembly/Test1 +IL_0006: brfalse IL_00fb + +IL_000b: ldarg.0 +IL_000c: ldfld int32 assembly/Test1::_tag +IL_0011: stloc.0 +IL_0012: ldarg.2 +IL_0013: ldfld int32 assembly/Test1::_tag +IL_0018: stloc.1 +IL_0019: ldloc.0 +IL_001a: ldloc.1 +IL_001b: bne.un IL_00f7 + +IL_0020: ldarg.0 +IL_0021: call instance int32 assembly/Test1::get_Tag() +IL_0026: switch ( +IL_003b, +IL_0067, +IL_0097, +IL_00c7) +IL_003b: ldarg.0 +IL_003c: castclass assembly/Test1/X11 +IL_0041: stloc.2 +IL_0042: ldarg.2 +IL_0043: castclass assembly/Test1/X11 +IL_0048: stloc.3 +IL_0049: ldloc.2 +IL_004a: ldfld int32 assembly/Test1/X11::item +IL_004f: stloc.s V_4 +IL_0051: ldloc.3 +IL_0052: ldfld int32 assembly/Test1/X11::item +IL_0057: stloc.s V_5 +IL_0059: ldloc.s V_4 +IL_005b: ldloc.s V_5 +IL_005d: cgt +IL_005f: ldloc.s V_4 +IL_0061: ldloc.s V_5 +IL_0063: clt +IL_0065: sub +IL_0066: ret + +IL_0067: ldarg.0 +IL_0068: castclass assembly/Test1/X12 +IL_006d: stloc.s V_6 +IL_006f: ldarg.2 +IL_0070: castclass assembly/Test1/X12 +IL_0075: stloc.s V_7 +IL_0077: ldloc.s V_6 +IL_0079: ldfld int32 assembly/Test1/X12::item +IL_007e: stloc.s V_4 +IL_0080: ldloc.s V_7 +IL_0082: ldfld int32 assembly/Test1/X12::item +IL_0087: stloc.s V_5 +IL_0089: ldloc.s V_4 +IL_008b: ldloc.s V_5 +IL_008d: cgt +IL_008f: ldloc.s V_4 +IL_0091: ldloc.s V_5 +IL_0093: clt +IL_0095: sub +IL_0096: ret + +IL_0097: ldarg.0 +IL_0098: castclass assembly/Test1/X13 +IL_009d: stloc.s V_8 +IL_009f: ldarg.2 +IL_00a0: castclass assembly/Test1/X13 +IL_00a5: stloc.s V_9 +IL_00a7: ldloc.s V_8 +IL_00a9: ldfld int32 assembly/Test1/X13::item +IL_00ae: stloc.s V_4 +IL_00b0: ldloc.s V_9 +IL_00b2: ldfld int32 assembly/Test1/X13::item +IL_00b7: stloc.s V_5 +IL_00b9: ldloc.s V_4 +IL_00bb: ldloc.s V_5 +IL_00bd: cgt +IL_00bf: ldloc.s V_4 +IL_00c1: ldloc.s V_5 +IL_00c3: clt +IL_00c5: sub +IL_00c6: ret + +IL_00c7: ldarg.0 +IL_00c8: castclass assembly/Test1/X14 +IL_00cd: stloc.s V_10 +IL_00cf: ldarg.2 +IL_00d0: castclass assembly/Test1/X14 +IL_00d5: stloc.s V_11 +IL_00d7: ldloc.s V_10 +IL_00d9: ldfld int32 assembly/Test1/X14::item +IL_00de: stloc.s V_4 +IL_00e0: ldloc.s V_11 +IL_00e2: ldfld int32 assembly/Test1/X14::item +IL_00e7: stloc.s V_5 +IL_00e9: ldloc.s V_4 +IL_00eb: ldloc.s V_5 +IL_00ed: cgt +IL_00ef: ldloc.s V_4 +IL_00f1: ldloc.s V_5 +IL_00f3: clt +IL_00f5: sub +IL_00f6: ret + +IL_00f7: ldloc.0 +IL_00f8: ldloc.1 +IL_00f9: sub +IL_00fa: ret + +IL_00fb: ldc.i4.1 +IL_00fc: ret +} + +} + +.class private abstract auto ansi sealed ''.$assembly +extends [runtime]System.Object +{ +.method public static void main@() cil managed +{ +.entrypoint + +.maxstack 8 +IL_0000: ret +} } .class private auto ansi serializable sealed System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes - extends [runtime]System.Enum -{ - .custom instance void [runtime]System.FlagsAttribute::.ctor() = ( 01 00 00 00 ) - .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) - .field public specialname rtspecialname int32 value__ - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes All = int32(0xFFFFFFFF) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes None = int32(0x00000000) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicParameterlessConstructor = int32(0x00000001) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicConstructors = int32(0x00000003) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes NonPublicConstructors = int32(0x00000004) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicMethods = int32(0x00000008) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes NonPublicMethods = int32(0x00000010) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicFields = int32(0x00000020) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes NonPublicFields = int32(0x00000040) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicNestedTypes = int32(0x00000080) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes NonPublicNestedTypes = int32(0x00000100) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicProperties = int32(0x00000200) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes NonPublicProperties = int32(0x00000400) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicEvents = int32(0x00000800) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes NonPublicEvents = int32(0x00001000) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes Interfaces = int32(0x00002000) +extends [runtime]System.Enum +{ +.custom instance void [runtime]System.FlagsAttribute::.ctor() = ( 01 00 00 00 ) +.custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) +.custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) +.field public specialname rtspecialname int32 value__ +.field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes All = int32(0xFFFFFFFF) +.field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes None = int32(0x00000000) +.field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicParameterlessConstructor = int32(0x00000001) +.field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicConstructors = int32(0x00000003) +.field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes NonPublicConstructors = int32(0x00000004) +.field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicMethods = int32(0x00000008) +.field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes NonPublicMethods = int32(0x00000010) +.field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicFields = int32(0x00000020) +.field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes NonPublicFields = int32(0x00000040) +.field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicNestedTypes = int32(0x00000080) +.field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes NonPublicNestedTypes = int32(0x00000100) +.field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicProperties = int32(0x00000200) +.field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes NonPublicProperties = int32(0x00000400) +.field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicEvents = int32(0x00000800) +.field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes NonPublicEvents = int32(0x00001000) +.field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes Interfaces = int32(0x00002000) } .class private auto ansi beforefieldinit System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute - extends [runtime]System.Attribute -{ - .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .field private valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes MemberType@ - .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) - .field private class [runtime]System.Type Type@ - .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) - .method public specialname rtspecialname instance void .ctor(valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes MemberType, class [runtime]System.Type Type) cil managed - { - .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) - - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: call instance void [runtime]System.Attribute::.ctor() - IL_0006: ldarg.0 - IL_0007: ldarg.1 - IL_0008: stfld valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::MemberType@ - IL_000d: ldarg.0 - IL_000e: ldarg.2 - IL_000f: stfld class [runtime]System.Type System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::Type@ - IL_0014: ret - } - - .method public hidebysig specialname instance class [runtime]System.Type get_Type() cil managed - { - .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) - - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: ldfld class [runtime]System.Type System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::Type@ - IL_0006: ret - } - - .method public hidebysig specialname instance valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes get_MemberType() cil managed - { - .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) - - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: ldfld valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::MemberType@ - IL_0006: ret - } - - .property instance valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes - MemberType() - { - .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) - .get instance valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::get_MemberType() - } - .property instance class [runtime]System.Type - Type() - { - .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) - .get instance class [runtime]System.Type System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::get_Type() - } +extends [runtime]System.Attribute +{ +.custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) +.field private valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes MemberType@ +.custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) +.custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) +.field private class [runtime]System.Type Type@ +.custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) +.custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) +.method public specialname rtspecialname instance void .ctor(valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes MemberType, class [runtime]System.Type Type) cil managed +{ +.custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) +.custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) + +.maxstack 8 +IL_0000: ldarg.0 +IL_0001: call instance void [runtime]System.Attribute::.ctor() +IL_0006: ldarg.0 +IL_0007: ldarg.1 +IL_0008: stfld valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::MemberType@ +IL_000d: ldarg.0 +IL_000e: ldarg.2 +IL_000f: stfld class [runtime]System.Type System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::Type@ +IL_0014: ret } +.method public hidebysig specialname instance class [runtime]System.Type get_Type() cil managed +{ +.custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) +.custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) +.maxstack 8 +IL_0000: ldarg.0 +IL_0001: ldfld class [runtime]System.Type System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::Type@ +IL_0006: ret +} +.method public hidebysig specialname instance valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes get_MemberType() cil managed +{ +.custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) +.custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) +.maxstack 8 +IL_0000: ldarg.0 +IL_0001: ldfld valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::MemberType@ +IL_0006: ret +} - +.property instance valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes +MemberType() +{ +.custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) +.custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) +.get instance valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::get_MemberType() +} +.property instance class [runtime]System.Type +Type() +{ +.custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) +.custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) +.get instance class [runtime]System.Type System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::get_Type() +} +} \ No newline at end of file diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Inlining/Match01.fs.RealInternalSignatureOn.il.netcore.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Inlining/Match01.fs.RealInternalSignatureOn.il.netcore.bsl index b0035f72dbc..0dddc8c3978 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Inlining/Match01.fs.RealInternalSignatureOn.il.netcore.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Inlining/Match01.fs.RealInternalSignatureOn.il.netcore.bsl @@ -449,361 +449,6 @@ } } - .class auto ansi serializable sealed nested assembly beforefieldinit clo@4 - extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 - { - .field public class assembly/Test1 this - .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) - .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) - .field public class assembly/Test1 obj - .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) - .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) - .method assembly specialname rtspecialname instance void .ctor(class assembly/Test1 this, class assembly/Test1 obj) cil managed - { - .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) - - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::.ctor() - IL_0006: ldarg.0 - IL_0007: ldarg.1 - IL_0008: stfld class assembly/Test1 assembly/Test1/clo@4::this - IL_000d: ldarg.0 - IL_000e: ldarg.2 - IL_000f: stfld class assembly/Test1 assembly/Test1/clo@4::obj - IL_0014: ret - } - - .method public strict virtual instance int32 Invoke(class [FSharp.Core]Microsoft.FSharp.Core.Unit unitVar) cil managed - { - - .maxstack 7 - .locals init (int32 V_0, - int32 V_1, - class assembly/Test1/X11 V_2, - class assembly/Test1/X11 V_3, - class [runtime]System.Collections.IComparer V_4, - int32 V_5, - int32 V_6, - class assembly/Test1/X12 V_7, - class assembly/Test1/X12 V_8, - class assembly/Test1/X13 V_9, - class assembly/Test1/X13 V_10, - class assembly/Test1/X14 V_11, - class assembly/Test1/X14 V_12) - IL_0000: ldarg.0 - IL_0001: ldfld class assembly/Test1 assembly/Test1/clo@4::this - IL_0006: ldfld int32 assembly/Test1::_tag - IL_000b: stloc.0 - IL_000c: ldarg.0 - IL_000d: ldfld class assembly/Test1 assembly/Test1/clo@4::obj - IL_0012: ldfld int32 assembly/Test1::_tag - IL_0017: stloc.1 - IL_0018: ldloc.0 - IL_0019: ldloc.1 - IL_001a: bne.un IL_013f - - IL_001f: ldarg.0 - IL_0020: ldfld class assembly/Test1 assembly/Test1/clo@4::this - IL_0025: call instance int32 assembly/Test1::get_Tag() - IL_002a: switch ( - IL_003f, - IL_007c, - IL_00bd, - IL_00fe) - IL_003f: ldarg.0 - IL_0040: ldfld class assembly/Test1 assembly/Test1/clo@4::this - IL_0045: castclass assembly/Test1/X11 - IL_004a: stloc.2 - IL_004b: ldarg.0 - IL_004c: ldfld class assembly/Test1 assembly/Test1/clo@4::obj - IL_0051: castclass assembly/Test1/X11 - IL_0056: stloc.3 - IL_0057: call class [runtime]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() - IL_005c: stloc.s V_4 - IL_005e: ldloc.2 - IL_005f: ldfld int32 assembly/Test1/X11::item - IL_0064: stloc.s V_5 - IL_0066: ldloc.3 - IL_0067: ldfld int32 assembly/Test1/X11::item - IL_006c: stloc.s V_6 - IL_006e: ldloc.s V_5 - IL_0070: ldloc.s V_6 - IL_0072: cgt - IL_0074: ldloc.s V_5 - IL_0076: ldloc.s V_6 - IL_0078: clt - IL_007a: sub - IL_007b: ret - - IL_007c: ldarg.0 - IL_007d: ldfld class assembly/Test1 assembly/Test1/clo@4::this - IL_0082: castclass assembly/Test1/X12 - IL_0087: stloc.s V_7 - IL_0089: ldarg.0 - IL_008a: ldfld class assembly/Test1 assembly/Test1/clo@4::obj - IL_008f: castclass assembly/Test1/X12 - IL_0094: stloc.s V_8 - IL_0096: call class [runtime]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() - IL_009b: stloc.s V_4 - IL_009d: ldloc.s V_7 - IL_009f: ldfld int32 assembly/Test1/X12::item - IL_00a4: stloc.s V_5 - IL_00a6: ldloc.s V_8 - IL_00a8: ldfld int32 assembly/Test1/X12::item - IL_00ad: stloc.s V_6 - IL_00af: ldloc.s V_5 - IL_00b1: ldloc.s V_6 - IL_00b3: cgt - IL_00b5: ldloc.s V_5 - IL_00b7: ldloc.s V_6 - IL_00b9: clt - IL_00bb: sub - IL_00bc: ret - - IL_00bd: ldarg.0 - IL_00be: ldfld class assembly/Test1 assembly/Test1/clo@4::this - IL_00c3: castclass assembly/Test1/X13 - IL_00c8: stloc.s V_9 - IL_00ca: ldarg.0 - IL_00cb: ldfld class assembly/Test1 assembly/Test1/clo@4::obj - IL_00d0: castclass assembly/Test1/X13 - IL_00d5: stloc.s V_10 - IL_00d7: call class [runtime]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() - IL_00dc: stloc.s V_4 - IL_00de: ldloc.s V_9 - IL_00e0: ldfld int32 assembly/Test1/X13::item - IL_00e5: stloc.s V_5 - IL_00e7: ldloc.s V_10 - IL_00e9: ldfld int32 assembly/Test1/X13::item - IL_00ee: stloc.s V_6 - IL_00f0: ldloc.s V_5 - IL_00f2: ldloc.s V_6 - IL_00f4: cgt - IL_00f6: ldloc.s V_5 - IL_00f8: ldloc.s V_6 - IL_00fa: clt - IL_00fc: sub - IL_00fd: ret - - IL_00fe: ldarg.0 - IL_00ff: ldfld class assembly/Test1 assembly/Test1/clo@4::this - IL_0104: castclass assembly/Test1/X14 - IL_0109: stloc.s V_11 - IL_010b: ldarg.0 - IL_010c: ldfld class assembly/Test1 assembly/Test1/clo@4::obj - IL_0111: castclass assembly/Test1/X14 - IL_0116: stloc.s V_12 - IL_0118: call class [runtime]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() - IL_011d: stloc.s V_4 - IL_011f: ldloc.s V_11 - IL_0121: ldfld int32 assembly/Test1/X14::item - IL_0126: stloc.s V_5 - IL_0128: ldloc.s V_12 - IL_012a: ldfld int32 assembly/Test1/X14::item - IL_012f: stloc.s V_6 - IL_0131: ldloc.s V_5 - IL_0133: ldloc.s V_6 - IL_0135: cgt - IL_0137: ldloc.s V_5 - IL_0139: ldloc.s V_6 - IL_013b: clt - IL_013d: sub - IL_013e: ret - - IL_013f: ldloc.0 - IL_0140: ldloc.1 - IL_0141: sub - IL_0142: ret - } - - } - - .class auto ansi serializable sealed nested assembly beforefieldinit 'clo@4-1' - extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 - { - .field public class assembly/Test1 this - .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) - .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) - .field public object obj - .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) - .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) - .field public class assembly/Test1 objTemp - .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) - .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) - .method assembly specialname rtspecialname - instance void .ctor(class assembly/Test1 this, - object obj, - class assembly/Test1 objTemp) cil managed - { - .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) - - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::.ctor() - IL_0006: ldarg.0 - IL_0007: ldarg.1 - IL_0008: stfld class assembly/Test1 assembly/Test1/'clo@4-1'::this - IL_000d: ldarg.0 - IL_000e: ldarg.2 - IL_000f: stfld object assembly/Test1/'clo@4-1'::obj - IL_0014: ldarg.0 - IL_0015: ldarg.3 - IL_0016: stfld class assembly/Test1 assembly/Test1/'clo@4-1'::objTemp - IL_001b: ret - } - - .method public strict virtual instance int32 Invoke(class [FSharp.Core]Microsoft.FSharp.Core.Unit unitVar) cil managed - { - - .maxstack 7 - .locals init (int32 V_0, - int32 V_1, - class assembly/Test1/X11 V_2, - class assembly/Test1/X11 V_3, - int32 V_4, - int32 V_5, - class assembly/Test1/X12 V_6, - class assembly/Test1/X12 V_7, - class assembly/Test1/X13 V_8, - class assembly/Test1/X13 V_9, - class assembly/Test1/X14 V_10, - class assembly/Test1/X14 V_11) - IL_0000: ldarg.0 - IL_0001: ldfld object assembly/Test1/'clo@4-1'::obj - IL_0006: unbox.any assembly/Test1 - IL_000b: brfalse IL_0137 - - IL_0010: ldarg.0 - IL_0011: ldfld class assembly/Test1 assembly/Test1/'clo@4-1'::this - IL_0016: ldfld int32 assembly/Test1::_tag - IL_001b: stloc.0 - IL_001c: ldarg.0 - IL_001d: ldfld class assembly/Test1 assembly/Test1/'clo@4-1'::objTemp - IL_0022: ldfld int32 assembly/Test1::_tag - IL_0027: stloc.1 - IL_0028: ldloc.0 - IL_0029: ldloc.1 - IL_002a: bne.un IL_0133 - - IL_002f: ldarg.0 - IL_0030: ldfld class assembly/Test1 assembly/Test1/'clo@4-1'::this - IL_0035: call instance int32 assembly/Test1::get_Tag() - IL_003a: switch ( - IL_004f, - IL_0085, - IL_00bf, - IL_00f9) - IL_004f: ldarg.0 - IL_0050: ldfld class assembly/Test1 assembly/Test1/'clo@4-1'::this - IL_0055: castclass assembly/Test1/X11 - IL_005a: stloc.2 - IL_005b: ldarg.0 - IL_005c: ldfld class assembly/Test1 assembly/Test1/'clo@4-1'::objTemp - IL_0061: castclass assembly/Test1/X11 - IL_0066: stloc.3 - IL_0067: ldloc.2 - IL_0068: ldfld int32 assembly/Test1/X11::item - IL_006d: stloc.s V_4 - IL_006f: ldloc.3 - IL_0070: ldfld int32 assembly/Test1/X11::item - IL_0075: stloc.s V_5 - IL_0077: ldloc.s V_4 - IL_0079: ldloc.s V_5 - IL_007b: cgt - IL_007d: ldloc.s V_4 - IL_007f: ldloc.s V_5 - IL_0081: clt - IL_0083: sub - IL_0084: ret - - IL_0085: ldarg.0 - IL_0086: ldfld class assembly/Test1 assembly/Test1/'clo@4-1'::this - IL_008b: castclass assembly/Test1/X12 - IL_0090: stloc.s V_6 - IL_0092: ldarg.0 - IL_0093: ldfld class assembly/Test1 assembly/Test1/'clo@4-1'::objTemp - IL_0098: castclass assembly/Test1/X12 - IL_009d: stloc.s V_7 - IL_009f: ldloc.s V_6 - IL_00a1: ldfld int32 assembly/Test1/X12::item - IL_00a6: stloc.s V_4 - IL_00a8: ldloc.s V_7 - IL_00aa: ldfld int32 assembly/Test1/X12::item - IL_00af: stloc.s V_5 - IL_00b1: ldloc.s V_4 - IL_00b3: ldloc.s V_5 - IL_00b5: cgt - IL_00b7: ldloc.s V_4 - IL_00b9: ldloc.s V_5 - IL_00bb: clt - IL_00bd: sub - IL_00be: ret - - IL_00bf: ldarg.0 - IL_00c0: ldfld class assembly/Test1 assembly/Test1/'clo@4-1'::this - IL_00c5: castclass assembly/Test1/X13 - IL_00ca: stloc.s V_8 - IL_00cc: ldarg.0 - IL_00cd: ldfld class assembly/Test1 assembly/Test1/'clo@4-1'::objTemp - IL_00d2: castclass assembly/Test1/X13 - IL_00d7: stloc.s V_9 - IL_00d9: ldloc.s V_8 - IL_00db: ldfld int32 assembly/Test1/X13::item - IL_00e0: stloc.s V_4 - IL_00e2: ldloc.s V_9 - IL_00e4: ldfld int32 assembly/Test1/X13::item - IL_00e9: stloc.s V_5 - IL_00eb: ldloc.s V_4 - IL_00ed: ldloc.s V_5 - IL_00ef: cgt - IL_00f1: ldloc.s V_4 - IL_00f3: ldloc.s V_5 - IL_00f5: clt - IL_00f7: sub - IL_00f8: ret - - IL_00f9: ldarg.0 - IL_00fa: ldfld class assembly/Test1 assembly/Test1/'clo@4-1'::this - IL_00ff: castclass assembly/Test1/X14 - IL_0104: stloc.s V_10 - IL_0106: ldarg.0 - IL_0107: ldfld class assembly/Test1 assembly/Test1/'clo@4-1'::objTemp - IL_010c: castclass assembly/Test1/X14 - IL_0111: stloc.s V_11 - IL_0113: ldloc.s V_10 - IL_0115: ldfld int32 assembly/Test1/X14::item - IL_011a: stloc.s V_4 - IL_011c: ldloc.s V_11 - IL_011e: ldfld int32 assembly/Test1/X14::item - IL_0123: stloc.s V_5 - IL_0125: ldloc.s V_4 - IL_0127: ldloc.s V_5 - IL_0129: cgt - IL_012b: ldloc.s V_4 - IL_012d: ldloc.s V_5 - IL_012f: clt - IL_0131: sub - IL_0132: ret - - IL_0133: ldloc.0 - IL_0134: ldloc.1 - IL_0135: sub - IL_0136: ret - - IL_0137: ldc.i4.1 - IL_0138: ret - } - - } - .field assembly initonly int32 _tag .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -971,36 +616,32 @@ { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .maxstack 4 - .locals init (class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 V_0) + .maxstack 8 IL_0000: ldarg.0 - IL_0001: brfalse.s IL_001a + IL_0001: brfalse.s IL_0011 IL_0003: ldarg.1 - IL_0004: brfalse.s IL_0018 + IL_0004: brfalse.s IL_000f IL_0006: ldarg.0 IL_0007: ldarg.1 - IL_0008: newobj instance void assembly/Test1/clo@4::.ctor(class assembly/Test1, - class assembly/Test1) - IL_000d: stloc.0 - IL_000e: ldloc.0 - IL_000f: ldnull - IL_0010: tail. - IL_0012: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) - IL_0017: ret + IL_0008: ldnull + IL_0009: call int32 assembly::CompareTo$cont@4(class assembly/Test1, + class assembly/Test1, + class [FSharp.Core]Microsoft.FSharp.Core.Unit) + IL_000e: ret - IL_0018: ldc.i4.1 - IL_0019: ret + IL_000f: ldc.i4.1 + IL_0010: ret - IL_001a: ldarg.1 - IL_001b: brfalse.s IL_001f + IL_0011: ldarg.1 + IL_0012: brfalse.s IL_0016 - IL_001d: ldc.i4.m1 - IL_001e: ret + IL_0014: ldc.i4.m1 + IL_0015: ret - IL_001f: ldc.i4.0 - IL_0020: ret + IL_0016: ldc.i4.0 + IL_0017: ret } .method public hidebysig virtual final instance int32 CompareTo(object obj) cil managed @@ -1019,37 +660,33 @@ { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .maxstack 5 - .locals init (class assembly/Test1 V_0, - class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 V_1) + .maxstack 6 + .locals init (class assembly/Test1 V_0) IL_0000: ldarg.1 IL_0001: unbox.any assembly/Test1 IL_0006: stloc.0 IL_0007: ldarg.0 - IL_0008: brfalse.s IL_001d + IL_0008: brfalse.s IL_0014 IL_000a: ldarg.0 IL_000b: ldarg.1 IL_000c: ldloc.0 - IL_000d: newobj instance void assembly/Test1/'clo@4-1'::.ctor(class assembly/Test1, - object, - class assembly/Test1) - IL_0012: stloc.1 - IL_0013: ldloc.1 - IL_0014: ldnull - IL_0015: tail. - IL_0017: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) - IL_001c: ret - - IL_001d: ldarg.1 - IL_001e: unbox.any assembly/Test1 - IL_0023: brfalse.s IL_0027 - - IL_0025: ldc.i4.m1 - IL_0026: ret - - IL_0027: ldc.i4.0 - IL_0028: ret + IL_000d: ldnull + IL_000e: call int32 assembly::'CompareTo$cont@4-1'(class assembly/Test1, + object, + class assembly/Test1, + class [FSharp.Core]Microsoft.FSharp.Core.Unit) + IL_0013: ret + + IL_0014: ldarg.1 + IL_0015: unbox.any assembly/Test1 + IL_001a: brfalse.s IL_001e + + IL_001c: ldc.i4.m1 + IL_001d: ret + + IL_001e: ldc.i4.0 + IL_001f: ret } .method public hidebysig virtual final instance int32 GetHashCode(class [runtime]System.Collections.IEqualityComparer comp) cil managed @@ -1498,6 +1135,275 @@ IL_0006: ret } + .method assembly static int32 CompareTo$cont@4(class assembly/Test1 this, + class assembly/Test1 obj, + class [FSharp.Core]Microsoft.FSharp.Core.Unit unitVar) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 5 + .locals init (int32 V_0, + int32 V_1, + class assembly/Test1/X11 V_2, + class assembly/Test1/X11 V_3, + class [runtime]System.Collections.IComparer V_4, + int32 V_5, + int32 V_6, + class assembly/Test1/X12 V_7, + class assembly/Test1/X12 V_8, + class assembly/Test1/X13 V_9, + class assembly/Test1/X13 V_10, + class assembly/Test1/X14 V_11, + class assembly/Test1/X14 V_12) + IL_0000: ldarg.0 + IL_0001: ldfld int32 assembly/Test1::_tag + IL_0006: stloc.0 + IL_0007: ldarg.1 + IL_0008: ldfld int32 assembly/Test1::_tag + IL_000d: stloc.1 + IL_000e: ldloc.0 + IL_000f: ldloc.1 + IL_0010: bne.un IL_0108 + + IL_0015: ldarg.0 + IL_0016: call instance int32 assembly/Test1::get_Tag() + IL_001b: switch ( + IL_0030, + IL_0063, + IL_009a, + IL_00d1) + IL_0030: ldarg.0 + IL_0031: castclass assembly/Test1/X11 + IL_0036: stloc.2 + IL_0037: ldarg.1 + IL_0038: castclass assembly/Test1/X11 + IL_003d: stloc.3 + IL_003e: call class [runtime]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() + IL_0043: stloc.s V_4 + IL_0045: ldloc.2 + IL_0046: ldfld int32 assembly/Test1/X11::item + IL_004b: stloc.s V_5 + IL_004d: ldloc.3 + IL_004e: ldfld int32 assembly/Test1/X11::item + IL_0053: stloc.s V_6 + IL_0055: ldloc.s V_5 + IL_0057: ldloc.s V_6 + IL_0059: cgt + IL_005b: ldloc.s V_5 + IL_005d: ldloc.s V_6 + IL_005f: clt + IL_0061: sub + IL_0062: ret + + IL_0063: ldarg.0 + IL_0064: castclass assembly/Test1/X12 + IL_0069: stloc.s V_7 + IL_006b: ldarg.1 + IL_006c: castclass assembly/Test1/X12 + IL_0071: stloc.s V_8 + IL_0073: call class [runtime]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() + IL_0078: stloc.s V_4 + IL_007a: ldloc.s V_7 + IL_007c: ldfld int32 assembly/Test1/X12::item + IL_0081: stloc.s V_5 + IL_0083: ldloc.s V_8 + IL_0085: ldfld int32 assembly/Test1/X12::item + IL_008a: stloc.s V_6 + IL_008c: ldloc.s V_5 + IL_008e: ldloc.s V_6 + IL_0090: cgt + IL_0092: ldloc.s V_5 + IL_0094: ldloc.s V_6 + IL_0096: clt + IL_0098: sub + IL_0099: ret + + IL_009a: ldarg.0 + IL_009b: castclass assembly/Test1/X13 + IL_00a0: stloc.s V_9 + IL_00a2: ldarg.1 + IL_00a3: castclass assembly/Test1/X13 + IL_00a8: stloc.s V_10 + IL_00aa: call class [runtime]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() + IL_00af: stloc.s V_4 + IL_00b1: ldloc.s V_9 + IL_00b3: ldfld int32 assembly/Test1/X13::item + IL_00b8: stloc.s V_5 + IL_00ba: ldloc.s V_10 + IL_00bc: ldfld int32 assembly/Test1/X13::item + IL_00c1: stloc.s V_6 + IL_00c3: ldloc.s V_5 + IL_00c5: ldloc.s V_6 + IL_00c7: cgt + IL_00c9: ldloc.s V_5 + IL_00cb: ldloc.s V_6 + IL_00cd: clt + IL_00cf: sub + IL_00d0: ret + + IL_00d1: ldarg.0 + IL_00d2: castclass assembly/Test1/X14 + IL_00d7: stloc.s V_11 + IL_00d9: ldarg.1 + IL_00da: castclass assembly/Test1/X14 + IL_00df: stloc.s V_12 + IL_00e1: call class [runtime]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() + IL_00e6: stloc.s V_4 + IL_00e8: ldloc.s V_11 + IL_00ea: ldfld int32 assembly/Test1/X14::item + IL_00ef: stloc.s V_5 + IL_00f1: ldloc.s V_12 + IL_00f3: ldfld int32 assembly/Test1/X14::item + IL_00f8: stloc.s V_6 + IL_00fa: ldloc.s V_5 + IL_00fc: ldloc.s V_6 + IL_00fe: cgt + IL_0100: ldloc.s V_5 + IL_0102: ldloc.s V_6 + IL_0104: clt + IL_0106: sub + IL_0107: ret + + IL_0108: ldloc.0 + IL_0109: ldloc.1 + IL_010a: sub + IL_010b: ret + } + + .method assembly static int32 'CompareTo$cont@4-1'(class assembly/Test1 this, + object obj, + class assembly/Test1 objTemp, + class [FSharp.Core]Microsoft.FSharp.Core.Unit unitVar) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 5 + .locals init (int32 V_0, + int32 V_1, + class assembly/Test1/X11 V_2, + class assembly/Test1/X11 V_3, + int32 V_4, + int32 V_5, + class assembly/Test1/X12 V_6, + class assembly/Test1/X12 V_7, + class assembly/Test1/X13 V_8, + class assembly/Test1/X13 V_9, + class assembly/Test1/X14 V_10, + class assembly/Test1/X14 V_11) + IL_0000: ldarg.1 + IL_0001: unbox.any assembly/Test1 + IL_0006: brfalse IL_00fb + + IL_000b: ldarg.0 + IL_000c: ldfld int32 assembly/Test1::_tag + IL_0011: stloc.0 + IL_0012: ldarg.2 + IL_0013: ldfld int32 assembly/Test1::_tag + IL_0018: stloc.1 + IL_0019: ldloc.0 + IL_001a: ldloc.1 + IL_001b: bne.un IL_00f7 + + IL_0020: ldarg.0 + IL_0021: call instance int32 assembly/Test1::get_Tag() + IL_0026: switch ( + IL_003b, + IL_0067, + IL_0097, + IL_00c7) + IL_003b: ldarg.0 + IL_003c: castclass assembly/Test1/X11 + IL_0041: stloc.2 + IL_0042: ldarg.2 + IL_0043: castclass assembly/Test1/X11 + IL_0048: stloc.3 + IL_0049: ldloc.2 + IL_004a: ldfld int32 assembly/Test1/X11::item + IL_004f: stloc.s V_4 + IL_0051: ldloc.3 + IL_0052: ldfld int32 assembly/Test1/X11::item + IL_0057: stloc.s V_5 + IL_0059: ldloc.s V_4 + IL_005b: ldloc.s V_5 + IL_005d: cgt + IL_005f: ldloc.s V_4 + IL_0061: ldloc.s V_5 + IL_0063: clt + IL_0065: sub + IL_0066: ret + + IL_0067: ldarg.0 + IL_0068: castclass assembly/Test1/X12 + IL_006d: stloc.s V_6 + IL_006f: ldarg.2 + IL_0070: castclass assembly/Test1/X12 + IL_0075: stloc.s V_7 + IL_0077: ldloc.s V_6 + IL_0079: ldfld int32 assembly/Test1/X12::item + IL_007e: stloc.s V_4 + IL_0080: ldloc.s V_7 + IL_0082: ldfld int32 assembly/Test1/X12::item + IL_0087: stloc.s V_5 + IL_0089: ldloc.s V_4 + IL_008b: ldloc.s V_5 + IL_008d: cgt + IL_008f: ldloc.s V_4 + IL_0091: ldloc.s V_5 + IL_0093: clt + IL_0095: sub + IL_0096: ret + + IL_0097: ldarg.0 + IL_0098: castclass assembly/Test1/X13 + IL_009d: stloc.s V_8 + IL_009f: ldarg.2 + IL_00a0: castclass assembly/Test1/X13 + IL_00a5: stloc.s V_9 + IL_00a7: ldloc.s V_8 + IL_00a9: ldfld int32 assembly/Test1/X13::item + IL_00ae: stloc.s V_4 + IL_00b0: ldloc.s V_9 + IL_00b2: ldfld int32 assembly/Test1/X13::item + IL_00b7: stloc.s V_5 + IL_00b9: ldloc.s V_4 + IL_00bb: ldloc.s V_5 + IL_00bd: cgt + IL_00bf: ldloc.s V_4 + IL_00c1: ldloc.s V_5 + IL_00c3: clt + IL_00c5: sub + IL_00c6: ret + + IL_00c7: ldarg.0 + IL_00c8: castclass assembly/Test1/X14 + IL_00cd: stloc.s V_10 + IL_00cf: ldarg.2 + IL_00d0: castclass assembly/Test1/X14 + IL_00d5: stloc.s V_11 + IL_00d7: ldloc.s V_10 + IL_00d9: ldfld int32 assembly/Test1/X14::item + IL_00de: stloc.s V_4 + IL_00e0: ldloc.s V_11 + IL_00e2: ldfld int32 assembly/Test1/X14::item + IL_00e7: stloc.s V_5 + IL_00e9: ldloc.s V_4 + IL_00eb: ldloc.s V_5 + IL_00ed: cgt + IL_00ef: ldloc.s V_4 + IL_00f1: ldloc.s V_5 + IL_00f3: clt + IL_00f5: sub + IL_00f6: ret + + IL_00f7: ldloc.0 + IL_00f8: ldloc.1 + IL_00f9: sub + IL_00fa: ret + + IL_00fb: ldc.i4.1 + IL_00fc: ret + } + } .class private abstract auto ansi sealed ''.$assembly @@ -1517,4 +1423,3 @@ - diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Inlining/Regression_Specialize_ConstraintVerification.fs b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Inlining/Regression_Specialize_ConstraintVerification.fs new file mode 100644 index 00000000000..b727a6c9258 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Inlining/Regression_Specialize_ConstraintVerification.fs @@ -0,0 +1,76 @@ +namespace EmittedIL.RealInternalSignature + +open Xunit +open FSharp.Test +open FSharp.Test.Compiler + +/// Each test exercises one ILGenericParameterDef field cleared by stripILGenericParamConstraints. +/// If a constraint leaks onto the closure's Specialize override the JIT throws TypeLoadException +/// ("weaker type parameter constraints"). See #14492. +module Regression_Specialize_ConstraintVerification = + + open Regression_TLR_MutualInnerRec_StructuralAssertions + + let private compileVerifyAndRun realsig source = + source |> compileOptimized realsig |> compile |> shouldSucceed |> verifyPEAndRun + + [] + let ``struct + equality`` (realsig: bool) = + closureWithConstraint "'a : struct and 'a : equality" "a = b" "int" "42" + |> compileVerifyAndRun realsig + + [] + let ``not struct + equality`` (realsig: bool) = + closureWithConstraint "'a : not struct and 'a : equality" "obj.ReferenceEquals(a, b)" "string" "\"ok\"" + |> compileVerifyAndRun realsig + + /// Specifically guards the `IsUnmanagedAttribute` (carried via CustomAttrsStored) clearing + /// in `stripILGenericParamConstraints` — leaks of that attribute onto the Specialize override + /// were the original #14492 trigger for unmanaged-constrained inlines. + [] + let ``unmanaged + equality`` (realsig: bool) = + let source = closureWithConstraint "'a : unmanaged and 'a : equality" "a = b" "int" "42" + let compiled = source |> compileOptimized realsig |> compile |> shouldSucceed + compiled + |> verifyILNotPresent [ + // No IsUnmanagedAttribute / modreq leakage onto the Specialize override / T-suffix class. + "Specialize] + let ``default constructor`` (realsig: bool) = + closureWithConstraint "'a : (new : unit -> 'a) and 'a : equality" "a = b" "int" "42" + |> compileVerifyAndRun realsig + + [] + let ``interface IComparable`` (realsig: bool) = + closureWithConstraint "'a :> System.IComparable" "(a :> System.IComparable).CompareTo(b) = 0" "int" "42" + |> compileVerifyAndRun realsig + + [] + let ``comparison`` (realsig: bool) = + closureWithConstraint "'a : comparison" "compare a b = 0" "int" "42" + |> compileVerifyAndRun realsig + + [] + let ``struct + comparison + equality combined`` (realsig: bool) = + closureWithConstraint "'a : struct and 'a : comparison and 'a : equality" "a >= b" "int" "42" + |> compileVerifyAndRun realsig + + /// Constrained inline member call inside a closure caused CLR segfault. See #19075. + [] + let ``SRTP member constraint with IDisposable`` (realsig: bool) = + """module Test +open System +open System.IO +module Dispose = + let inline action<'a when 'a: (member Dispose: unit -> unit) and 'a :> IDisposable>(a: 'a) = a.Dispose() +[] +let main _ = + let ms = new MemoryStream() + ms |> Dispose.action + 0 +""" + |> compileVerifyAndRun realsig diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Inlining/Regression_TLR_MutualInnerRec.fs b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Inlining/Regression_TLR_MutualInnerRec.fs new file mode 100644 index 00000000000..1fa8383bf62 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Inlining/Regression_TLR_MutualInnerRec.fs @@ -0,0 +1,15 @@ +module Regression_TLR_MutualInnerRec + +let fifth() = + let rec fifthMethodFirstCallee(iterationCount, firstArg: int) = + if iterationCount = 0 then 100 + else if iterationCount % 2 = 0 then fifthMethodSecondCallee(iterationCount - 1, firstArg) + else fifthMethodFirstCallee(iterationCount - 1, firstArg) + and fifthMethodSecondCallee(iterationCount, firstArg) = + if iterationCount = 0 then 101 + else if iterationCount % 2 = 0 then fifthMethodSecondCallee(iterationCount - 1, firstArg) + else fifthMethodFirstCallee(iterationCount - 1, firstArg) + fifthMethodFirstCallee(1000000, 158_423) + +[] +let main _argv = fifth () diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Inlining/Regression_TLR_MutualInnerRec.fs.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Inlining/Regression_TLR_MutualInnerRec.fs.il.bsl new file mode 100644 index 00000000000..e6b6253be66 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Inlining/Regression_TLR_MutualInnerRec.fs.il.bsl @@ -0,0 +1,141 @@ + + + + + +.assembly extern runtime { } +.assembly extern FSharp.Core { } +.assembly assembly +{ + .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 ) + + + + + .hash algorithm 0x00008004 + .ver 0:0:0:0 +} +.module assembly.exe + +.imagebase {value} +.file alignment 0x00000200 +.stackreserve 0x00100000 +.subsystem 0x0003 +.corflags 0x00000001 + + + + + +.class public abstract auto ansi sealed assembly + extends [runtime]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 fifth() cil managed + { + + .maxstack 8 + IL_0000: ldc.i4 0xf4240 + IL_0005: ldc.i4 0x26ad7 + IL_000a: tail. + IL_000c: call int32 assembly::fifthMethodFirstCallee@4(int32, + int32) + IL_0011: ret + } + + .method public static int32 main(string[] _argv) cil managed + { + .entrypoint + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.EntryPointAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: tail. + IL_0002: call int32 assembly::fifth() + IL_0007: ret + } + + .method assembly static int32 fifthMethodFirstCallee@4(int32 iterationCount, + int32 firstArg) cil managed + { + + .maxstack 8 + IL_0000: nop + IL_0001: ldarg.0 + IL_0002: brtrue.s IL_0007 + + IL_0004: ldc.i4.s 100 + IL_0006: ret + + IL_0007: nop + IL_0008: ldarg.0 + IL_0009: ldc.i4.2 + IL_000a: rem + IL_000b: brtrue.s IL_0019 + + IL_000d: ldarg.0 + IL_000e: ldc.i4.1 + IL_000f: sub + IL_0010: ldarg.1 + IL_0011: tail. + IL_0013: call int32 assembly::fifthMethodSecondCallee@8(int32, + int32) + IL_0018: ret + + IL_0019: ldarg.0 + IL_001a: ldc.i4.1 + IL_001b: sub + IL_001c: ldarg.1 + IL_001d: starg.s firstArg + IL_001f: starg.s iterationCount + IL_0021: br.s IL_0000 + } + + .method assembly static int32 fifthMethodSecondCallee@8(int32 iterationCount, + int32 firstArg) cil managed + { + + .maxstack 8 + IL_0000: nop + IL_0001: ldarg.0 + IL_0002: brtrue.s IL_0007 + + IL_0004: ldc.i4.s 101 + IL_0006: ret + + IL_0007: nop + IL_0008: ldarg.0 + IL_0009: ldc.i4.2 + IL_000a: rem + IL_000b: brtrue.s IL_0017 + + IL_000d: ldarg.0 + IL_000e: ldc.i4.1 + IL_000f: sub + IL_0010: ldarg.1 + IL_0011: starg.s firstArg + IL_0013: starg.s iterationCount + IL_0015: br.s IL_0000 + + IL_0017: ldarg.0 + IL_0018: ldc.i4.1 + IL_0019: sub + IL_001a: ldarg.1 + IL_001b: tail. + IL_001d: call int32 assembly::fifthMethodFirstCallee@4(int32, + int32) + IL_0022: ret + } + +} + +.class private abstract auto ansi sealed ''.$assembly + extends [runtime]System.Object +{ +} + + + + + diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Inlining/Regression_TLR_MutualInnerRec_CapturedEnv.fs b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Inlining/Regression_TLR_MutualInnerRec_CapturedEnv.fs new file mode 100644 index 00000000000..3fc9f0f344f --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Inlining/Regression_TLR_MutualInnerRec_CapturedEnv.fs @@ -0,0 +1,15 @@ +module Regression_TLR_MutualInnerRec_CapturedEnv + +let outer (threshold: int) (factor: int) = + let rec a(n) = + if n = 0 then threshold + elif n % 2 = 0 then b(n - 1) + else a(n - factor) + and b(n) = + if n = 0 then threshold + 1 + elif n % 2 = 0 then b(n - factor) + else a(n - 1) + a(100) + +[] +let main _argv = outer 7 1 diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Inlining/Regression_TLR_MutualInnerRec_CapturedEnv.fs.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Inlining/Regression_TLR_MutualInnerRec_CapturedEnv.fs.il.bsl new file mode 100644 index 00000000000..9dc10e0e9cb --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Inlining/Regression_TLR_MutualInnerRec_CapturedEnv.fs.il.bsl @@ -0,0 +1,166 @@ + + + + + +.assembly extern runtime { } +.assembly extern FSharp.Core { } +.assembly assembly +{ + .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 ) + + + + + .hash algorithm 0x00008004 + .ver 0:0:0:0 +} +.module assembly.exe + +.imagebase {value} +.file alignment 0x00000200 +.stackreserve 0x00100000 +.subsystem 0x0003 +.corflags 0x00000001 + + + + + +.class public abstract auto ansi sealed assembly + extends [runtime]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 outer(int32 threshold, + int32 factor) cil managed + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationArgumentCountsAttribute::.ctor(int32[]) = ( 01 00 02 00 00 00 01 00 00 00 01 00 00 00 00 00 ) + + .maxstack 5 + .locals init (int32 V_0, + int32 V_1) + IL_0000: ldarg.0 + IL_0001: stloc.0 + IL_0002: ldarg.1 + IL_0003: stloc.1 + IL_0004: ldarg.0 + IL_0005: ldarg.1 + IL_0006: ldc.i4.s 100 + IL_0008: tail. + IL_000a: call int32 assembly::a@4(int32, + int32, + int32) + IL_000f: ret + } + + .method public static int32 main(string[] _argv) cil managed + { + .entrypoint + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.EntryPointAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldc.i4.7 + IL_0001: ldc.i4.1 + IL_0002: tail. + IL_0004: call int32 assembly::outer(int32, + int32) + IL_0009: ret + } + + .method assembly static int32 a@4(int32 threshold, + int32 factor, + int32 n) cil managed + { + + .maxstack 8 + IL_0000: nop + IL_0001: ldarg.2 + IL_0002: brtrue.s IL_0006 + + IL_0004: ldarg.0 + IL_0005: ret + + IL_0006: nop + IL_0007: ldarg.2 + IL_0008: ldc.i4.2 + IL_0009: rem + IL_000a: brtrue.s IL_0019 + + IL_000c: ldarg.0 + IL_000d: ldarg.1 + IL_000e: ldarg.2 + IL_000f: ldc.i4.1 + IL_0010: sub + IL_0011: tail. + IL_0013: call int32 assembly::b@8(int32, + int32, + int32) + IL_0018: ret + + IL_0019: ldarg.0 + IL_001a: ldarg.1 + IL_001b: ldarg.2 + IL_001c: ldarg.1 + IL_001d: sub + IL_001e: starg.s n + IL_0020: starg.s factor + IL_0022: starg.s threshold + IL_0024: br.s IL_0000 + } + + .method assembly static int32 b@8(int32 threshold, + int32 factor, + int32 n) cil managed + { + + .maxstack 8 + IL_0000: nop + IL_0001: ldarg.2 + IL_0002: brtrue.s IL_0008 + + IL_0004: ldarg.0 + IL_0005: ldc.i4.1 + IL_0006: add + IL_0007: ret + + IL_0008: nop + IL_0009: ldarg.2 + IL_000a: ldc.i4.2 + IL_000b: rem + IL_000c: brtrue.s IL_001b + + IL_000e: ldarg.0 + IL_000f: ldarg.1 + IL_0010: ldarg.2 + IL_0011: ldarg.1 + IL_0012: sub + IL_0013: starg.s n + IL_0015: starg.s factor + IL_0017: starg.s threshold + IL_0019: br.s IL_0000 + + IL_001b: ldarg.0 + IL_001c: ldarg.1 + IL_001d: ldarg.2 + IL_001e: ldc.i4.1 + IL_001f: sub + IL_0020: tail. + IL_0022: call int32 assembly::a@4(int32, + int32, + int32) + IL_0027: ret + } + +} + +.class private abstract auto ansi sealed ''.$assembly + extends [runtime]System.Object +{ +} + + + + + diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Inlining/Regression_TLR_MutualInnerRec_Generic.fs b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Inlining/Regression_TLR_MutualInnerRec_Generic.fs new file mode 100644 index 00000000000..f1895ba465c --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Inlining/Regression_TLR_MutualInnerRec_Generic.fs @@ -0,0 +1,16 @@ +module Regression_TLR_MutualInnerRec_Generic + +let outer<'T> (initial: 'T) (zero: 'T) = + let rec a(n, v: 'T) = + if n = 0 then v + elif n % 2 = 0 then b(n - 1, v) + else a(n - 1, v) + and b(n, v: 'T) = + if n = 0 then zero + elif n % 2 = 0 then b(n - 1, v) + else a(n - 1, v) + a(1000, initial) + +[] +let main _argv = + if outer 1 0 = 1 then 0 else 1 diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Inlining/Regression_TLR_MutualInnerRec_Generic.fs.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Inlining/Regression_TLR_MutualInnerRec_Generic.fs.il.bsl new file mode 100644 index 00000000000..7f866e6e4b4 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Inlining/Regression_TLR_MutualInnerRec_Generic.fs.il.bsl @@ -0,0 +1,168 @@ + + + + + +.assembly extern runtime { } +.assembly extern FSharp.Core { } +.assembly assembly +{ + .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 ) + + + + + .hash algorithm 0x00008004 + .ver 0:0:0:0 +} +.module assembly.exe + +.imagebase {value} +.file alignment 0x00000200 +.stackreserve 0x00100000 +.subsystem 0x0003 +.corflags 0x00000001 + + + + + +.class public abstract auto ansi sealed assembly + extends [runtime]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 !!T outer(!!T initial, + !!T zero) cil managed + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationArgumentCountsAttribute::.ctor(int32[]) = ( 01 00 02 00 00 00 01 00 00 00 01 00 00 00 00 00 ) + + .maxstack 5 + .locals init (!!T V_0) + IL_0000: ldarg.1 + IL_0001: stloc.0 + IL_0002: ldarg.1 + IL_0003: ldc.i4 0x3e8 + IL_0008: ldarg.0 + IL_0009: tail. + IL_000b: call !!0 assembly::a@4(!!0, + int32, + !!0) + IL_0010: ret + } + + .method public static int32 main(string[] _argv) cil managed + { + .entrypoint + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.EntryPointAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: nop + IL_0001: ldc.i4.1 + IL_0002: ldc.i4.0 + IL_0003: call !!0 assembly::outer(!!0, + !!0) + IL_0008: ldc.i4.1 + IL_0009: bne.un.s IL_000d + + IL_000b: ldc.i4.0 + IL_000c: ret + + IL_000d: ldc.i4.1 + IL_000e: ret + } + + .method assembly static !!T a@4(!!T zero, + int32 n, + !!T v) cil managed + { + + .maxstack 8 + IL_0000: nop + IL_0001: ldarg.1 + IL_0002: brtrue.s IL_0006 + + IL_0004: ldarg.2 + IL_0005: ret + + IL_0006: nop + IL_0007: ldarg.1 + IL_0008: ldc.i4.2 + IL_0009: rem + IL_000a: brtrue.s IL_0019 + + IL_000c: ldarg.0 + IL_000d: ldarg.1 + IL_000e: ldc.i4.1 + IL_000f: sub + IL_0010: ldarg.2 + IL_0011: tail. + IL_0013: call !!0 assembly::b@8(!!0, + int32, + !!0) + IL_0018: ret + + IL_0019: ldarg.0 + IL_001a: ldarg.1 + IL_001b: ldc.i4.1 + IL_001c: sub + IL_001d: ldarg.2 + IL_001e: starg.s v + IL_0020: starg.s n + IL_0022: starg.s zero + IL_0024: br.s IL_0000 + } + + .method assembly static !!T b@8(!!T zero, + int32 n, + !!T v) cil managed + { + + .maxstack 8 + IL_0000: nop + IL_0001: ldarg.1 + IL_0002: brtrue.s IL_0006 + + IL_0004: ldarg.0 + IL_0005: ret + + IL_0006: nop + IL_0007: ldarg.1 + IL_0008: ldc.i4.2 + IL_0009: rem + IL_000a: brtrue.s IL_0019 + + IL_000c: ldarg.0 + IL_000d: ldarg.1 + IL_000e: ldc.i4.1 + IL_000f: sub + IL_0010: ldarg.2 + IL_0011: starg.s v + IL_0013: starg.s n + IL_0015: starg.s zero + IL_0017: br.s IL_0000 + + IL_0019: ldarg.0 + IL_001a: ldarg.1 + IL_001b: ldc.i4.1 + IL_001c: sub + IL_001d: ldarg.2 + IL_001e: tail. + IL_0020: call !!0 assembly::a@4(!!0, + int32, + !!0) + IL_0025: ret + } + +} + +.class private abstract auto ansi sealed ''.$assembly + extends [runtime]System.Object +{ +} + + + + + diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Inlining/Regression_TLR_MutualInnerRec_Point2D.fs b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Inlining/Regression_TLR_MutualInnerRec_Point2D.fs new file mode 100644 index 00000000000..d9c2e7ae00b --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Inlining/Regression_TLR_MutualInnerRec_Point2D.fs @@ -0,0 +1,23 @@ +module Regression_TLR_MutualInnerRec_Point2D + +[] +type Point2D(x: double, y: double) = + member _.X = x + member _.Y = y + +let fifth() = + let rec firstCallee(n, a: Point2D, b: Point2D, c: Point2D, d: Point2D, e: Point2D) = + if a.X <> 10.0 then -100 + elif n = 0 then 100 + elif n % 2 = 0 then secondCallee(n - 1, a, b, c, d, e) + else firstCallee(n - 1, a, b, c, d, e) + and secondCallee(n, a: Point2D, b: Point2D, c: Point2D, d: Point2D, e: Point2D) = + if n = 0 then 101 + elif n % 2 = 0 then secondCallee(n - 1, a, b, c, d, e) + else firstCallee(n - 1, a, b, c, d, e) + let p = Point2D(10.0, 20.0) + let q = Point2D(30.0, 40.0) + firstCallee(1000000, p, q, p, q, p) + +[] +let main _argv = fifth () diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Inlining/Regression_TLR_MutualInnerRec_Point2D.fs.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Inlining/Regression_TLR_MutualInnerRec_Point2D.fs.il.bsl new file mode 100644 index 00000000000..0a3244fe212 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Inlining/Regression_TLR_MutualInnerRec_Point2D.fs.il.bsl @@ -0,0 +1,677 @@ +.assembly extern runtime { } +.assembly extern FSharp.Core { } +.assembly assembly +{ +.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 ) + + + + +.hash algorithm 0x00008004 +.ver 0:0:0:0 +} +.module assembly.exe + +.imagebase {value} +.file alignment 0x00000200 +.stackreserve 0x00100000 +.subsystem 0x0003 +.corflags 0x00000001 + + + + + +.class public abstract auto ansi sealed assembly +extends [runtime]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 Point2D +extends [runtime]System.ValueType +implements class [runtime]System.IEquatable`1, +[runtime]System.Collections.IStructuralEquatable, +class [runtime]System.IComparable`1, +[runtime]System.IComparable, +[runtime]System.Collections.IStructuralComparable +{ +.custom instance void [FSharp.Core]Microsoft.FSharp.Core.StructAttribute::.ctor() = ( 01 00 00 00 ) +.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 assembly float64 x +.field assembly float64 y +.method public hidebysig virtual final instance int32 CompareTo(valuetype assembly/Point2D obj) cil managed +{ +.custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + +.maxstack 5 +.locals init (int32 V_0, +class [runtime]System.Collections.IComparer V_1, +float64 V_2, +float64 V_3) +IL_0000: call class [runtime]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() +IL_0005: stloc.1 +IL_0006: ldarg.0 +IL_0007: ldfld float64 assembly/Point2D::x +IL_000c: stloc.2 +IL_000d: ldarga.s obj +IL_000f: ldfld float64 assembly/Point2D::x +IL_0014: stloc.3 +IL_0015: ldloc.2 +IL_0016: ldloc.3 +IL_0017: clt +IL_0019: brfalse.s IL_001f + +IL_001b: ldc.i4.m1 +IL_001c: nop +IL_001d: br.s IL_003e + +IL_001f: ldloc.2 +IL_0020: ldloc.3 +IL_0021: cgt +IL_0023: brfalse.s IL_0029 + +IL_0025: ldc.i4.1 +IL_0026: nop +IL_0027: br.s IL_003e + +IL_0029: ldloc.2 +IL_002a: ldloc.3 +IL_002b: ceq +IL_002d: brfalse.s IL_0033 + +IL_002f: ldc.i4.0 +IL_0030: nop +IL_0031: br.s IL_003e + +IL_0033: ldloc.1 +IL_0034: ldloc.2 +IL_0035: ldloc.3 +IL_0036: call int32 [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/HashCompare::GenericComparisonWithComparerIntrinsic(class [runtime]System.Collections.IComparer, +!!0, +!!0) +IL_003b: nop +IL_003c: br.s IL_003e + +IL_003e: stloc.0 +IL_003f: ldloc.0 +IL_0040: ldc.i4.0 +IL_0041: bge.s IL_0045 + +IL_0043: ldloc.0 +IL_0044: ret + +IL_0045: ldloc.0 +IL_0046: ldc.i4.0 +IL_0047: ble.s IL_004b + +IL_0049: ldloc.0 +IL_004a: ret + +IL_004b: call class [runtime]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() +IL_0050: stloc.1 +IL_0051: ldarg.0 +IL_0052: ldfld float64 assembly/Point2D::y +IL_0057: stloc.2 +IL_0058: ldarga.s obj +IL_005a: ldfld float64 assembly/Point2D::y +IL_005f: stloc.3 +IL_0060: ldloc.2 +IL_0061: ldloc.3 +IL_0062: clt +IL_0064: brfalse.s IL_0068 + +IL_0066: ldc.i4.m1 +IL_0067: ret + +IL_0068: ldloc.2 +IL_0069: ldloc.3 +IL_006a: cgt +IL_006c: brfalse.s IL_0070 + +IL_006e: ldc.i4.1 +IL_006f: ret + +IL_0070: ldloc.2 +IL_0071: ldloc.3 +IL_0072: ceq +IL_0074: brfalse.s IL_0078 + +IL_0076: ldc.i4.0 +IL_0077: ret + +IL_0078: ldloc.1 +IL_0079: ldloc.2 +IL_007a: ldloc.3 +IL_007b: tail. +IL_007d: call int32 [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/HashCompare::GenericComparisonWithComparerIntrinsic(class [runtime]System.Collections.IComparer, +!!0, +!!0) +IL_0082: ret +} + +.method public hidebysig virtual final instance int32 CompareTo(object obj) cil managed +{ +.custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + +.maxstack 8 +IL_0000: ldarg.0 +IL_0001: ldarg.1 +IL_0002: unbox.any assembly/Point2D +IL_0007: call instance int32 assembly/Point2D::CompareTo(valuetype assembly/Point2D) +IL_000c: ret +} + +.method public hidebysig virtual final instance int32 CompareTo(object obj, class [runtime]System.Collections.IComparer comp) cil managed +{ +.custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + +.maxstack 5 +.locals init (valuetype assembly/Point2D V_0, +int32 V_1, +float64 V_2, +float64 V_3) +IL_0000: ldarg.1 +IL_0001: unbox.any assembly/Point2D +IL_0006: stloc.0 +IL_0007: ldarg.0 +IL_0008: ldfld float64 assembly/Point2D::x +IL_000d: stloc.2 +IL_000e: ldloca.s V_0 +IL_0010: ldfld float64 assembly/Point2D::x +IL_0015: stloc.3 +IL_0016: ldloc.2 +IL_0017: ldloc.3 +IL_0018: clt +IL_001a: brfalse.s IL_0020 + +IL_001c: ldc.i4.m1 +IL_001d: nop +IL_001e: br.s IL_003f + +IL_0020: ldloc.2 +IL_0021: ldloc.3 +IL_0022: cgt +IL_0024: brfalse.s IL_002a + +IL_0026: ldc.i4.1 +IL_0027: nop +IL_0028: br.s IL_003f + +IL_002a: ldloc.2 +IL_002b: ldloc.3 +IL_002c: ceq +IL_002e: brfalse.s IL_0034 + +IL_0030: ldc.i4.0 +IL_0031: nop +IL_0032: br.s IL_003f + +IL_0034: ldarg.2 +IL_0035: ldloc.2 +IL_0036: ldloc.3 +IL_0037: call int32 [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/HashCompare::GenericComparisonWithComparerIntrinsic(class [runtime]System.Collections.IComparer, +!!0, +!!0) +IL_003c: nop +IL_003d: br.s IL_003f + +IL_003f: stloc.1 +IL_0040: ldloc.1 +IL_0041: ldc.i4.0 +IL_0042: bge.s IL_0046 + +IL_0044: ldloc.1 +IL_0045: ret + +IL_0046: ldloc.1 +IL_0047: ldc.i4.0 +IL_0048: ble.s IL_004c + +IL_004a: ldloc.1 +IL_004b: ret + +IL_004c: ldarg.0 +IL_004d: ldfld float64 assembly/Point2D::y +IL_0052: stloc.2 +IL_0053: ldloca.s V_0 +IL_0055: ldfld float64 assembly/Point2D::y +IL_005a: stloc.3 +IL_005b: ldloc.2 +IL_005c: ldloc.3 +IL_005d: clt +IL_005f: brfalse.s IL_0063 + +IL_0061: ldc.i4.m1 +IL_0062: ret + +IL_0063: ldloc.2 +IL_0064: ldloc.3 +IL_0065: cgt +IL_0067: brfalse.s IL_006b + +IL_0069: ldc.i4.1 +IL_006a: ret + +IL_006b: ldloc.2 +IL_006c: ldloc.3 +IL_006d: ceq +IL_006f: brfalse.s IL_0073 + +IL_0071: ldc.i4.0 +IL_0072: ret + +IL_0073: ldarg.2 +IL_0074: ldloc.2 +IL_0075: ldloc.3 +IL_0076: tail. +IL_0078: call int32 [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/HashCompare::GenericComparisonWithComparerIntrinsic(class [runtime]System.Collections.IComparer, +!!0, +!!0) +IL_007d: ret +} + +.method public hidebysig virtual final instance int32 GetHashCode(class [runtime]System.Collections.IEqualityComparer comp) cil managed +{ +.custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + +.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 float64 assembly/Point2D::y +IL_000e: call int32 [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/HashCompare::GenericHashWithComparerIntrinsic(class [runtime]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: ldc.i4 0x9e3779b9 +IL_0022: ldarg.1 +IL_0023: ldarg.0 +IL_0024: ldfld float64 assembly/Point2D::x +IL_0029: call int32 [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/HashCompare::GenericHashWithComparerIntrinsic(class [runtime]System.Collections.IEqualityComparer, +!!0) +IL_002e: ldloc.0 +IL_002f: ldc.i4.6 +IL_0030: shl +IL_0031: ldloc.0 +IL_0032: ldc.i4.2 +IL_0033: shr +IL_0034: add +IL_0035: add +IL_0036: add +IL_0037: stloc.0 +IL_0038: ldloc.0 +IL_0039: ret +} + +.method public hidebysig virtual final instance int32 GetHashCode() cil managed +{ +.custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + +.maxstack 8 +IL_0000: ldarg.0 +IL_0001: call class [runtime]System.Collections.IEqualityComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericEqualityComparer() +IL_0006: call instance int32 assembly/Point2D::GetHashCode(class [runtime]System.Collections.IEqualityComparer) +IL_000b: ret +} + +.method public hidebysig instance bool Equals(valuetype assembly/Point2D obj, class [runtime]System.Collections.IEqualityComparer comp) cil managed +{ +.custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + +.maxstack 8 +IL_0000: ldarg.0 +IL_0001: ldfld float64 assembly/Point2D::x +IL_0006: ldarga.s obj +IL_0008: ldfld float64 assembly/Point2D::x +IL_000d: ceq +IL_000f: brfalse.s IL_0021 + +IL_0011: ldarg.0 +IL_0012: ldfld float64 assembly/Point2D::y +IL_0017: ldarga.s obj +IL_0019: ldfld float64 assembly/Point2D::y +IL_001e: ceq +IL_0020: ret + +IL_0021: ldc.i4.0 +IL_0022: ret +} + +.method public hidebysig virtual final instance bool Equals(object obj, class [runtime]System.Collections.IEqualityComparer comp) cil managed +{ +.custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + +.maxstack 5 +.locals init (valuetype assembly/Point2D V_0) +IL_0000: ldarg.1 +IL_0001: isinst assembly/Point2D +IL_0006: brfalse.s IL_0018 + +IL_0008: ldarg.1 +IL_0009: unbox.any assembly/Point2D +IL_000e: stloc.0 +IL_000f: ldarg.0 +IL_0010: ldloc.0 +IL_0011: ldarg.2 +IL_0012: call instance bool assembly/Point2D::Equals(valuetype assembly/Point2D, +class [runtime]System.Collections.IEqualityComparer) +IL_0017: ret + +IL_0018: ldc.i4.0 +IL_0019: ret +} + +.method public specialname rtspecialname instance void .ctor(float64 x, float64 y) cil managed +{ + +.maxstack 8 +IL_0000: ldarg.0 +IL_0001: ldarg.1 +IL_0002: stfld float64 assembly/Point2D::x +IL_0007: ldarg.0 +IL_0008: ldarg.2 +IL_0009: stfld float64 assembly/Point2D::y +IL_000e: ret +} + +.method public hidebysig specialname instance float64 get_X() cil managed +{ + +.maxstack 8 +IL_0000: ldarg.0 +IL_0001: ldfld float64 assembly/Point2D::x +IL_0006: ret +} + +.method public hidebysig specialname instance float64 get_Y() cil managed +{ + +.maxstack 8 +IL_0000: ldarg.0 +IL_0001: ldfld float64 assembly/Point2D::y +IL_0006: ret +} + +.method public hidebysig virtual final instance bool Equals(valuetype assembly/Point2D obj) cil managed +{ +.custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + +.maxstack 4 +.locals init (float64 V_0, +float64 V_1) +IL_0000: ldarg.0 +IL_0001: ldfld float64 assembly/Point2D::x +IL_0006: stloc.0 +IL_0007: ldarga.s obj +IL_0009: ldfld float64 assembly/Point2D::x +IL_000e: stloc.1 +IL_000f: ldloc.0 +IL_0010: ldloc.1 +IL_0011: ceq +IL_0013: brfalse.s IL_0019 + +IL_0015: ldc.i4.1 +IL_0016: nop +IL_0017: br.s IL_002b + +IL_0019: ldloc.0 +IL_001a: ldloc.0 +IL_001b: beq.s IL_0027 + +IL_001d: ldloc.1 +IL_001e: ldloc.1 +IL_001f: ceq +IL_0021: ldc.i4.0 +IL_0022: ceq +IL_0024: nop +IL_0025: br.s IL_002b + +IL_0027: ldc.i4.0 +IL_0028: nop +IL_0029: br.s IL_002b + +IL_002b: brfalse.s IL_0052 + +IL_002d: ldarg.0 +IL_002e: ldfld float64 assembly/Point2D::y +IL_0033: stloc.0 +IL_0034: ldarga.s obj +IL_0036: ldfld float64 assembly/Point2D::y +IL_003b: stloc.1 +IL_003c: ldloc.0 +IL_003d: ldloc.1 +IL_003e: ceq +IL_0040: brfalse.s IL_0044 + +IL_0042: ldc.i4.1 +IL_0043: ret + +IL_0044: ldloc.0 +IL_0045: ldloc.0 +IL_0046: beq.s IL_0050 + +IL_0048: ldloc.1 +IL_0049: ldloc.1 +IL_004a: ceq +IL_004c: ldc.i4.0 +IL_004d: ceq +IL_004f: ret + +IL_0050: ldc.i4.0 +IL_0051: ret + +IL_0052: ldc.i4.0 +IL_0053: ret +} + +.method public hidebysig virtual final instance bool Equals(object obj) cil managed +{ +.custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + +.maxstack 8 +IL_0000: ldarg.1 +IL_0001: isinst assembly/Point2D +IL_0006: brfalse.s IL_0015 + +IL_0008: ldarg.0 +IL_0009: ldarg.1 +IL_000a: unbox.any assembly/Point2D +IL_000f: call instance bool assembly/Point2D::Equals(valuetype assembly/Point2D) +IL_0014: ret + +IL_0015: ldc.i4.0 +IL_0016: ret +} + +.property instance float64 X() +{ +.get instance float64 assembly/Point2D::get_X() +} +.property instance float64 Y() +{ +.get instance float64 assembly/Point2D::get_Y() +} +} + +.method public static int32 fifth() cil managed +{ + +.maxstack 8 +.locals init (valuetype assembly/Point2D V_0, +valuetype assembly/Point2D V_1) +IL_0000: ldc.r8 10 +IL_0009: ldc.r8 20 +IL_0012: newobj instance void assembly/Point2D::.ctor(float64, +float64) +IL_0017: stloc.0 +IL_0018: ldc.r8 30 +IL_0021: ldc.r8 40 +IL_002a: newobj instance void assembly/Point2D::.ctor(float64, +float64) +IL_002f: stloc.1 +IL_0030: ldc.i4 0xf4240 +IL_0035: ldloc.0 +IL_0036: ldloc.1 +IL_0037: ldloc.0 +IL_0038: ldloc.1 +IL_0039: ldloc.0 +IL_003a: tail. +IL_003c: call int32 assembly::firstCallee@9(int32, +valuetype assembly/Point2D, +valuetype assembly/Point2D, +valuetype assembly/Point2D, +valuetype assembly/Point2D, +valuetype assembly/Point2D) +IL_0041: ret +} + +.method public static int32 main(string[] _argv) cil managed +{ +.entrypoint +.custom instance void [FSharp.Core]Microsoft.FSharp.Core.EntryPointAttribute::.ctor() = ( 01 00 00 00 ) + +.maxstack 8 +IL_0000: tail. +IL_0002: call int32 assembly::fifth() +IL_0007: ret +} + +.method assembly static int32 firstCallee@9(int32 n, +valuetype assembly/Point2D a, +valuetype assembly/Point2D b, +valuetype assembly/Point2D c, +valuetype assembly/Point2D d, +valuetype assembly/Point2D e) cil managed +{ + +.maxstack 8 +IL_0000: nop +IL_0001: ldarga.s a +IL_0003: ldfld float64 assembly/Point2D::x +IL_0008: ldc.r8 10 +IL_0011: beq.s IL_0016 + +IL_0013: ldc.i4.s -100 +IL_0015: ret + +IL_0016: nop +IL_0017: ldarg.0 +IL_0018: brtrue.s IL_001d + +IL_001a: ldc.i4.s 100 +IL_001c: ret + +IL_001d: nop +IL_001e: ldarg.0 +IL_001f: ldc.i4.2 +IL_0020: rem +IL_0021: brtrue.s IL_0035 + +IL_0023: ldarg.0 +IL_0024: ldc.i4.1 +IL_0025: sub +IL_0026: ldarg.1 +IL_0027: ldarg.2 +IL_0028: ldarg.3 +IL_0029: ldarg.s d +IL_002b: ldarg.s e +IL_002d: tail. +IL_002f: call int32 assembly::secondCallee@14(int32, +valuetype assembly/Point2D, +valuetype assembly/Point2D, +valuetype assembly/Point2D, +valuetype assembly/Point2D, +valuetype assembly/Point2D) +IL_0034: ret + +IL_0035: ldarg.0 +IL_0036: ldc.i4.1 +IL_0037: sub +IL_0038: ldarg.1 +IL_0039: ldarg.2 +IL_003a: ldarg.3 +IL_003b: ldarg.s d +IL_003d: ldarg.s e +IL_003f: starg.s e +IL_0041: starg.s d +IL_0043: starg.s c +IL_0045: starg.s b +IL_0047: starg.s a +IL_0049: starg.s n +IL_004b: br.s IL_0000 +} + +.method assembly static int32 secondCallee@14(int32 n, +valuetype assembly/Point2D a, +valuetype assembly/Point2D b, +valuetype assembly/Point2D c, +valuetype assembly/Point2D d, +valuetype assembly/Point2D e) cil managed +{ + +.maxstack 8 +IL_0000: nop +IL_0001: ldarg.0 +IL_0002: brtrue.s IL_0007 + +IL_0004: ldc.i4.s 101 +IL_0006: ret + +IL_0007: nop +IL_0008: ldarg.0 +IL_0009: ldc.i4.2 +IL_000a: rem +IL_000b: brtrue.s IL_0025 + +IL_000d: ldarg.0 +IL_000e: ldc.i4.1 +IL_000f: sub +IL_0010: ldarg.1 +IL_0011: ldarg.2 +IL_0012: ldarg.3 +IL_0013: ldarg.s d +IL_0015: ldarg.s e +IL_0017: starg.s e +IL_0019: starg.s d +IL_001b: starg.s c +IL_001d: starg.s b +IL_001f: starg.s a +IL_0021: starg.s n +IL_0023: br.s IL_0000 + +IL_0025: ldarg.0 +IL_0026: ldc.i4.1 +IL_0027: sub +IL_0028: ldarg.1 +IL_0029: ldarg.2 +IL_002a: ldarg.3 +IL_002b: ldarg.s d +IL_002d: ldarg.s e +IL_002f: tail. +IL_0031: call int32 assembly::firstCallee@9(int32, +valuetype assembly/Point2D, +valuetype assembly/Point2D, +valuetype assembly/Point2D, +valuetype assembly/Point2D, +valuetype assembly/Point2D) +IL_0036: ret +} + +} + +.class private abstract auto ansi sealed ''.$assembly +extends [runtime]System.Object +{ +} \ No newline at end of file diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Inlining/Regression_TLR_MutualInnerRec_StructuralAssertions.fs b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Inlining/Regression_TLR_MutualInnerRec_StructuralAssertions.fs new file mode 100644 index 00000000000..81e58f02457 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Inlining/Regression_TLR_MutualInnerRec_StructuralAssertions.fs @@ -0,0 +1,278 @@ +namespace EmittedIL.RealInternalSignature + +open Xunit +open FSharp.Test +open FSharp.Test.Compiler + +module Regression_TLR_MutualInnerRec_StructuralAssertions = + + let internal compileOptimized realsig source = + FSharp source + |> withRealInternalSignature realsig + |> asExe + |> withOptimize + |> ignoreWarnings + + let private compileOptimizedAndRun realsig source = + source |> compileOptimized realsig |> compileExeAndRun |> shouldSucceed |> ignore + + /// Shared "PEVerify + run" tail used by tests that assert both metadata validity and runtime success. + let internal verifyPEAndRun (compiled: CompilationResult) = + compiled |> verifyPEFileWithSystemDlls |> shouldSucceed |> ignore + compiled |> run |> shouldSucceed |> ignore + + let private compileAndAssertNoClosures realsig expectedIL source = + let result = source |> compileOptimized realsig |> compile |> shouldSucceed + result |> verifyILPresent expectedIL + result |> verifyILNotPresent [ "extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc" ] + result + + let private compileAssertNoClosuresAndRun realsig expectedIL source = + source |> compileAndAssertNoClosures realsig expectedIL |> run |> shouldSucceed |> ignore + + // Inline constrained call inside a memoize closure — the inline expands into the closure body, + // attaching constraints to the closure class typars; EraseClosures must strip them. + let internal closureWithConstraint constraintClause inlineBody typeAnnotation callValue = + $"""module Test +open System +let inline worker<'a when {constraintClause}> (a: 'a) (b: 'a) : bool = {inlineBody} +let inline tee f x = f x; x +let memoize (f: 'a -> 'b) = + let cell = ref None + let f' (x: 'a) = + match cell.Value with + | Some (x', value) when worker x' x -> value + | _ -> f x |> tee (fun y -> cell.Value <- Some (x, y)) + f' +[] +let main _argv = + let f: {typeAnnotation} -> {typeAnnotation} = memoize id + if f {callValue} = {callValue} then 0 else 1 +""" + + // --- TLR tests (#17607) --- + + [] + let ``Single inner let rec fires TLR`` (realsig: bool) = + """module Sample +let wrapper() = + let rec countdown(n) = + if n = 0 then 100 + else countdown(n - 1) + countdown(1000000) +[] +let main _argv = wrapper() +""" + |> compileAndAssertNoClosures realsig [ "static int32 countdown@" ] + |> ignore + + [] + let ``TLR inside generic class member`` (realsig: bool) = + """module Sample +type Container<'T>(initial: 'T) = + member _.Run() = + let rec a(n, v: 'T) = + if n = 0 then v + elif n % 2 = 0 then b(n - 1, v) + else a(n - 1, v) + and b(n, v: 'T) = + if n = 0 then v + elif n % 2 = 0 then b(n - 1, v) + else a(n - 1, v) + a(100, initial) +[] +let main _argv = + if Container(42).Run() = 42 then 0 else 1 +""" + |> compileAssertNoClosuresAndRun realsig [ "static !!T a@"; "static !!T b@" ] + + [] + let ``TLR with generic method on generic type`` (realsig: bool) = + """module Sample +type Processor<'T when 'T : struct>(value: 'T) = + member _.Transform<'U when 'U : equality>(input: 'U, expected: 'U) = + let rec apply(n, acc: 'U) = + if n <= 0 then acc = expected + else step(n, acc) + and step(n, acc: 'U) = + apply(n - 1, acc) + apply(100, input) +[] +let main _argv = + if Processor(1).Transform("hello", "hello") then 0 else 1 +""" + |> compileAssertNoClosuresAndRun realsig [ "static bool apply@"; "static bool step@"; "!!U" ] + + [] + let ``Three-way mutual recursion`` (realsig: bool) = + """module Sample +let run() = + let rec a(n) = + if n = 0 then 100 + elif n % 3 = 0 then b(n - 1) + elif n % 3 = 1 then c(n - 1) + else a(n - 1) + and b(n) = + if n = 0 then 101 else a(n - 1) + and c(n) = + if n = 0 then 102 else b(n - 1) + a(1000) +[] +let main _argv = run() +""" + |> compileAssertNoClosuresAndRun realsig [ "static int32 a@"; "static int32 b@"; "static int32 c@" ] + + [] + let ``TLR in nested module`` (realsig: bool) = + """module Outer +module Inner = + let run() = + let rec a(n) = + if n = 0 then 100 + elif n % 2 = 0 then b(n - 1) + else a(n - 1) + and b(n) = + if n = 0 then 101 else a(n - 1) + a(1000) +[] +let main _argv = Inner.run() +""" + |> compileAssertNoClosuresAndRun realsig [ "static int32 a@"; "static int32 b@" ] + + // Regression for FS2014 duplicate generated method names across namespace-only files (see IlxGen.AllocValReprWithinExpr). + [] + let ``Namespace-level inner-rec in multiple files does not collide`` (realsig: bool) = + let src1 = """namespace Mine +type A() = + static member Run() = + let rec capture x = if x = 0 then 0 else capture (x - 1) + capture 10 + +type B() = + static member Run() = + let rec capture y = if y = 0 then 1 else capture (y - 1) + capture 20 +""" + let src2 = """namespace Mine +type C() = + static member Run() = + let rec capture z = if z = 0 then 2 else capture (z - 1) + capture 30 +""" + FSharp src1 + |> withAdditionalSourceFile (SourceCodeFileKind.Create("B.fs", src2)) + |> withRealInternalSignature realsig + |> asLibrary + |> withOptimize + |> compile + |> shouldSucceed + |> verifyILNotPresent [ "PrivateImplementationDetails" ] + + [] + let ``Value recursion is not broken by TLR`` (realsig: bool) = + """module Sample +let run() = + let rec values = [| 1; 2; 3 |] + and sum() = Array.sum values + sum() +[] +let main _argv = if run() = 6 then 0 else 1 +""" + |> compileOptimizedAndRun realsig + + [] + let ``Quotation body is not affected by TLR`` (realsig: bool) = + """module Sample +open Microsoft.FSharp.Quotations +open Microsoft.FSharp.Quotations.Patterns +let q : Expr = + <@ + let rec a(n) = + if n = 0 then 1 + elif n % 2 = 0 then b(n - 1) + else a(n - 1) + and b(n) = + if n = 0 then 2 + elif n % 2 = 0 then b(n - 1) + else a(n - 1) + a(100) + @> +[] +let main _argv = + match q.Raw with LetRecursive _ -> 0 | _ -> 1 +""" + |> compileOptimizedAndRun realsig + + // --- Constraint stripping tests (#14492) --- + + [] + let ``Issue 14492: Specialize override and T-suffix class have no constraints in IL`` (realsig: bool) = + let result = + closureWithConstraint "'a : not struct and 'a : equality" "obj.ReferenceEquals(a, b)" "string" "\"ok\"" + |> compileOptimized realsig + |> compile + |> shouldSucceed + + result |> verifyILPresent [ "object Specialize<" ] + result |> verifyILNotPresent [ "Specialize verifyILNotPresent [ "T5 curried params forces EraseClosures CASE 2a term-splitting, producing a D-suffixed nested type. + [] + let ``Issue 14492: >5 params chain produces D-suffix nested type (CASE 2a)`` (realsig: bool) = + let source = + """module Sample +open System +let inline worker<'a when 'a : not struct> (a: 'a) (b: 'a) : bool = obj.ReferenceEquals(a, b) +let inline tee f x = f x; x +let memoize (f: 'a -> 'b) = + let cell = ref None + let f' (x: 'a) (a2: 'a) (a3: 'a) (a4: 'a) (a5: 'a) (a6: 'a) = + match cell.Value with + | Some (k, v) when worker k x && worker a2 a3 -> v + | _ -> f (if worker a4 a5 then x else a6) |> tee (fun y -> cell.Value <- Some (x, y)) + f' +[] +let main _argv = + let g: string -> string -> string -> string -> string -> string -> string = memoize id + if g "ok" "ok" "ok" "ok" "ok" "ok" = "ok" then 0 else 1 +""" + + let result = source |> compileOptimized realsig |> compile |> shouldSucceed + + result |> verifyILPresent [ "memoize@8D<" ] + verifyPEAndRun result + + // --- Combined test (exercises both #17607 and #14492 together) --- + + // TLR inside generic class (#17607) + constrained inline inside closure (#14492). + [] + let ``Combined: TLR in generic class with constrained inline closure`` (realsig: bool) = + let result = + """module Sample +open System +let inline worker<'a when 'a : not struct> (a: 'a) (b: 'a) : bool = obj.ReferenceEquals(a, b) +type Cache<'T when 'T : not struct and 'T : equality>(initial: 'T) = + member _.Lookup(key: 'T) = + let memoize (f: 'a -> 'b) = + let cell = ref None + let f' (x: 'a) = + match cell.Value with + | Some (k, v) when worker k x -> v + | _ -> let v = f x in cell.Value <- Some (x, v); v + f' + let rec search n = + if n <= 0 then false + elif (memoize id) key = key then true + else check (n - 1) + and check n = search (n - 1) + search 10 +[] +let main _argv = + if Cache("test").Lookup("test") then 0 else 1 +""" + |> compileOptimized realsig |> compile |> shouldSucceed + + result |> verifyILPresent [ "static bool search@" ] + result |> verifyILNotPresent [ "Specialize compileOptimized realsig |> compileExeAndRun |> shouldSucceed |> ignore + + /// Module-private value + TLR-lifted inner-rec at module level. + /// Lifted helper lives in the same module class as `secret`, so access should hold. + [] + let ``Module-private value accessed from TLR-lifted inner-rec`` (realsig: bool) = + """module Sample +let private secret = 42 +let outer () = + let rec h n = if n = 0 then secret else h (n - 1) + h 10 +[] +let main _ = if outer() = 42 then 0 else 1 +""" + |> compileRunSucceeds realsig + + /// Type-private static accessed from inner-rec inside a member of the same class. + /// Under realsig+, `C.Secret` is IL-private to `C`; the lifted helper is routed to + /// the per-file InitClass (different IL type). Demonstrates routing must preserve + /// access — would `MethodAccessException` if the lift's IL accessibility were wrong. + [] + let ``Type-private static accessed from TLR-lifted inner-rec inside same type`` (realsig: bool) = + """module Sample +type C() = + static member private Secret = 42 + static member Run() = + let rec h n = if n = 0 then C.Secret else h (n - 1) + h 10 +[] +let main _ = if C.Run() = 42 then 0 else 1 +""" + |> compileRunSucceeds realsig + + /// Private DU + structural compare (Match01-shape). The compiler-generated + /// `CompareTo$cont` continuation is lifted out of the DU type to the module class; + /// case fields are source-private. Would `FieldAccessException` if visibility leaked. + [] + let ``Private DU structural compare via TLR-lifted continuation`` (realsig: bool) = + """module Sample +type private DU = A of int | B of int +[] +let main _ = + let cmp (x: DU) (y: DU) = compare x y + if cmp (A 1) (A 1) = 0 && cmp (A 1) (B 1) <> 0 then 0 else 1 +""" + |> compileRunSucceeds realsig + + /// Generic + private nested type captured by a TLR-lifted inner-rec. + /// Lifted helper's signature mentions the private generic type — would + /// `TypeAccessException` on JIT/load if visibility were not preserved. + [] + let ``Generic + private nested type captured by TLR-lifted inner-rec`` (realsig: bool) = + """module Sample +type private Box<'T> = { mutable v: 'T } +[] +let main _ = + let outer (b: Box) = + let rec h n = if n = 0 then b.v else h (n - 1) + h 10 + let b = { v = 42 } + if outer b = 42 then 0 else 1 +""" + |> compileRunSucceeds realsig + + /// Generic class with type-private static accessed from TLR-lifted inner-rec + /// inside an instance member. Adversarial wave 2 (opus 4.8 attempt 20) — confirmed + /// `MethodAccessException` before the SelectTLRVals private-ref guard. + [] + let ``Type-private static of generic class accessed from TLR-lifted inner-rec`` (realsig: bool) = + """module Sample +type Holder<'T>() = + static let secret = 42 + static member private Secret = secret + member _.Run() = + let rec h n = if n = 0 then Holder<'T>.Secret else h (n - 1) + h 5 +[] +let main _ = if Holder().Run() = 42 then 0 else 1 +""" + |> compileRunSucceeds realsig + + /// Same shape as above but the private member reads a mutable backing field, + /// proving the failure is a CLR access check at the call site rather than + /// constant folding. Adversarial wave 2 (opus 4.8 attempt 24). + [] + let ``Type-private static (mutable backing) of generic class accessed from TLR-lifted inner-rec`` (realsig: bool) = + """module Sample +type Holder<'T>() = + static let mutable backing = 0 + static member Set v = backing <- v + static member private Secret = backing + 1 + member _.Run() = + let rec h n = if n = 0 then Holder<'T>.Secret else h (n - 1) + h 5 +[] +let main _ = + Holder.Set 41 + if Holder().Run() = 42 then 0 else 1 +""" + |> compileRunSucceeds realsig diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction06.fs.RealInternalSignatureOn.OptimizeOn.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction06.fs.RealInternalSignatureOn.OptimizeOn.il.bsl index fa8c139a871..43d92d119f3 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction06.fs.RealInternalSignatureOn.OptimizeOn.il.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction06.fs.RealInternalSignatureOn.OptimizeOn.il.bsl @@ -38,54 +38,6 @@ extends [runtime]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 auto ansi serializable sealed nested assembly beforefieldinit f@11 - extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 - { - .field static assembly initonly class assembly/f@11 @_instance - .method assembly specialname rtspecialname instance void .ctor() cil managed - { - .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) - - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::.ctor() - IL_0006: ret - } - - .method public strict virtual instance int32 Invoke(class [FSharp.Core]Microsoft.FSharp.Core.Unit unitVar0) cil managed - { - - .maxstack 6 - .locals init (int32 V_0, - class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4 V_1) - IL_0000: call int32 assembly::TestFunction1() - IL_0005: stloc.0 - IL_0006: ldstr "Hello" - IL_000b: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5::.ctor(string) - IL_0010: stloc.1 - IL_0011: call class [netstandard]System.IO.TextWriter [netstandard]System.Console::get_Out() - IL_0016: ldloc.1 - IL_0017: call !!0 [FSharp.Core]Microsoft.FSharp.Core.PrintfModule::PrintFormatLineToTextWriter(class [runtime]System.IO.TextWriter, - class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) - IL_001c: pop - IL_001d: ldloc.0 - IL_001e: ldloc.0 - IL_001f: add - IL_0020: ret - } - - .method private specialname rtspecialname static void .cctor() cil managed - { - - .maxstack 10 - IL_0000: newobj instance void assembly/f@11::.ctor() - IL_0005: stsfld class assembly/f@11 assembly/f@11::@_instance - IL_000a: ret - } - - } - .method public static int32 TestFunction1() cil managed { @@ -114,18 +66,35 @@ .method public static int32 TestFunction6() cil managed { - .maxstack 5 - .locals init (class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 V_0) - IL_0000: ldsfld class assembly/f@11 assembly/f@11::@_instance + .maxstack 8 + IL_0000: ldnull + IL_0001: call int32 assembly::f@10(class [FSharp.Core]Microsoft.FSharp.Core.Unit) + IL_0006: ldnull + IL_0007: call int32 assembly::f@10(class [FSharp.Core]Microsoft.FSharp.Core.Unit) + IL_000c: add + IL_000d: ret + } + + .method assembly static int32 f@10(class [FSharp.Core]Microsoft.FSharp.Core.Unit unitVar0) cil managed + { + + .maxstack 4 + .locals init (int32 V_0, + class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4 V_1) + IL_0000: call int32 assembly::TestFunction1() IL_0005: stloc.0 - IL_0006: ldloc.0 - IL_0007: ldnull - IL_0008: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) - IL_000d: ldloc.0 - IL_000e: ldnull - IL_000f: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) - IL_0014: add - IL_0015: ret + IL_0006: ldstr "Hello" + IL_000b: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5::.ctor(string) + IL_0010: stloc.1 + IL_0011: call class [netstandard]System.IO.TextWriter [netstandard]System.Console::get_Out() + IL_0016: ldloc.1 + IL_0017: call !!0 [FSharp.Core]Microsoft.FSharp.Core.PrintfModule::PrintFormatLineToTextWriter(class [runtime]System.IO.TextWriter, + class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_001c: pop + IL_001d: ldloc.0 + IL_001e: ldloc.0 + IL_001f: add + IL_0020: ret } } @@ -147,4 +116,3 @@ - diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction23.fs.RealInternalSignatureOn.OptimizeOn.il.net472.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction23.fs.RealInternalSignatureOn.OptimizeOn.il.net472.bsl index f4f126bbc5b..43b4d63535e 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction23.fs.RealInternalSignatureOn.OptimizeOn.il.net472.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction23.fs.RealInternalSignatureOn.OptimizeOn.il.net472.bsl @@ -1,26 +1,21 @@ - - - - - .assembly extern runtime { } .assembly extern FSharp.Core { } .assembly extern netstandard { - .publickeytoken = (CC 7B 13 FF CD 2D DD 51 ) - .ver 2:1:0:0 +.publickeytoken = (CC 7B 13 FF CD 2D DD 51 ) +.ver 2:1:0:0 } .assembly assembly { - .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 ) +.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 ) + + - - - .hash algorithm 0x00008004 - .ver 0:0:0:0 +.hash algorithm 0x00008004 +.ver 0:0:0:0 } .module assembly.exe @@ -35,142 +30,109 @@ .class public abstract auto ansi sealed assembly - extends [runtime]System.Object +extends [runtime]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 auto ansi serializable nested public C +extends [runtime]System.Object +{ +.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 assembly string x +.field assembly string x@8 +.method public specialname rtspecialname instance void .ctor() cil managed { - .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 auto ansi serializable nested public C - extends [runtime]System.Object - { - .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 assembly string x - .field assembly string x@8 - .method public specialname rtspecialname instance void .ctor() cil managed - { - - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: callvirt instance void [runtime]System.Object::.ctor() - IL_0006: ldarg.0 - IL_0007: pop - IL_0008: ldarg.0 - IL_0009: call string [runtime]System.Console::ReadLine() - IL_000e: stfld string assembly/C::x - IL_0013: ldarg.0 - IL_0014: call string [runtime]System.Console::ReadLine() - IL_0019: stfld string assembly/C::x@8 - IL_001e: ret - } - - .method public hidebysig instance string M() cil managed - { - - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: ldfld string assembly/C::x@8 - IL_0006: ldarg.0 - IL_0007: callvirt instance string assembly/C::g() - IL_000c: call string [runtime]System.String::Concat(string, - string) - IL_0011: ret - } - - .method assembly hidebysig instance string g() cil managed - { - .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: ldfld string assembly/C::x - IL_0006: ret - } - - } - - .class auto ansi serializable sealed nested assembly beforefieldinit g@13 - extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 - { - .field static assembly initonly class assembly/g@13 @_instance - .method assembly specialname rtspecialname instance void .ctor() cil managed - { - .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) - - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::.ctor() - IL_0006: ret - } - - .method public strict virtual instance class [FSharp.Core]Microsoft.FSharp.Core.Unit Invoke(class [FSharp.Core]Microsoft.FSharp.Core.Unit unitVar0) cil managed - { - - .maxstack 6 - .locals init (class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4 V_0) - IL_0000: ldstr "Hello" - IL_0005: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5::.ctor(string) - IL_000a: stloc.0 - IL_000b: call class [netstandard]System.IO.TextWriter [netstandard]System.Console::get_Out() - IL_0010: ldloc.0 - IL_0011: call !!0 [FSharp.Core]Microsoft.FSharp.Core.PrintfModule::PrintFormatLineToTextWriter(class [runtime]System.IO.TextWriter, - class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) - IL_0016: pop - IL_0017: ldstr "Hello" - IL_001c: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5::.ctor(string) - IL_0021: stloc.0 - IL_0022: call class [netstandard]System.IO.TextWriter [netstandard]System.Console::get_Out() - IL_0027: ldloc.0 - IL_0028: tail. - IL_002a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.PrintfModule::PrintFormatLineToTextWriter(class [runtime]System.IO.TextWriter, - class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) - IL_002f: ret - } - - .method private specialname rtspecialname static void .cctor() cil managed - { - - .maxstack 10 - IL_0000: newobj instance void assembly/g@13::.ctor() - IL_0005: stsfld class assembly/g@13 assembly/g@13::@_instance - IL_000a: ret - } - - } - - .method public static class [runtime]System.Tuple`2 f(!!a x) cil managed - { - - .maxstack 5 - .locals init (class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 V_0) - IL_0000: ldsfld class assembly/g@13 assembly/g@13::@_instance - IL_0005: stloc.0 - IL_0006: ldloc.0 - IL_0007: ldnull - IL_0008: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) - IL_000d: ldloc.0 - IL_000e: ldnull - IL_000f: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) - IL_0014: newobj instance void class [runtime]System.Tuple`2::.ctor(!0, - !1) - IL_0019: ret - } +.maxstack 8 +IL_0000: ldarg.0 +IL_0001: callvirt instance void [runtime]System.Object::.ctor() +IL_0006: ldarg.0 +IL_0007: pop +IL_0008: ldarg.0 +IL_0009: call string [runtime]System.Console::ReadLine() +IL_000e: stfld string assembly/C::x +IL_0013: ldarg.0 +IL_0014: call string [runtime]System.Console::ReadLine() +IL_0019: stfld string assembly/C::x@8 +IL_001e: ret } -.class private abstract auto ansi sealed ''.$assembly - extends [runtime]System.Object +.method public hidebysig instance string M() cil managed { - .method public static void main@() cil managed - { - .entrypoint - - .maxstack 8 - IL_0000: ret - } +.maxstack 8 +IL_0000: ldarg.0 +IL_0001: ldfld string assembly/C::x@8 +IL_0006: ldarg.0 +IL_0007: callvirt instance string assembly/C::g() +IL_000c: call string [runtime]System.String::Concat(string, +string) +IL_0011: ret } +.method assembly hidebysig instance string g() cil managed +{ +.custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) +.maxstack 8 +IL_0000: ldarg.0 +IL_0001: ldfld string assembly/C::x +IL_0006: ret +} +} +.method public static class [runtime]System.Tuple`2 f(!!a x) cil managed +{ +.maxstack 8 +IL_0000: ldnull +IL_0001: call void assembly::g@12(class [FSharp.Core]Microsoft.FSharp.Core.Unit) +IL_0006: nop +IL_0007: ldnull +IL_0008: ldnull +IL_0009: call void assembly::g@12(class [FSharp.Core]Microsoft.FSharp.Core.Unit) +IL_000e: nop +IL_000f: ldnull +IL_0010: newobj instance void class [runtime]System.Tuple`2::.ctor(!0, +!1) +IL_0015: ret +} + +.method assembly static void g@12(class [FSharp.Core]Microsoft.FSharp.Core.Unit unitVar0) cil managed +{ + +.maxstack 4 +.locals init (class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4 V_0) +IL_0000: ldstr "Hello" +IL_0005: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5::.ctor(string) +IL_000a: stloc.0 +IL_000b: call class [netstandard]System.IO.TextWriter [netstandard]System.Console::get_Out() +IL_0010: ldloc.0 +IL_0011: call !!0 [FSharp.Core]Microsoft.FSharp.Core.PrintfModule::PrintFormatLineToTextWriter(class [runtime]System.IO.TextWriter, +class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) +IL_0016: pop +IL_0017: ldstr "Hello" +IL_001c: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5::.ctor(string) +IL_0021: stloc.0 +IL_0022: call class [netstandard]System.IO.TextWriter [netstandard]System.Console::get_Out() +IL_0027: ldloc.0 +IL_0028: call !!0 [FSharp.Core]Microsoft.FSharp.Core.PrintfModule::PrintFormatLineToTextWriter(class [runtime]System.IO.TextWriter, +class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) +IL_002d: pop +IL_002e: ret +} + +} + +.class private abstract auto ansi sealed ''.$assembly +extends [runtime]System.Object +{ +.method public static void main@() cil managed +{ +.entrypoint + +.maxstack 8 +IL_0000: ret +} +} \ No newline at end of file diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction23.fs.RealInternalSignatureOn.OptimizeOn.il.netcore.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction23.fs.RealInternalSignatureOn.OptimizeOn.il.netcore.bsl index 422674eeb50..82a314e85a7 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction23.fs.RealInternalSignatureOn.OptimizeOn.il.netcore.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction23.fs.RealInternalSignatureOn.OptimizeOn.il.netcore.bsl @@ -5,12 +5,12 @@ .assembly extern runtime { } .assembly extern FSharp.Core { } -.assembly extern runtime { } .assembly extern netstandard { .publickeytoken = (CC 7B 13 FF CD 2D DD 51 ) .ver 2:1:0:0 } +.assembly extern runtime { } .assembly assembly { .custom instance void [FSharp.Core]Microsoft.FSharp.Core.FSharpInterfaceDataVersionAttribute::.ctor(int32, @@ -87,72 +87,45 @@ } - .class auto ansi serializable sealed nested assembly beforefieldinit g@13 - extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 - { - .field static assembly initonly class assembly/g@13 @_instance - .method assembly specialname rtspecialname instance void .ctor() cil managed - { - .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) - - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::.ctor() - IL_0006: ret - } - - .method public strict virtual instance class [FSharp.Core]Microsoft.FSharp.Core.Unit Invoke(class [FSharp.Core]Microsoft.FSharp.Core.Unit unitVar0) cil managed - { - - .maxstack 6 - .locals init (class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4 V_0) - IL_0000: ldstr "Hello" - IL_0005: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5::.ctor(string) - IL_000a: stloc.0 - IL_000b: call class [netstandard]System.IO.TextWriter [netstandard]System.Console::get_Out() - IL_0010: ldloc.0 - IL_0011: call !!0 [FSharp.Core]Microsoft.FSharp.Core.PrintfModule::PrintFormatLineToTextWriter(class [runtime]System.IO.TextWriter, - class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) - IL_0016: pop - IL_0017: ldstr "Hello" - IL_001c: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5::.ctor(string) - IL_0021: stloc.0 - IL_0022: call class [netstandard]System.IO.TextWriter [netstandard]System.Console::get_Out() - IL_0027: ldloc.0 - IL_0028: tail. - IL_002a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.PrintfModule::PrintFormatLineToTextWriter(class [runtime]System.IO.TextWriter, - class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) - IL_002f: ret - } - - .method private specialname rtspecialname static void .cctor() cil managed - { - - .maxstack 10 - IL_0000: newobj instance void assembly/g@13::.ctor() - IL_0005: stsfld class assembly/g@13 assembly/g@13::@_instance - IL_000a: ret - } - - } - .method public static class [runtime]System.Tuple`2 f(!!a x) cil managed { - .maxstack 5 - .locals init (class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 V_0) - IL_0000: ldsfld class assembly/g@13 assembly/g@13::@_instance - IL_0005: stloc.0 - IL_0006: ldloc.0 + .maxstack 8 + IL_0000: ldnull + IL_0001: call void assembly::g@12(class [FSharp.Core]Microsoft.FSharp.Core.Unit) + IL_0006: nop IL_0007: ldnull - IL_0008: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) - IL_000d: ldloc.0 - IL_000e: ldnull - IL_000f: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) - IL_0014: newobj instance void class [runtime]System.Tuple`2::.ctor(!0, + IL_0008: ldnull + IL_0009: call void assembly::g@12(class [FSharp.Core]Microsoft.FSharp.Core.Unit) + IL_000e: nop + IL_000f: ldnull + IL_0010: newobj instance void class [runtime]System.Tuple`2::.ctor(!0, !1) - IL_0019: ret + IL_0015: ret + } + + .method assembly static void g@12(class [FSharp.Core]Microsoft.FSharp.Core.Unit unitVar0) cil managed + { + + .maxstack 4 + .locals init (class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4 V_0) + IL_0000: ldstr "Hello" + IL_0005: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5::.ctor(string) + IL_000a: stloc.0 + IL_000b: call class [netstandard]System.IO.TextWriter [netstandard]System.Console::get_Out() + IL_0010: ldloc.0 + IL_0011: call !!0 [FSharp.Core]Microsoft.FSharp.Core.PrintfModule::PrintFormatLineToTextWriter(class [runtime]System.IO.TextWriter, + class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_0016: pop + IL_0017: ldstr "Hello" + IL_001c: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5::.ctor(string) + IL_0021: stloc.0 + IL_0022: call class [netstandard]System.IO.TextWriter [netstandard]System.Console::get_Out() + IL_0027: ldloc.0 + IL_0028: call !!0 [FSharp.Core]Microsoft.FSharp.Core.PrintfModule::PrintFormatLineToTextWriter(class [runtime]System.IO.TextWriter, + class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_002d: pop + IL_002e: ret } } @@ -174,4 +147,3 @@ - diff --git a/tests/FSharp.Compiler.ComponentTests/FSharp.Compiler.ComponentTests.fsproj b/tests/FSharp.Compiler.ComponentTests/FSharp.Compiler.ComponentTests.fsproj index 954c02b8aca..6d27166fc6c 100644 --- a/tests/FSharp.Compiler.ComponentTests/FSharp.Compiler.ComponentTests.fsproj +++ b/tests/FSharp.Compiler.ComponentTests/FSharp.Compiler.ComponentTests.fsproj @@ -264,6 +264,9 @@ + + + diff --git a/tests/FSharp.Compiler.ComponentTests/Signatures/TypeTests.fs b/tests/FSharp.Compiler.ComponentTests/Signatures/TypeTests.fs index d8317ff8e92..38ca5c26ee0 100644 --- a/tests/FSharp.Compiler.ComponentTests/Signatures/TypeTests.fs +++ b/tests/FSharp.Compiler.ComponentTests/Signatures/TypeTests.fs @@ -344,7 +344,7 @@ type GenericType<'X> with one |> withAdditionalSourceFiles [ two; three ] |> compile - |> verifyILContains [ ".Print" ] + |> verifyILPresent [ ".Print" ] // https://github.com/dotnet/fsharp/issues/14310 [] @@ -990,9 +990,9 @@ let test() = |> shouldSucceed |> ignore -// Verify M(()) and M() produce identical IL method signatures +// Regression for #19615: M(()) emits explicit Unit argument, distinct from a no-arg M(). [] -let ``Unit param - M(()) and M() produce same IL method signature`` () = +let ``Unit param - M(()) emits Unit argument distinct from M(int)`` () = FSharp """ module Test type D() = @@ -1001,8 +1001,7 @@ type D() = """ |> compile |> shouldSucceed - |> verifyILContains [ - ".method public hidebysig instance int32 M() cil managed" + |> verifyILPresent [ + ".method public hidebysig instance int32 M(class [FSharp.Core]Microsoft.FSharp.Core.Unit _arg1) cil managed" ".method public hidebysig instance int32 M(int32 y) cil managed" ] - |> ignore diff --git a/tests/FSharp.Test.Utilities/Compiler.fs b/tests/FSharp.Test.Utilities/Compiler.fs index 86f760a3bee..b1c431aa0c8 100644 --- a/tests/FSharp.Test.Utilities/Compiler.fs +++ b/tests/FSharp.Test.Utilities/Compiler.fs @@ -1342,8 +1342,7 @@ $ code --diff {outFile} {expectedFile} | Some p -> match ILChecker.verifyILAndReturnActual [] p expected with | true, _, _ -> result - | false, errorMsg, _actualIL -> - CompilationResult.Failure( {s with Output = Some (ExecutionOutput {Outcome = NoExitCode; StdOut = errorMsg; StdErr = ""})} ) + | false, errorMsg, _actualIL -> failwith $"IL verification failed:\n{errorMsg}" | CompilationResult.Failure f -> printfn "Failure:" printfn $"{f}" @@ -1351,6 +1350,8 @@ $ code --diff {outFile} {expectedFile} let verifyIL = doILCheck ILChecker.checkIL + let verifyILPresent = doILCheck ILChecker.checkILPresent + let verifyILNotPresent = doILCheck ILChecker.checkILNotPresent /// Verifies that the compiled assembly contains an assembly reference whose name starts with the given prefix. diff --git a/tests/FSharp.Test.Utilities/ILChecker.fs b/tests/FSharp.Test.Utilities/ILChecker.fs index a9ec56ccc67..24ff56e0587 100644 --- a/tests/FSharp.Test.Utilities/ILChecker.fs +++ b/tests/FSharp.Test.Utilities/ILChecker.fs @@ -65,12 +65,17 @@ module ILChecker = let unifyImageBase ilCode = replace ilCode ("\.imagebase\s*0x\d*", ".imagebase {value}") + // Normalize ildasm's platform-specific `ldc.r8 10` vs `ldc.r8 10.` for plain-integer doubles. + let unifyFloatLiterals ilCode = + Regex.Replace(ilCode, "(ldc\.r8\s+-?\d+)(\s|$)", "$1.$2", RegexOptions.Multiline) + let unifyingAssemblyNames (text: string) = match assemblyName with | Some name -> text.Replace(name, "assembly") | None -> text |> unifyRuntimeAssemblyName |> unifyImageBase + |> unifyFloatLiterals let stripManagedResources (text: string) = let result = Regex.Replace(text, "\.mresource public .*\r?\n{\s*}\r?\n", "", RegexOptions.Multiline) @@ -195,19 +200,25 @@ module ILChecker = let verifyILAndReturnActual args dllFilePath expectedIL = checkILPrim args dllFilePath expectedIL - let checkILNotPresent dllFilePath unexpectedIL = + let private checkILFragments shouldBePresent dllFilePath fragments = let actualIL = generateIL dllFilePath [] - if unexpectedIL = [] then - Assert.Fail $"No unexpected IL given. This is actual IL: \n{actualIL}" + if fragments = [] then + Assert.Fail $"No IL fragments given. This is actual IL: \n{actualIL}" + let label = if shouldBePresent then "Not found in" else "Found in" + let isError (fragment: string) = actualIL.Contains(fragment) <> shouldBePresent let errors = - unexpectedIL + fragments |> Seq.map (normalizeILText None) - |> Seq.filter actualIL.Contains - |> Seq.map (sprintf "Found in actual IL: '%s'") + |> Seq.filter isError + |> Seq.map (sprintf "%s actual IL: '%s'" label) |> String.concat "\n" if errors <> "" then Assert.Fail $"{errors}\n\n\nEntire actual:\n{actualIL}" + let checkILNotPresent dllFilePath unexpectedIL = checkILFragments false dllFilePath unexpectedIL + + let checkILPresent dllFilePath expectedIL = checkILFragments true dllFilePath expectedIL + let reassembleIL ilFilePath dllFilePath = let ilasmPath = config.ILASM let _, _, errors = exec ilasmPath [ $"%s{ilFilePath} /output=%s{dllFilePath} /dll" ]