diff --git a/src/Compiler/AbstractIL/il.fs b/src/Compiler/AbstractIL/il.fs index 2a80d40fdce..363004b2ff6 100644 --- a/src/Compiler/AbstractIL/il.fs +++ b/src/Compiler/AbstractIL/il.fs @@ -3292,6 +3292,12 @@ let destILArrTy ty = [] let tname_Attribute = "System.Attribute" +[] +let tname_Enum = "System.Enum" + +[] +let tname_SealedAttribute = "System.SealedAttribute" + [] let tname_Object = "System.Object" @@ -3367,6 +3373,10 @@ type ILGlobals(primaryScopeRef: ILScopeRef, equivPrimaryAssemblyRefs: ILAssembly member val typ_Attribute = mkILBoxedType (mkILNonGenericTySpec (mkSysILTypeRef tname_Attribute)) + member val typ_Enum = mkILBoxedType (mkILNonGenericTySpec (mkSysILTypeRef tname_Enum)) + + member val typ_SealedAttribute = mkILBoxedType (mkILNonGenericTySpec (mkSysILTypeRef tname_SealedAttribute)) + member val typ_Object = mkILBoxedType (mkILNonGenericTySpec (mkSysILTypeRef tname_Object)) member val typ_String = mkILBoxedType (mkILNonGenericTySpec (mkSysILTypeRef tname_String)) @@ -3985,6 +3995,9 @@ let mkILInstanceField (nm, ty, init, access) = let mkILStaticField (nm, ty, init, at, access) = mkILField (true, nm, ty, init, at, access, false) +let mkILStaticLiteralField (nm, ty, init, at, access) = + mkILField (true, nm, ty, Some init, at, access, true) + let mkILLiteralField (nm, ty, init, at, access) = mkILField (true, nm, ty, Some init, at, access, true) diff --git a/src/Compiler/AbstractIL/il.fsi b/src/Compiler/AbstractIL/il.fsi index ef467fa9731..13ba8e13d80 100644 --- a/src/Compiler/AbstractIL/il.fsi +++ b/src/Compiler/AbstractIL/il.fsi @@ -1815,7 +1815,10 @@ type internal ILGlobals = member primaryAssemblyScopeRef: ILScopeRef member primaryAssemblyRef: ILAssemblyRef member primaryAssemblyName: string + member fsharpCoreAssemblyScopeRef: ILScopeRef + member typ_Attribute: ILType + member typ_Enum: ILType member typ_Object: ILType member typ_String: ILType member typ_Type: ILType @@ -1834,10 +1837,9 @@ type internal ILGlobals = member typ_Double: ILType member typ_Bool: ILType member typ_Char: ILType + member typ_SealedAttribute: ILType member typ_TypedReference: ILType - member fsharpCoreAssemblyScopeRef: ILScopeRef - /// Is the given assembly possibly a primary assembly? /// In practice, a primary assembly is an assembly that contains the System.Object type definition /// and has no referenced assemblies. @@ -2051,6 +2053,7 @@ val internal mkILNonGenericInstanceMethod: /// Make field definitions. val internal mkILInstanceField: string * ILType * ILFieldInit option * ILMemberAccess -> ILFieldDef val internal mkILStaticField: string * ILType * ILFieldInit option * byte[] option * ILMemberAccess -> ILFieldDef +val internal mkILStaticLiteralField: string * ILType * ILFieldInit * byte[] option * ILMemberAccess -> ILFieldDef val internal mkILLiteralField: string * ILType * ILFieldInit * byte[] option * ILMemberAccess -> ILFieldDef /// Make a type definition. diff --git a/src/Compiler/CodeGen/IlxGen.fs b/src/Compiler/CodeGen/IlxGen.fs index 094f9dee50e..62125570cf2 100644 --- a/src/Compiler/CodeGen/IlxGen.fs +++ b/src/Compiler/CodeGen/IlxGen.fs @@ -73,7 +73,7 @@ let iLdcDouble i = AI_ldc(DT_R8, ILConst.R8 i) let iLdcSingle i = AI_ldc(DT_R4, ILConst.R4 i) /// Make a method that simply loads a field -let mkLdfldMethodDef (ilMethName, reprAccess, isStatic, ilTy, ilFieldName, ilPropType, customAttrs) = +let mkLdfldMethodDef (ilMethName, iLAccess, isStatic, ilTy, ilFieldName, ilPropType, customAttrs) = let ilFieldSpec = mkILFieldSpecInTy (ilTy, ilFieldName, ilPropType) let ilReturn = mkILReturn ilPropType @@ -82,12 +82,33 @@ let mkLdfldMethodDef (ilMethName, reprAccess, isStatic, ilTy, ilFieldName, ilPro let body = mkMethodBody (true, [], 2, nonBranchingInstrsToCode [ mkNormalLdsfld ilFieldSpec ], None, None) - mkILNonGenericStaticMethod (ilMethName, reprAccess, [], ilReturn, body) + mkILNonGenericStaticMethod (ilMethName, iLAccess, [], ilReturn, body) else let body = mkMethodBody (true, [], 2, nonBranchingInstrsToCode [ mkLdarg0; mkNormalLdfld ilFieldSpec ], None, None) - mkILNonGenericInstanceMethod (ilMethName, reprAccess, [], ilReturn, body) + mkILNonGenericInstanceMethod (ilMethName, iLAccess, [], ilReturn, body) + + ilMethodDef.With(customAttrs = mkILCustomAttrs customAttrs).WithSpecialName + +/// Make a method that simply stores a field +let mkStsfldMethodDef (ilMethName, iLAccess, isStatic, ilTy, ilFieldName, ilPropType, customAttrs) = + let ilFieldSpec = mkILFieldSpecInTy (ilTy, ilFieldName, ilPropType) + let ilParams = [ mkILParamNamed ("value", ilPropType) ] + let ilReturn = mkILReturn ILType.Void + + let ilMethodDef = + if isStatic then + let body = + mkMethodBody (true, [], 2, nonBranchingInstrsToCode [ mkLdarg0; mkNormalStsfld ilFieldSpec ], None, None) + + mkILNonGenericStaticMethod (ilMethName, iLAccess, ilParams, ilReturn, body) + + else + let body = + mkMethodBody (true, [], 2, nonBranchingInstrsToCode [ mkLdarg0; mkLdarg 1us; mkNormalStfld ilFieldSpec ], None, None) + + mkILNonGenericInstanceMethod (ilMethName, iLAccess, ilParams, ilReturn, body) ilMethodDef.With(customAttrs = mkILCustomAttrs customAttrs).WithSpecialName @@ -582,6 +603,135 @@ type TypeReprEnv(reprs: Map, count: int, templateReplacement: (Ty /// Get the environment for generating a reference to items within a type definition member eenv.ForTyconRef(tcref: TyconRef) = eenv.ForTycon tcref.Deref +//-------------------------------------------------------------------------- +// Generate Local embeddable versions of framework types when necessary +//-------------------------------------------------------------------------- + +let mkFlagsAttribute cenv = + mkILCustomAttribute (cenv.g.attrib_FlagsAttribute.TypeRef, [], [], []) + +let mkLocalPrivateAttributeWithDefaultConstructor (cenv: cenv, name: string) = + let g = cenv.g + + let ilMethods = + mkILMethods + [ + g.AddMethodGeneratedAttributes(mkILNonGenericEmptyCtor (g.ilg.typ_Attribute, None, None)) + ] + + mkILGenericClass ( + name, + ILTypeDefAccess.Private, + ILGenericParameterDefs.Empty, + g.ilg.typ_Attribute, + ILTypes.Empty, + ilMethods, + emptyILFields, + emptyILTypeDefs, + emptyILProperties, + emptyILEvents, + emptyILCustomAttrs, + ILTypeInit.BeforeField + ) + +let mkILNonGenericInstanceProperty (name, ilTypeRef, ilType, propertyAttribute, customAttributes) = + ILPropertyDef( + name = name, + attributes = propertyAttribute, + setMethod = Some(mkILMethRef (ilTypeRef, ILCallingConv.Instance, "set_" + name, 0, [ ilType ], ILType.Void)), + getMethod = Some(mkILMethRef (ilTypeRef, ILCallingConv.Instance, "get_" + name, 0, [], ilType)), + callingConv = ILThisConvention.Instance, + propertyType = ilType, + init = None, + args = [], + customAttrs = customAttributes + ) + +let mkLocalPrivateAttributeWithPropertyConstructors (cenv, name: string, attrProperties: (string * ILType) list option) = + let ilTypeRef = mkILTyRef (ILScopeRef.Local, name) + let ilTy = mkILFormalNamedTy ILBoxity.AsObject ilTypeRef [] + + let ilElements = + attrProperties + |> Option.defaultValue [] + |> List.map (fun (name, ilType) -> + let fieldName = name + "@" + + (cenv.g.AddFieldGeneratedAttributes(mkILInstanceField (fieldName, ilType, None, ILMemberAccess.Private))), + (cenv.g.AddMethodGeneratedAttributes( + mkLdfldMethodDef ($"get_{name}", ILMemberAccess.Public, false, ilTy, fieldName, ilType, []) + )), + (cenv.g.AddMethodGeneratedAttributes( + mkStsfldMethodDef ($"set_{name}", ILMemberAccess.Private, false, ilTy, fieldName, ilType, []) + )), + (cenv.g.AddPropertyGeneratedAttributes( + mkILNonGenericInstanceProperty (name, ilTypeRef, ilType, PropertyAttributes.None, emptyILCustomAttrs) + )), + (name, fieldName, ilType)) + + // Generate constructor with required arguments + let ilCtorDef = + cenv.g.AddMethodGeneratedAttributes( + mkILSimpleStorageCtorWithParamNames ( + Some cenv.g.ilg.typ_Attribute.TypeSpec, + ilTy, + [], + (ilElements |> List.map (fun (_, _, _, _, fieldInfo) -> fieldInfo)), + ILMemberAccess.Public, + None, + None + ) + ) + + mkILGenericClass ( + name, + ILTypeDefAccess.Private, + ILGenericParameterDefs.Empty, + cenv.g.ilg.typ_Attribute, + ILTypes.Empty, + mkILMethods ( + ilCtorDef + :: (ilElements + |> List.fold (fun acc (_, getter, setter, _, _) -> getter :: (setter :: acc)) []) + ), + mkILFields (ilElements |> List.map (fun (field, _, _, _, _) -> field)), + emptyILTypeDefs, + mkILProperties (ilElements |> List.map (fun (_, _, _, property, _) -> property)), + emptyILEvents, + emptyILCustomAttrs, + ILTypeInit.BeforeField + ) + +let mkLocalPrivateInt32Enum (cenv: cenv, tref: ILTypeRef, values: (string * int32) array) = + let g = cenv.g + let ilType = ILType.Value(mkILNonGenericTySpec (tref)) + + let enumFields = + values + |> Array.map (fun (name, value) -> mkILStaticLiteralField (name, ilType, ILFieldInit.Int32 value, None, ILMemberAccess.Public)) + |> Array.append + [| + (mkILInstanceField ("value__", g.ilg.typ_Int32, Some(ILFieldInit.Int32 0), ILMemberAccess.Public)) + .WithSpecialName(true) + |] + |> Array.toList + + mkILGenericClass( + tref.Name, + ILTypeDefAccess.Private, + ILGenericParameterDefs.Empty, + g.ilg.typ_Enum, + ILTypes.Empty, + mkILMethods [], + mkILFields enumFields, + emptyILTypeDefs, + emptyILProperties, + emptyILEvents, + g.AddGeneratedAttributes(mkILCustomAttrs [ mkFlagsAttribute cenv ]), + ILTypeInit.OnAny + ) + .WithSealed(true) + //-------------------------------------------------------------------------- // Generate type references //-------------------------------------------------------------------------- @@ -609,16 +759,77 @@ type PtrsOK = | PtrTypesOK | PtrTypesNotOK -let GenReadOnlyAttribute (g: TcGlobals) = - g.AddEmbeddableSystemAttribute(g.attrib_IsReadOnlyAttribute.TypeRef, [], [], []) +let GetReadOnlyAttribute cenv = + let g = cenv.g + let tref = g.attrib_IsReadOnlyAttribute.TypeRef + g.TryEmbedILType(tref, (fun () -> mkLocalPrivateAttributeWithDefaultConstructor (cenv, tref.Name))) + mkILCustomAttribute (g.attrib_IsReadOnlyAttribute.TypeRef, [], [], []) -let GenReadOnlyAttributeIfNecessary (g: TcGlobals) ty = - if isInByrefTy g ty then - let attr = GenReadOnlyAttribute g +let GenReadOnlyAttributeIfNecessary cenv ty = + if isInByrefTy cenv.g ty then + let attr = GetReadOnlyAttribute cenv Some attr else None +let GetDynamicallyAccessedMemberTypes cenv = + let tref = cenv.g.enum_DynamicallyAccessedMemberTypes.TypeRef + + if not (cenv.g.compilingFSharpCore) then + cenv.g.TryEmbedILType( + tref, + (fun () -> + let values = + [| + ("All", -1) + ("None", 0) + ("PublicParameterlessConstructor", 1) + ("PublicConstructors", 3) + ("NonPublicConstructors", 4) + ("PublicMethods", 8) + ("NonPublicMethods", 16) + ("PublicFields", 32) + ("NonPublicFields", 64) + ("PublicNestedTypes", 128) + ("NonPublicNestedTypes", 256) + ("PublicProperties", 512) + ("NonPublicProperties", 1024) + ("PublicEvents", 2048) + ("NonPublicEvents", 4096) + ("Interfaces", 8192) + |] + + mkLocalPrivateInt32Enum (cenv, tref, values)) + ) + + ILType.Value(mkILNonGenericTySpec (tref)) + +let GetDynamicDependencyAttribute cenv memberTypes ilType = + let tref = cenv.g.attrib_DynamicDependencyAttribute.TypeRef + + cenv.g.TryEmbedILType( + tref, + (fun () -> + let properties = + Some + [ + "MemberType", GetDynamicallyAccessedMemberTypes cenv + "Type", cenv.g.ilg.typ_Type + ] + + mkLocalPrivateAttributeWithPropertyConstructors (cenv, tref.Name, properties)) + ) + + let typIlMemberTypes = + ILType.Value(mkILNonGenericTySpec (cenv.g.enum_DynamicallyAccessedMemberTypes.TypeRef)) + + mkILCustomAttribute ( + tref, + [ typIlMemberTypes; cenv.g.ilg.typ_Type ], + [ ILAttribElem.Int32 memberTypes; ILAttribElem.Type(Some ilType) ], + [] + ) + /// Generate "modreq([mscorlib]System.Runtime.InteropServices.InAttribute)" on inref types. let GenReadOnlyModReqIfNecessary (g: TcGlobals) ty ilTy = let add = isInByrefTy g ty && g.attrib_InAttribute.TyconRef.CanDeref @@ -2088,7 +2299,7 @@ type AnonTypeGenerationTable() = let ilMethods = [ for propName, fldName, fldTy in flds -> - let attrs = if isStruct then [ GenReadOnlyAttribute g ] else [] + let attrs = if isStruct then [ GetReadOnlyAttribute cenv ] else [] mkLdfldMethodDef ("get_" + propName, ILMemberAccess.Public, false, ilTy, fldName, fldTy, attrs) |> g.AddMethodGeneratedAttributes @@ -5656,7 +5867,7 @@ and GenSlotParam m cenv eenv slotParam : ILParameter = let ilAttribs = GenAttrs cenv eenv attribs let ilAttribs = - match GenReadOnlyAttributeIfNecessary cenv.g ty with + match GenReadOnlyAttributeIfNecessary cenv ty with | Some attr -> ilAttribs @ [ attr ] | None -> ilAttribs @@ -5714,7 +5925,7 @@ and GenFormalReturnType m cenv eenvFormal returnTy : ILReturn = match returnTy with | None -> ilRet | Some ty -> - match GenReadOnlyAttributeIfNecessary cenv.g ty with + match GenReadOnlyAttributeIfNecessary cenv ty with | Some attr -> ilRet.WithCustomAttrs(mkILCustomAttrs (ilRet.CustomAttrs.AsList() @ [ attr ])) | None -> ilRet @@ -8761,7 +8972,7 @@ and GenParams let ilAttribs = GenAttrs cenv eenv attribs let ilAttribs = - match GenReadOnlyAttributeIfNecessary g methodArgTy with + match GenReadOnlyAttributeIfNecessary cenv methodArgTy with | Some attr -> ilAttribs @ [ attr ] | None -> ilAttribs @@ -8790,7 +9001,7 @@ and GenReturnInfo cenv eenv returnTy ilRetTy (retInfo: ArgReprInfo) : ILReturn = let ilAttribs = match returnTy with | Some retTy -> - match GenReadOnlyAttributeIfNecessary cenv.g retTy with + match GenReadOnlyAttributeIfNecessary cenv retTy with | Some attr -> ilAttribs @ [ attr ] | None -> ilAttribs | _ -> ilAttribs @@ -9127,7 +9338,7 @@ and GenMethodForBinding || memberInfo.MemberFlags.MemberKind = SynMemberKind.PropertySet || memberInfo.MemberFlags.MemberKind = SynMemberKind.PropertyGetSet -> - match GenReadOnlyAttributeIfNecessary g returnTy with + match GenReadOnlyAttributeIfNecessary cenv returnTy with | Some ilAttr -> ilAttr | _ -> () | _ -> () @@ -10377,7 +10588,7 @@ and GenAbstractBinding cenv eenv tref (vref: ValRef) = || memberInfo.MemberFlags.MemberKind = SynMemberKind.PropertySet || memberInfo.MemberFlags.MemberKind = SynMemberKind.PropertyGetSet -> - match GenReadOnlyAttributeIfNecessary g returnTy with + match GenReadOnlyAttributeIfNecessary cenv returnTy with | Some ilAttr -> ilAttr | _ -> () | _ -> () @@ -10893,7 +11104,7 @@ and GenTypeDef cenv mgbuf lazyInitInfo eenv m (tycon: Tycon) = let attrs = if isStruct && not isStatic then - [ GenReadOnlyAttribute g ] + [ GetReadOnlyAttribute cenv ] else [] @@ -11039,7 +11250,7 @@ and GenTypeDef cenv mgbuf lazyInitInfo eenv m (tycon: Tycon) = Some(g.ilg.typ_Object.TypeSpec) let ilMethodDef = - mkILSimpleStorageCtorWithParamNames ( + (mkILSimpleStorageCtorWithParamNames ( spec, ilThisTy, [], @@ -11047,7 +11258,17 @@ and GenTypeDef cenv mgbuf lazyInitInfo eenv m (tycon: Tycon) = reprAccess, None, eenv.imports - ) + )) + .With( + customAttrs = + mkILCustomAttrs + [ + GetDynamicDependencyAttribute + cenv + 0x660 (*Public and NonPublic Fields and Properties*) + ilThisTy + ] + ) yield ilMethodDef // FSharp 1.0 bug 1988: Explicitly setting the ComVisible(true) attribute on an F# type causes an F# record to be emitted in a way that enables mutation for COM interop scenarios diff --git a/src/Compiler/Driver/CreateILModule.fs b/src/Compiler/Driver/CreateILModule.fs index 95a60326df2..efcf212675b 100644 --- a/src/Compiler/Driver/CreateILModule.fs +++ b/src/Compiler/Driver/CreateILModule.fs @@ -304,7 +304,7 @@ module MainModuleBuilder = RequireCompilationThread ctok let ilTypeDefs = - mkILTypeDefs (codegenResults.ilTypeDefs @ tcGlobals.embeddedTypeDefs) + mkILTypeDefs (codegenResults.ilTypeDefs @ tcGlobals.tryRemoveEmbeddedILTypeDefs ()) let mainModule = let hashAlg = diff --git a/src/Compiler/Interactive/fsi.fs b/src/Compiler/Interactive/fsi.fs index c0d03d8474a..d4086d2822f 100644 --- a/src/Compiler/Interactive/fsi.fs +++ b/src/Compiler/Interactive/fsi.fs @@ -1426,8 +1426,9 @@ type internal FsiDynamicCompiler( /// Generate one assembly using multi-assembly emit let EmitInMemoryAssembly (tcConfig: TcConfig, emEnv: ILMultiInMemoryAssemblyEmitEnv, ilxMainModule: ILModuleDef) = + let embeddedTypes = tcGlobals.tryRemoveEmbeddedILTypeDefs() |> List.filter(fun tdef -> not(emEnv.IsLocalInternalType(mkRefForNestedILTypeDef ILScopeRef.Local ([], tdef)))) + let ilxMainModule = { ilxMainModule with TypeDefs = mkILTypeDefs (ilxMainModule.TypeDefs.AsList() @ embeddedTypes) } let multiAssemblyName = ilxMainModule.ManifestOfAssembly.Name - // Adjust the assembly name of this fragment, and add InternalsVisibleTo attributes to // allow internals access by all future assemblies with the same name (and only differing in version) let manifest = diff --git a/src/Compiler/TypedTree/TcGlobals.fs b/src/Compiler/TypedTree/TcGlobals.fs index b9bb006f317..77ba385c520 100755 --- a/src/Compiler/TypedTree/TcGlobals.fs +++ b/src/Compiler/TypedTree/TcGlobals.fs @@ -25,6 +25,7 @@ open FSharp.Compiler.TypedTree open FSharp.Compiler.TypedTreeBasics open Internal.Utilities +open System.Reflection let internal DummyFileNameForRangesWithoutASpecificLocation = startupFileName let private envRange = rangeN DummyFileNameForRangesWithoutASpecificLocation 0 @@ -162,6 +163,8 @@ let tname_ValueType = "System.ValueType" [] let tname_Enum = "System.Enum" [] +let tname_FlagsAttribute = "System.FlagsAttribute" +[] let tname_Array = "System.Array" [] let tname_RuntimeArgumentHandle = "System.RuntimeArgumentHandle" @@ -185,7 +188,6 @@ let tname_IAsyncResult = "System.IAsyncResult" let tname_IsByRefLikeAttribute = "System.Runtime.CompilerServices.IsByRefLikeAttribute" - //------------------------------------------------------------------------- // Table of all these "globals" //------------------------------------------------------------------------- @@ -860,8 +862,8 @@ type TcGlobals( let v_check_this_info = makeIntrinsicValRef(fslib_MFIntrinsicFunctions_nleref, "CheckThis" , None , None , [vara], ([[varaTy]], varaTy)) let v_quote_to_linq_lambda_info = makeIntrinsicValRef(fslib_MFLinqRuntimeHelpersQuotationConverter_nleref, "QuotationToLambdaExpression" , None , None , [vara], ([[mkQuotedExprTy varaTy]], mkLinqExpressionTy varaTy)) - let tref_DebuggableAttribute = findSysILTypeRef tname_DebuggableAttribute - let tref_CompilerGeneratedAttribute = findSysILTypeRef tname_CompilerGeneratedAttribute + let tref_DebuggableAttribute = findSysILTypeRef tname_DebuggableAttribute + let tref_CompilerGeneratedAttribute = findSysILTypeRef tname_CompilerGeneratedAttribute let tref_InternalsVisibleToAttribute = findSysILTypeRef tname_InternalsVisibleToAttribute let mutable generatedAttribsCache = [] @@ -912,33 +914,6 @@ type TcGlobals( let mkDebuggerTypeProxyAttribute (ty : ILType) = mkILCustomAttribute (findSysILTypeRef tname_DebuggerTypeProxyAttribute, [ilg.typ_Type], [ILAttribElem.TypeRef (Some ty.TypeRef)], []) - // Todo: Review mkILCustomAttribute throughout fsc/fsi/ fcs to ensure that we use embedable attributes where appropriate - let mkLocalPrivateAttributeWithDefaultConstructor (ilg: ILGlobals, name: string) = - - let ctor = addMethodGeneratedAttrs (mkILNonGenericEmptyCtor (ilg.typ_Attribute, None, None)) - - mkILGenericClass ( - name, - ILTypeDefAccess.Private, - ILGenericParameterDefs.Empty, - ilg.typ_Attribute, - ILTypes.Empty, - mkILMethods [ ctor ], - emptyILFields, - emptyILTypeDefs, - emptyILProperties, - emptyILEvents, - emptyILCustomAttrs, - ILTypeInit.BeforeField - ) - - let addEmbeddableCustomAttribute (tref: ILTypeRef, argTys, argvs, propvs) = - - if tref.Scope = ILScopeRef.Local && not(embeddedILTypeDefs.ContainsKey(tref.Name)) then - embeddedILTypeDefs.TryAdd(tref.Name, mkLocalPrivateAttributeWithDefaultConstructor (ilg, tref.Name)) |> ignore - - mkILCustomAttribute (tref, argTys, argvs, propvs) - let betterTyconEntries = [| "Int32" , v_int_tcr "IntPtr" , v_nativeint_tcr @@ -1076,6 +1051,13 @@ type TcGlobals( member _.embeddedTypeDefs = embeddedILTypeDefs.Values |> Seq.toList + member _.tryRemoveEmbeddedILTypeDefs () = [ + for key in embeddedILTypeDefs.Keys do + match (embeddedILTypeDefs.TryRemove(key)) with + | true, ilTypeDef -> yield ilTypeDef + | false, _ -> () + ] + // A table of all intrinsics that the compiler cares about member _.knownIntrinsics = v_knownIntrinsics @@ -1242,7 +1224,9 @@ type TcGlobals( member val ArrayCollector_tcr = mk_MFCompilerServices_tcref fslibCcu "ArrayCollector`1" - member g.AddEmbeddableSystemAttribute (tref: ILTypeRef, argTys, argvs, propvs) = addEmbeddableCustomAttribute (tref, argTys, argvs, propvs) + member _.TryEmbedILType(tref: ILTypeRef, mkEmbeddableType: unit -> ILTypeDef) = + if tref.Scope = ILScopeRef.Local && not(embeddedILTypeDefs.ContainsKey(tref.Name)) then + embeddedILTypeDefs.TryAdd(tref.Name, mkEmbeddableType()) |> ignore member g.mk_GeneratedSequenceBase_ty seqElemTy = TType_app(g.seq_base_tcr,[seqElemTy], v_knownWithoutNull) @@ -1436,6 +1420,9 @@ type TcGlobals( // We use 'findSysAttrib' here because lookup on attribute is done by name comparison, and can proceed // even if the type is not found in a system assembly. member val attrib_IsReadOnlyAttribute = findOrEmbedSysPublicAttribute "System.Runtime.CompilerServices.IsReadOnlyAttribute" + member val attrib_DynamicDependencyAttribute = findOrEmbedSysPublicAttribute "System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute" + member val enum_DynamicallyAccessedMemberTypes = findOrEmbedSysPublicAttribute "System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes" + member val attrib_SystemObsolete = findSysAttrib "System.ObsoleteAttribute" member val attrib_DllImportAttribute = tryFindSysAttrib "System.Runtime.InteropServices.DllImportAttribute" member val attrib_StructLayoutAttribute = findSysAttrib "System.Runtime.InteropServices.StructLayoutAttribute" @@ -1819,6 +1806,8 @@ type TcGlobals( member _.TryFindSysAttrib nm = tryFindSysAttrib nm + member _.AddGeneratedAttributes attrs = addGeneratedAttrs attrs + member _.AddMethodGeneratedAttributes mdef = addMethodGeneratedAttrs mdef member _.AddPropertyGeneratedAttributes mdef = addPropertyGeneratedAttrs mdef diff --git a/src/FSharp.Core/prim-types.fs b/src/FSharp.Core/prim-types.fs index a85d046fd89..c05faec6e9c 100644 --- a/src/FSharp.Core/prim-types.fs +++ b/src/FSharp.Core/prim-types.fs @@ -387,7 +387,7 @@ namespace System.Diagnostics.CodeAnalysis /// bitwise combination of its member values. /// [] - type internal DynamicallyAccessedMemberTypes = (* + type internal DynamicallyAccessedMemberTypes = | None = 0 | PublicParameterlessConstructor = 0x0001 | PublicConstructors = 0x0003 @@ -401,7 +401,8 @@ namespace System.Diagnostics.CodeAnalysis | PublicProperties = 0x0200 | NonPublicProperties = 0x0400 | PublicEvents = 0x0800 - | NonPublicEvents = 0x1000 *) + | NonPublicEvents = 0x1000 + | Interfaces = 0x2000 | All = 0xffffffff [ [] - type internal DynamicallyAccessedMemberTypes = (* + type internal DynamicallyAccessedMemberTypes = | None = 0 | PublicParameterlessConstructor = 0x0001 | PublicConstructors = 0x0003 @@ -976,7 +976,8 @@ namespace System.Diagnostics.CodeAnalysis | PublicProperties = 0x0200 | NonPublicProperties = 0x0400 | PublicEvents = 0x0800 - | NonPublicEvents = 0x1000 *) + | NonPublicEvents = 0x1000 + | Interfaces = 0x2000 | All = 0xffffffff [ DynamicallyAccessedMembersAttribute member MemberTypes: DynamicallyAccessedMemberTypes - member DynamicallyAccessedMembersAttribute: DynamicallyAccessedMemberTypes -> unit namespace Microsoft.FSharp.Core diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/GenericComparison/Compare06.fsx.il.net472.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/GenericComparison/Compare06.fsx.il.net472.bsl new file mode 100644 index 00000000000..2c11296dbe3 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/GenericComparison/Compare06.fsx.il.net472.bsl @@ -0,0 +1,649 @@ + + + + + +.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 +} +.mresource public FSharpSignatureData.assembly +{ + + +} +.mresource public FSharpOptimizationData.assembly +{ + + +} +.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 abstract auto ansi sealed nested public CompareMicroPerfAndCodeGenerationTests + 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 public KeyR + 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 [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 02 00 00 00 00 00 ) + .field assembly int32 key1@ + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.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 ) + .field assembly int32 key2@ + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.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 ) + .method public hidebysig specialname + instance int32 get_key1() 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/CompareMicroPerfAndCodeGenerationTests/KeyR::key1@ + IL_0006: ret + } + + .method public hidebysig specialname + instance int32 get_key2() 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/CompareMicroPerfAndCodeGenerationTests/KeyR::key2@ + IL_0006: ret + } + + .method public specialname rtspecialname + instance void .ctor(int32 key1, + int32 key2) 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 35 43 6F 6D 70 61 72 65 30 36 + 2B 43 6F 6D 70 61 72 65 4D 69 63 72 6F 50 65 72 + 66 41 6E 64 43 6F 64 65 47 65 6E 65 72 61 74 69 + 6F 6E 54 65 73 74 73 2B 4B 65 79 52 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/CompareMicroPerfAndCodeGenerationTests/KeyR::key1@ + IL_000d: ldarg.0 + IL_000e: ldarg.2 + IL_000f: stfld int32 assembly/CompareMicroPerfAndCodeGenerationTests/KeyR::key2@ + IL_0014: 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/CompareMicroPerfAndCodeGenerationTests/KeyR>::.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/CompareMicroPerfAndCodeGenerationTests/KeyR 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, + int32 V_2, + int32 V_3) + IL_0000: ldarg.0 + IL_0001: brfalse.s IL_0050 + + IL_0003: ldarg.1 + IL_0004: brfalse.s IL_004e + + IL_0006: call class [runtime]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() + IL_000b: stloc.1 + IL_000c: ldarg.0 + IL_000d: ldfld int32 assembly/CompareMicroPerfAndCodeGenerationTests/KeyR::key1@ + IL_0012: stloc.2 + IL_0013: ldarg.1 + IL_0014: ldfld int32 assembly/CompareMicroPerfAndCodeGenerationTests/KeyR::key1@ + IL_0019: stloc.3 + IL_001a: ldloc.2 + IL_001b: ldloc.3 + IL_001c: cgt + IL_001e: ldloc.2 + IL_001f: ldloc.3 + IL_0020: clt + IL_0022: sub + IL_0023: stloc.0 + IL_0024: ldloc.0 + IL_0025: ldc.i4.0 + IL_0026: bge.s IL_002a + + IL_0028: ldloc.0 + IL_0029: ret + + IL_002a: ldloc.0 + IL_002b: ldc.i4.0 + IL_002c: ble.s IL_0030 + + IL_002e: ldloc.0 + IL_002f: ret + + IL_0030: call class [runtime]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() + IL_0035: stloc.1 + IL_0036: ldarg.0 + IL_0037: ldfld int32 assembly/CompareMicroPerfAndCodeGenerationTests/KeyR::key2@ + IL_003c: stloc.2 + IL_003d: ldarg.1 + IL_003e: ldfld int32 assembly/CompareMicroPerfAndCodeGenerationTests/KeyR::key2@ + IL_0043: stloc.3 + IL_0044: ldloc.2 + IL_0045: ldloc.3 + IL_0046: cgt + IL_0048: ldloc.2 + IL_0049: ldloc.3 + IL_004a: clt + IL_004c: sub + IL_004d: ret + + IL_004e: ldc.i4.1 + IL_004f: ret + + IL_0050: ldarg.1 + IL_0051: brfalse.s IL_0055 + + IL_0053: ldc.i4.m1 + IL_0054: ret + + IL_0055: ldc.i4.0 + IL_0056: 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/CompareMicroPerfAndCodeGenerationTests/KeyR + IL_0007: callvirt instance int32 assembly/CompareMicroPerfAndCodeGenerationTests/KeyR::CompareTo(class assembly/CompareMicroPerfAndCodeGenerationTests/KeyR) + 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 assembly/CompareMicroPerfAndCodeGenerationTests/KeyR V_0, + int32 V_1, + int32 V_2, + int32 V_3) + IL_0000: ldarg.1 + IL_0001: unbox.any assembly/CompareMicroPerfAndCodeGenerationTests/KeyR + IL_0006: stloc.0 + IL_0007: ldarg.0 + IL_0008: brfalse.s IL_0050 + + IL_000a: ldarg.1 + IL_000b: unbox.any assembly/CompareMicroPerfAndCodeGenerationTests/KeyR + IL_0010: brfalse.s IL_004e + + IL_0012: ldarg.0 + IL_0013: ldfld int32 assembly/CompareMicroPerfAndCodeGenerationTests/KeyR::key1@ + IL_0018: stloc.2 + IL_0019: ldloc.0 + IL_001a: ldfld int32 assembly/CompareMicroPerfAndCodeGenerationTests/KeyR::key1@ + IL_001f: stloc.3 + IL_0020: ldloc.2 + IL_0021: ldloc.3 + IL_0022: cgt + IL_0024: ldloc.2 + IL_0025: ldloc.3 + IL_0026: clt + IL_0028: sub + IL_0029: stloc.1 + IL_002a: ldloc.1 + IL_002b: ldc.i4.0 + IL_002c: bge.s IL_0030 + + IL_002e: ldloc.1 + IL_002f: ret + + IL_0030: ldloc.1 + IL_0031: ldc.i4.0 + IL_0032: ble.s IL_0036 + + IL_0034: ldloc.1 + IL_0035: ret + + IL_0036: ldarg.0 + IL_0037: ldfld int32 assembly/CompareMicroPerfAndCodeGenerationTests/KeyR::key2@ + IL_003c: stloc.2 + IL_003d: ldloc.0 + IL_003e: ldfld int32 assembly/CompareMicroPerfAndCodeGenerationTests/KeyR::key2@ + IL_0043: stloc.3 + IL_0044: ldloc.2 + IL_0045: ldloc.3 + IL_0046: cgt + IL_0048: ldloc.2 + IL_0049: ldloc.3 + IL_004a: clt + IL_004c: sub + IL_004d: ret + + IL_004e: ldc.i4.1 + IL_004f: ret + + IL_0050: ldarg.1 + IL_0051: unbox.any assembly/CompareMicroPerfAndCodeGenerationTests/KeyR + IL_0056: brfalse.s IL_005a + + IL_0058: ldc.i4.m1 + IL_0059: ret + + IL_005a: ldc.i4.0 + IL_005b: 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: ldarg.0 + IL_0001: brfalse.s IL_0031 + + IL_0003: ldc.i4.0 + IL_0004: stloc.0 + IL_0005: ldc.i4 0x9e3779b9 + IL_000a: ldarg.0 + IL_000b: ldfld int32 assembly/CompareMicroPerfAndCodeGenerationTests/KeyR::key2@ + IL_0010: ldloc.0 + IL_0011: ldc.i4.6 + IL_0012: shl + IL_0013: ldloc.0 + IL_0014: ldc.i4.2 + IL_0015: shr + IL_0016: add + IL_0017: add + IL_0018: add + IL_0019: stloc.0 + IL_001a: ldc.i4 0x9e3779b9 + IL_001f: ldarg.0 + IL_0020: ldfld int32 assembly/CompareMicroPerfAndCodeGenerationTests/KeyR::key1@ + IL_0025: ldloc.0 + IL_0026: ldc.i4.6 + IL_0027: shl + IL_0028: ldloc.0 + IL_0029: ldc.i4.2 + IL_002a: shr + IL_002b: add + IL_002c: add + IL_002d: add + IL_002e: stloc.0 + IL_002f: ldloc.0 + IL_0030: ret + + IL_0031: ldc.i4.0 + IL_0032: 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/CompareMicroPerfAndCodeGenerationTests/KeyR::GetHashCode(class [runtime]System.Collections.IEqualityComparer) + IL_000b: 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 4 + .locals init (class assembly/CompareMicroPerfAndCodeGenerationTests/KeyR V_0) + IL_0000: ldarg.0 + IL_0001: brfalse.s IL_002e + + IL_0003: ldarg.1 + IL_0004: isinst assembly/CompareMicroPerfAndCodeGenerationTests/KeyR + IL_0009: stloc.0 + IL_000a: ldloc.0 + IL_000b: brfalse.s IL_002c + + IL_000d: ldarg.0 + IL_000e: ldfld int32 assembly/CompareMicroPerfAndCodeGenerationTests/KeyR::key1@ + IL_0013: ldloc.0 + IL_0014: ldfld int32 assembly/CompareMicroPerfAndCodeGenerationTests/KeyR::key1@ + IL_0019: bne.un.s IL_002a + + IL_001b: ldarg.0 + IL_001c: ldfld int32 assembly/CompareMicroPerfAndCodeGenerationTests/KeyR::key2@ + IL_0021: ldloc.0 + IL_0022: ldfld int32 assembly/CompareMicroPerfAndCodeGenerationTests/KeyR::key2@ + IL_0027: ceq + IL_0029: ret + + IL_002a: ldc.i4.0 + IL_002b: ret + + IL_002c: ldc.i4.0 + IL_002d: ret + + IL_002e: ldarg.1 + IL_002f: ldnull + IL_0030: cgt.un + IL_0032: ldc.i4.0 + IL_0033: ceq + IL_0035: ret + } + + .method public hidebysig virtual final + instance bool Equals(class assembly/CompareMicroPerfAndCodeGenerationTests/KeyR 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_0027 + + IL_0003: ldarg.1 + IL_0004: brfalse.s IL_0025 + + IL_0006: ldarg.0 + IL_0007: ldfld int32 assembly/CompareMicroPerfAndCodeGenerationTests/KeyR::key1@ + IL_000c: ldarg.1 + IL_000d: ldfld int32 assembly/CompareMicroPerfAndCodeGenerationTests/KeyR::key1@ + IL_0012: bne.un.s IL_0023 + + IL_0014: ldarg.0 + IL_0015: ldfld int32 assembly/CompareMicroPerfAndCodeGenerationTests/KeyR::key2@ + IL_001a: ldarg.1 + IL_001b: ldfld int32 assembly/CompareMicroPerfAndCodeGenerationTests/KeyR::key2@ + IL_0020: ceq + IL_0022: ret + + IL_0023: ldc.i4.0 + IL_0024: ret + + IL_0025: ldc.i4.0 + IL_0026: ret + + IL_0027: ldarg.1 + IL_0028: ldnull + IL_0029: cgt.un + IL_002b: ldc.i4.0 + IL_002c: ceq + IL_002e: 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/CompareMicroPerfAndCodeGenerationTests/KeyR V_0) + IL_0000: ldarg.1 + IL_0001: isinst assembly/CompareMicroPerfAndCodeGenerationTests/KeyR + 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/CompareMicroPerfAndCodeGenerationTests/KeyR::Equals(class assembly/CompareMicroPerfAndCodeGenerationTests/KeyR) + IL_0011: ret + + IL_0012: ldc.i4.0 + IL_0013: ret + } + + .property instance int32 key1() + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags, + int32) = ( 01 00 04 00 00 00 00 00 00 00 00 00 ) + .get instance int32 assembly/CompareMicroPerfAndCodeGenerationTests/KeyR::get_key1() + } + .property instance int32 key2() + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags, + int32) = ( 01 00 04 00 00 00 01 00 00 00 00 00 ) + .get instance int32 assembly/CompareMicroPerfAndCodeGenerationTests/KeyR::get_key2() + } + } + + .method public static void f5c() cil managed + { + + .maxstack 4 + .locals init (int32 V_0, + class assembly/CompareMicroPerfAndCodeGenerationTests/KeyR V_1, + class assembly/CompareMicroPerfAndCodeGenerationTests/KeyR V_2, + int32 V_3) + IL_0000: ldc.i4.1 + IL_0001: stloc.0 + IL_0002: ldc.i4.1 + IL_0003: ldc.i4.2 + IL_0004: newobj instance void assembly/CompareMicroPerfAndCodeGenerationTests/KeyR::.ctor(int32, + int32) + IL_0009: stloc.1 + IL_000a: ldc.i4.1 + IL_000b: ldc.i4.3 + IL_000c: newobj instance void assembly/CompareMicroPerfAndCodeGenerationTests/KeyR::.ctor(int32, + int32) + IL_0011: stloc.2 + IL_0012: ldc.i4.0 + IL_0013: stloc.3 + IL_0014: br.s IL_0022 + + IL_0016: ldloc.1 + IL_0017: ldloc.2 + IL_0018: callvirt instance int32 assembly/CompareMicroPerfAndCodeGenerationTests/KeyR::CompareTo(class assembly/CompareMicroPerfAndCodeGenerationTests/KeyR) + IL_001d: stloc.0 + IL_001e: ldloc.3 + IL_001f: ldc.i4.1 + IL_0020: add + IL_0021: stloc.3 + IL_0022: ldloc.3 + IL_0023: ldc.i4 0x989681 + IL_0028: blt.s IL_0016 + + IL_002a: ret + } + + } + +} + +.class private abstract auto ansi sealed ''.$assembly$fsx + extends [runtime]System.Object +{ + .method public static void main@() cil managed + { + .entrypoint + + .maxstack 8 + IL_0000: ret + } + +} + +.class private auto ansi 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__ = int32(0x00000000) + .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 +{ + .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 private hidebysig specialname instance void + set_Type(class [runtime]System.Type 'value') 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: ldarg.1 + IL_0002: stfld class [runtime]System.Type System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::Type@ + IL_0007: 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 + } + + .method private hidebysig specialname instance void + set_MemberType(valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes 'value') 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: ldarg.1 + IL_0002: stfld valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::MemberType@ + IL_0007: 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 ) + .set instance void System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::set_MemberType(valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes) + .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 ) + .set instance void System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::set_Type(class [runtime]System.Type) + .get instance class [runtime]System.Type System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::get_Type() + } +} + + + + + + diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/GenericComparison/Compare06.fsx.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/GenericComparison/Compare06.fsx.il.netcore.bsl similarity index 95% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/GenericComparison/Compare06.fsx.il.bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/GenericComparison/Compare06.fsx.il.netcore.bsl index b5c57d4ef68..7a405133e02 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/GenericComparison/Compare06.fsx.il.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/GenericComparison/Compare06.fsx.il.netcore.bsl @@ -1,523 +1,528 @@ - - - - - -.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 -} -.mresource public FSharpSignatureData.assembly -{ - - -} -.mresource public FSharpOptimizationData.assembly -{ - - -} -.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 abstract auto ansi sealed nested public CompareMicroPerfAndCodeGenerationTests - 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 public KeyR - 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 [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 02 00 00 00 00 00 ) - .field assembly int32 key1@ - .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.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 ) - .field assembly int32 key2@ - .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.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 ) - .method public hidebysig specialname - instance int32 get_key1() 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/CompareMicroPerfAndCodeGenerationTests/KeyR::key1@ - IL_0006: ret - } - - .method public hidebysig specialname - instance int32 get_key2() 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/CompareMicroPerfAndCodeGenerationTests/KeyR::key2@ - IL_0006: ret - } - - .method public specialname rtspecialname - instance void .ctor(int32 key1, - int32 key2) cil managed - { - - .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/CompareMicroPerfAndCodeGenerationTests/KeyR::key1@ - IL_000d: ldarg.0 - IL_000e: ldarg.2 - IL_000f: stfld int32 assembly/CompareMicroPerfAndCodeGenerationTests/KeyR::key2@ - IL_0014: 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/CompareMicroPerfAndCodeGenerationTests/KeyR>::.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/CompareMicroPerfAndCodeGenerationTests/KeyR 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, - int32 V_2, - int32 V_3) - IL_0000: ldarg.0 - IL_0001: brfalse.s IL_0050 - - IL_0003: ldarg.1 - IL_0004: brfalse.s IL_004e - - IL_0006: call class [runtime]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() - IL_000b: stloc.1 - IL_000c: ldarg.0 - IL_000d: ldfld int32 assembly/CompareMicroPerfAndCodeGenerationTests/KeyR::key1@ - IL_0012: stloc.2 - IL_0013: ldarg.1 - IL_0014: ldfld int32 assembly/CompareMicroPerfAndCodeGenerationTests/KeyR::key1@ - IL_0019: stloc.3 - IL_001a: ldloc.2 - IL_001b: ldloc.3 - IL_001c: cgt - IL_001e: ldloc.2 - IL_001f: ldloc.3 - IL_0020: clt - IL_0022: sub - IL_0023: stloc.0 - IL_0024: ldloc.0 - IL_0025: ldc.i4.0 - IL_0026: bge.s IL_002a - - IL_0028: ldloc.0 - IL_0029: ret - - IL_002a: ldloc.0 - IL_002b: ldc.i4.0 - IL_002c: ble.s IL_0030 - - IL_002e: ldloc.0 - IL_002f: ret - - IL_0030: call class [runtime]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() - IL_0035: stloc.1 - IL_0036: ldarg.0 - IL_0037: ldfld int32 assembly/CompareMicroPerfAndCodeGenerationTests/KeyR::key2@ - IL_003c: stloc.2 - IL_003d: ldarg.1 - IL_003e: ldfld int32 assembly/CompareMicroPerfAndCodeGenerationTests/KeyR::key2@ - IL_0043: stloc.3 - IL_0044: ldloc.2 - IL_0045: ldloc.3 - IL_0046: cgt - IL_0048: ldloc.2 - IL_0049: ldloc.3 - IL_004a: clt - IL_004c: sub - IL_004d: ret - - IL_004e: ldc.i4.1 - IL_004f: ret - - IL_0050: ldarg.1 - IL_0051: brfalse.s IL_0055 - - IL_0053: ldc.i4.m1 - IL_0054: ret - - IL_0055: ldc.i4.0 - IL_0056: 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/CompareMicroPerfAndCodeGenerationTests/KeyR - IL_0007: callvirt instance int32 assembly/CompareMicroPerfAndCodeGenerationTests/KeyR::CompareTo(class assembly/CompareMicroPerfAndCodeGenerationTests/KeyR) - 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 assembly/CompareMicroPerfAndCodeGenerationTests/KeyR V_0, - int32 V_1, - int32 V_2, - int32 V_3) - IL_0000: ldarg.1 - IL_0001: unbox.any assembly/CompareMicroPerfAndCodeGenerationTests/KeyR - IL_0006: stloc.0 - IL_0007: ldarg.0 - IL_0008: brfalse.s IL_0050 - - IL_000a: ldarg.1 - IL_000b: unbox.any assembly/CompareMicroPerfAndCodeGenerationTests/KeyR - IL_0010: brfalse.s IL_004e - - IL_0012: ldarg.0 - IL_0013: ldfld int32 assembly/CompareMicroPerfAndCodeGenerationTests/KeyR::key1@ - IL_0018: stloc.2 - IL_0019: ldloc.0 - IL_001a: ldfld int32 assembly/CompareMicroPerfAndCodeGenerationTests/KeyR::key1@ - IL_001f: stloc.3 - IL_0020: ldloc.2 - IL_0021: ldloc.3 - IL_0022: cgt - IL_0024: ldloc.2 - IL_0025: ldloc.3 - IL_0026: clt - IL_0028: sub - IL_0029: stloc.1 - IL_002a: ldloc.1 - IL_002b: ldc.i4.0 - IL_002c: bge.s IL_0030 - - IL_002e: ldloc.1 - IL_002f: ret - - IL_0030: ldloc.1 - IL_0031: ldc.i4.0 - IL_0032: ble.s IL_0036 - - IL_0034: ldloc.1 - IL_0035: ret - - IL_0036: ldarg.0 - IL_0037: ldfld int32 assembly/CompareMicroPerfAndCodeGenerationTests/KeyR::key2@ - IL_003c: stloc.2 - IL_003d: ldloc.0 - IL_003e: ldfld int32 assembly/CompareMicroPerfAndCodeGenerationTests/KeyR::key2@ - IL_0043: stloc.3 - IL_0044: ldloc.2 - IL_0045: ldloc.3 - IL_0046: cgt - IL_0048: ldloc.2 - IL_0049: ldloc.3 - IL_004a: clt - IL_004c: sub - IL_004d: ret - - IL_004e: ldc.i4.1 - IL_004f: ret - - IL_0050: ldarg.1 - IL_0051: unbox.any assembly/CompareMicroPerfAndCodeGenerationTests/KeyR - IL_0056: brfalse.s IL_005a - - IL_0058: ldc.i4.m1 - IL_0059: ret - - IL_005a: ldc.i4.0 - IL_005b: 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: ldarg.0 - IL_0001: brfalse.s IL_0031 - - IL_0003: ldc.i4.0 - IL_0004: stloc.0 - IL_0005: ldc.i4 0x9e3779b9 - IL_000a: ldarg.0 - IL_000b: ldfld int32 assembly/CompareMicroPerfAndCodeGenerationTests/KeyR::key2@ - IL_0010: ldloc.0 - IL_0011: ldc.i4.6 - IL_0012: shl - IL_0013: ldloc.0 - IL_0014: ldc.i4.2 - IL_0015: shr - IL_0016: add - IL_0017: add - IL_0018: add - IL_0019: stloc.0 - IL_001a: ldc.i4 0x9e3779b9 - IL_001f: ldarg.0 - IL_0020: ldfld int32 assembly/CompareMicroPerfAndCodeGenerationTests/KeyR::key1@ - IL_0025: ldloc.0 - IL_0026: ldc.i4.6 - IL_0027: shl - IL_0028: ldloc.0 - IL_0029: ldc.i4.2 - IL_002a: shr - IL_002b: add - IL_002c: add - IL_002d: add - IL_002e: stloc.0 - IL_002f: ldloc.0 - IL_0030: ret - - IL_0031: ldc.i4.0 - IL_0032: 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/CompareMicroPerfAndCodeGenerationTests/KeyR::GetHashCode(class [runtime]System.Collections.IEqualityComparer) - IL_000b: 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 4 - .locals init (class assembly/CompareMicroPerfAndCodeGenerationTests/KeyR V_0) - IL_0000: ldarg.0 - IL_0001: brfalse.s IL_002e - - IL_0003: ldarg.1 - IL_0004: isinst assembly/CompareMicroPerfAndCodeGenerationTests/KeyR - IL_0009: stloc.0 - IL_000a: ldloc.0 - IL_000b: brfalse.s IL_002c - - IL_000d: ldarg.0 - IL_000e: ldfld int32 assembly/CompareMicroPerfAndCodeGenerationTests/KeyR::key1@ - IL_0013: ldloc.0 - IL_0014: ldfld int32 assembly/CompareMicroPerfAndCodeGenerationTests/KeyR::key1@ - IL_0019: bne.un.s IL_002a - - IL_001b: ldarg.0 - IL_001c: ldfld int32 assembly/CompareMicroPerfAndCodeGenerationTests/KeyR::key2@ - IL_0021: ldloc.0 - IL_0022: ldfld int32 assembly/CompareMicroPerfAndCodeGenerationTests/KeyR::key2@ - IL_0027: ceq - IL_0029: ret - - IL_002a: ldc.i4.0 - IL_002b: ret - - IL_002c: ldc.i4.0 - IL_002d: ret - - IL_002e: ldarg.1 - IL_002f: ldnull - IL_0030: cgt.un - IL_0032: ldc.i4.0 - IL_0033: ceq - IL_0035: ret - } - - .method public hidebysig virtual final - instance bool Equals(class assembly/CompareMicroPerfAndCodeGenerationTests/KeyR 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_0027 - - IL_0003: ldarg.1 - IL_0004: brfalse.s IL_0025 - - IL_0006: ldarg.0 - IL_0007: ldfld int32 assembly/CompareMicroPerfAndCodeGenerationTests/KeyR::key1@ - IL_000c: ldarg.1 - IL_000d: ldfld int32 assembly/CompareMicroPerfAndCodeGenerationTests/KeyR::key1@ - IL_0012: bne.un.s IL_0023 - - IL_0014: ldarg.0 - IL_0015: ldfld int32 assembly/CompareMicroPerfAndCodeGenerationTests/KeyR::key2@ - IL_001a: ldarg.1 - IL_001b: ldfld int32 assembly/CompareMicroPerfAndCodeGenerationTests/KeyR::key2@ - IL_0020: ceq - IL_0022: ret - - IL_0023: ldc.i4.0 - IL_0024: ret - - IL_0025: ldc.i4.0 - IL_0026: ret - - IL_0027: ldarg.1 - IL_0028: ldnull - IL_0029: cgt.un - IL_002b: ldc.i4.0 - IL_002c: ceq - IL_002e: 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/CompareMicroPerfAndCodeGenerationTests/KeyR V_0) - IL_0000: ldarg.1 - IL_0001: isinst assembly/CompareMicroPerfAndCodeGenerationTests/KeyR - 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/CompareMicroPerfAndCodeGenerationTests/KeyR::Equals(class assembly/CompareMicroPerfAndCodeGenerationTests/KeyR) - IL_0011: ret - - IL_0012: ldc.i4.0 - IL_0013: ret - } - - .property instance int32 key1() - { - .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags, - int32) = ( 01 00 04 00 00 00 00 00 00 00 00 00 ) - .get instance int32 assembly/CompareMicroPerfAndCodeGenerationTests/KeyR::get_key1() - } - .property instance int32 key2() - { - .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags, - int32) = ( 01 00 04 00 00 00 01 00 00 00 00 00 ) - .get instance int32 assembly/CompareMicroPerfAndCodeGenerationTests/KeyR::get_key2() - } - } - - .method public static void f5c() cil managed - { - - .maxstack 4 - .locals init (int32 V_0, - class assembly/CompareMicroPerfAndCodeGenerationTests/KeyR V_1, - class assembly/CompareMicroPerfAndCodeGenerationTests/KeyR V_2, - int32 V_3) - IL_0000: ldc.i4.1 - IL_0001: stloc.0 - IL_0002: ldc.i4.1 - IL_0003: ldc.i4.2 - IL_0004: newobj instance void assembly/CompareMicroPerfAndCodeGenerationTests/KeyR::.ctor(int32, - int32) - IL_0009: stloc.1 - IL_000a: ldc.i4.1 - IL_000b: ldc.i4.3 - IL_000c: newobj instance void assembly/CompareMicroPerfAndCodeGenerationTests/KeyR::.ctor(int32, - int32) - IL_0011: stloc.2 - IL_0012: ldc.i4.0 - IL_0013: stloc.3 - IL_0014: br.s IL_0022 - - IL_0016: ldloc.1 - IL_0017: ldloc.2 - IL_0018: callvirt instance int32 assembly/CompareMicroPerfAndCodeGenerationTests/KeyR::CompareTo(class assembly/CompareMicroPerfAndCodeGenerationTests/KeyR) - IL_001d: stloc.0 - IL_001e: ldloc.3 - IL_001f: ldc.i4.1 - IL_0020: add - IL_0021: stloc.3 - IL_0022: ldloc.3 - IL_0023: ldc.i4 0x989681 - IL_0028: blt.s IL_0016 - - IL_002a: ret - } - - } - -} - -.class private abstract auto ansi sealed ''.$assembly$fsx - extends [runtime]System.Object -{ - .method public static void main@() cil managed - { - .entrypoint - - .maxstack 8 - IL_0000: ret - } - -} - - - - - - + + + + + +.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 +} +.mresource public FSharpSignatureData.assembly +{ + + +} +.mresource public FSharpOptimizationData.assembly +{ + + +} +.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 abstract auto ansi sealed nested public CompareMicroPerfAndCodeGenerationTests + 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 public KeyR + 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 [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 02 00 00 00 00 00 ) + .field assembly int32 key1@ + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.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 ) + .field assembly int32 key2@ + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.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 ) + .method public hidebysig specialname + instance int32 get_key1() 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/CompareMicroPerfAndCodeGenerationTests/KeyR::key1@ + IL_0006: ret + } + + .method public hidebysig specialname + instance int32 get_key2() 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/CompareMicroPerfAndCodeGenerationTests/KeyR::key2@ + IL_0006: ret + } + + .method public specialname rtspecialname + instance void .ctor(int32 key1, + int32 key2) cil managed + { + .custom instance void [runtime]System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::.ctor(valuetype [runtime]System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes, + class [runtime]System.Type) = ( 01 00 60 06 00 00 35 43 6F 6D 70 61 72 65 30 36 + 2B 43 6F 6D 70 61 72 65 4D 69 63 72 6F 50 65 72 + 66 41 6E 64 43 6F 64 65 47 65 6E 65 72 61 74 69 + 6F 6E 54 65 73 74 73 2B 4B 65 79 52 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/CompareMicroPerfAndCodeGenerationTests/KeyR::key1@ + IL_000d: ldarg.0 + IL_000e: ldarg.2 + IL_000f: stfld int32 assembly/CompareMicroPerfAndCodeGenerationTests/KeyR::key2@ + IL_0014: 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/CompareMicroPerfAndCodeGenerationTests/KeyR>::.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/CompareMicroPerfAndCodeGenerationTests/KeyR 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, + int32 V_2, + int32 V_3) + IL_0000: ldarg.0 + IL_0001: brfalse.s IL_0050 + + IL_0003: ldarg.1 + IL_0004: brfalse.s IL_004e + + IL_0006: call class [runtime]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() + IL_000b: stloc.1 + IL_000c: ldarg.0 + IL_000d: ldfld int32 assembly/CompareMicroPerfAndCodeGenerationTests/KeyR::key1@ + IL_0012: stloc.2 + IL_0013: ldarg.1 + IL_0014: ldfld int32 assembly/CompareMicroPerfAndCodeGenerationTests/KeyR::key1@ + IL_0019: stloc.3 + IL_001a: ldloc.2 + IL_001b: ldloc.3 + IL_001c: cgt + IL_001e: ldloc.2 + IL_001f: ldloc.3 + IL_0020: clt + IL_0022: sub + IL_0023: stloc.0 + IL_0024: ldloc.0 + IL_0025: ldc.i4.0 + IL_0026: bge.s IL_002a + + IL_0028: ldloc.0 + IL_0029: ret + + IL_002a: ldloc.0 + IL_002b: ldc.i4.0 + IL_002c: ble.s IL_0030 + + IL_002e: ldloc.0 + IL_002f: ret + + IL_0030: call class [runtime]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() + IL_0035: stloc.1 + IL_0036: ldarg.0 + IL_0037: ldfld int32 assembly/CompareMicroPerfAndCodeGenerationTests/KeyR::key2@ + IL_003c: stloc.2 + IL_003d: ldarg.1 + IL_003e: ldfld int32 assembly/CompareMicroPerfAndCodeGenerationTests/KeyR::key2@ + IL_0043: stloc.3 + IL_0044: ldloc.2 + IL_0045: ldloc.3 + IL_0046: cgt + IL_0048: ldloc.2 + IL_0049: ldloc.3 + IL_004a: clt + IL_004c: sub + IL_004d: ret + + IL_004e: ldc.i4.1 + IL_004f: ret + + IL_0050: ldarg.1 + IL_0051: brfalse.s IL_0055 + + IL_0053: ldc.i4.m1 + IL_0054: ret + + IL_0055: ldc.i4.0 + IL_0056: 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/CompareMicroPerfAndCodeGenerationTests/KeyR + IL_0007: callvirt instance int32 assembly/CompareMicroPerfAndCodeGenerationTests/KeyR::CompareTo(class assembly/CompareMicroPerfAndCodeGenerationTests/KeyR) + 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 assembly/CompareMicroPerfAndCodeGenerationTests/KeyR V_0, + int32 V_1, + int32 V_2, + int32 V_3) + IL_0000: ldarg.1 + IL_0001: unbox.any assembly/CompareMicroPerfAndCodeGenerationTests/KeyR + IL_0006: stloc.0 + IL_0007: ldarg.0 + IL_0008: brfalse.s IL_0050 + + IL_000a: ldarg.1 + IL_000b: unbox.any assembly/CompareMicroPerfAndCodeGenerationTests/KeyR + IL_0010: brfalse.s IL_004e + + IL_0012: ldarg.0 + IL_0013: ldfld int32 assembly/CompareMicroPerfAndCodeGenerationTests/KeyR::key1@ + IL_0018: stloc.2 + IL_0019: ldloc.0 + IL_001a: ldfld int32 assembly/CompareMicroPerfAndCodeGenerationTests/KeyR::key1@ + IL_001f: stloc.3 + IL_0020: ldloc.2 + IL_0021: ldloc.3 + IL_0022: cgt + IL_0024: ldloc.2 + IL_0025: ldloc.3 + IL_0026: clt + IL_0028: sub + IL_0029: stloc.1 + IL_002a: ldloc.1 + IL_002b: ldc.i4.0 + IL_002c: bge.s IL_0030 + + IL_002e: ldloc.1 + IL_002f: ret + + IL_0030: ldloc.1 + IL_0031: ldc.i4.0 + IL_0032: ble.s IL_0036 + + IL_0034: ldloc.1 + IL_0035: ret + + IL_0036: ldarg.0 + IL_0037: ldfld int32 assembly/CompareMicroPerfAndCodeGenerationTests/KeyR::key2@ + IL_003c: stloc.2 + IL_003d: ldloc.0 + IL_003e: ldfld int32 assembly/CompareMicroPerfAndCodeGenerationTests/KeyR::key2@ + IL_0043: stloc.3 + IL_0044: ldloc.2 + IL_0045: ldloc.3 + IL_0046: cgt + IL_0048: ldloc.2 + IL_0049: ldloc.3 + IL_004a: clt + IL_004c: sub + IL_004d: ret + + IL_004e: ldc.i4.1 + IL_004f: ret + + IL_0050: ldarg.1 + IL_0051: unbox.any assembly/CompareMicroPerfAndCodeGenerationTests/KeyR + IL_0056: brfalse.s IL_005a + + IL_0058: ldc.i4.m1 + IL_0059: ret + + IL_005a: ldc.i4.0 + IL_005b: 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: ldarg.0 + IL_0001: brfalse.s IL_0031 + + IL_0003: ldc.i4.0 + IL_0004: stloc.0 + IL_0005: ldc.i4 0x9e3779b9 + IL_000a: ldarg.0 + IL_000b: ldfld int32 assembly/CompareMicroPerfAndCodeGenerationTests/KeyR::key2@ + IL_0010: ldloc.0 + IL_0011: ldc.i4.6 + IL_0012: shl + IL_0013: ldloc.0 + IL_0014: ldc.i4.2 + IL_0015: shr + IL_0016: add + IL_0017: add + IL_0018: add + IL_0019: stloc.0 + IL_001a: ldc.i4 0x9e3779b9 + IL_001f: ldarg.0 + IL_0020: ldfld int32 assembly/CompareMicroPerfAndCodeGenerationTests/KeyR::key1@ + IL_0025: ldloc.0 + IL_0026: ldc.i4.6 + IL_0027: shl + IL_0028: ldloc.0 + IL_0029: ldc.i4.2 + IL_002a: shr + IL_002b: add + IL_002c: add + IL_002d: add + IL_002e: stloc.0 + IL_002f: ldloc.0 + IL_0030: ret + + IL_0031: ldc.i4.0 + IL_0032: 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/CompareMicroPerfAndCodeGenerationTests/KeyR::GetHashCode(class [runtime]System.Collections.IEqualityComparer) + IL_000b: 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 4 + .locals init (class assembly/CompareMicroPerfAndCodeGenerationTests/KeyR V_0) + IL_0000: ldarg.0 + IL_0001: brfalse.s IL_002e + + IL_0003: ldarg.1 + IL_0004: isinst assembly/CompareMicroPerfAndCodeGenerationTests/KeyR + IL_0009: stloc.0 + IL_000a: ldloc.0 + IL_000b: brfalse.s IL_002c + + IL_000d: ldarg.0 + IL_000e: ldfld int32 assembly/CompareMicroPerfAndCodeGenerationTests/KeyR::key1@ + IL_0013: ldloc.0 + IL_0014: ldfld int32 assembly/CompareMicroPerfAndCodeGenerationTests/KeyR::key1@ + IL_0019: bne.un.s IL_002a + + IL_001b: ldarg.0 + IL_001c: ldfld int32 assembly/CompareMicroPerfAndCodeGenerationTests/KeyR::key2@ + IL_0021: ldloc.0 + IL_0022: ldfld int32 assembly/CompareMicroPerfAndCodeGenerationTests/KeyR::key2@ + IL_0027: ceq + IL_0029: ret + + IL_002a: ldc.i4.0 + IL_002b: ret + + IL_002c: ldc.i4.0 + IL_002d: ret + + IL_002e: ldarg.1 + IL_002f: ldnull + IL_0030: cgt.un + IL_0032: ldc.i4.0 + IL_0033: ceq + IL_0035: ret + } + + .method public hidebysig virtual final + instance bool Equals(class assembly/CompareMicroPerfAndCodeGenerationTests/KeyR 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_0027 + + IL_0003: ldarg.1 + IL_0004: brfalse.s IL_0025 + + IL_0006: ldarg.0 + IL_0007: ldfld int32 assembly/CompareMicroPerfAndCodeGenerationTests/KeyR::key1@ + IL_000c: ldarg.1 + IL_000d: ldfld int32 assembly/CompareMicroPerfAndCodeGenerationTests/KeyR::key1@ + IL_0012: bne.un.s IL_0023 + + IL_0014: ldarg.0 + IL_0015: ldfld int32 assembly/CompareMicroPerfAndCodeGenerationTests/KeyR::key2@ + IL_001a: ldarg.1 + IL_001b: ldfld int32 assembly/CompareMicroPerfAndCodeGenerationTests/KeyR::key2@ + IL_0020: ceq + IL_0022: ret + + IL_0023: ldc.i4.0 + IL_0024: ret + + IL_0025: ldc.i4.0 + IL_0026: ret + + IL_0027: ldarg.1 + IL_0028: ldnull + IL_0029: cgt.un + IL_002b: ldc.i4.0 + IL_002c: ceq + IL_002e: 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/CompareMicroPerfAndCodeGenerationTests/KeyR V_0) + IL_0000: ldarg.1 + IL_0001: isinst assembly/CompareMicroPerfAndCodeGenerationTests/KeyR + 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/CompareMicroPerfAndCodeGenerationTests/KeyR::Equals(class assembly/CompareMicroPerfAndCodeGenerationTests/KeyR) + IL_0011: ret + + IL_0012: ldc.i4.0 + IL_0013: ret + } + + .property instance int32 key1() + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags, + int32) = ( 01 00 04 00 00 00 00 00 00 00 00 00 ) + .get instance int32 assembly/CompareMicroPerfAndCodeGenerationTests/KeyR::get_key1() + } + .property instance int32 key2() + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags, + int32) = ( 01 00 04 00 00 00 01 00 00 00 00 00 ) + .get instance int32 assembly/CompareMicroPerfAndCodeGenerationTests/KeyR::get_key2() + } + } + + .method public static void f5c() cil managed + { + + .maxstack 4 + .locals init (int32 V_0, + class assembly/CompareMicroPerfAndCodeGenerationTests/KeyR V_1, + class assembly/CompareMicroPerfAndCodeGenerationTests/KeyR V_2, + int32 V_3) + IL_0000: ldc.i4.1 + IL_0001: stloc.0 + IL_0002: ldc.i4.1 + IL_0003: ldc.i4.2 + IL_0004: newobj instance void assembly/CompareMicroPerfAndCodeGenerationTests/KeyR::.ctor(int32, + int32) + IL_0009: stloc.1 + IL_000a: ldc.i4.1 + IL_000b: ldc.i4.3 + IL_000c: newobj instance void assembly/CompareMicroPerfAndCodeGenerationTests/KeyR::.ctor(int32, + int32) + IL_0011: stloc.2 + IL_0012: ldc.i4.0 + IL_0013: stloc.3 + IL_0014: br.s IL_0022 + + IL_0016: ldloc.1 + IL_0017: ldloc.2 + IL_0018: callvirt instance int32 assembly/CompareMicroPerfAndCodeGenerationTests/KeyR::CompareTo(class assembly/CompareMicroPerfAndCodeGenerationTests/KeyR) + IL_001d: stloc.0 + IL_001e: ldloc.3 + IL_001f: ldc.i4.1 + IL_0020: add + IL_0021: stloc.3 + IL_0022: ldloc.3 + IL_0023: ldc.i4 0x989681 + IL_0028: blt.s IL_0016 + + IL_002a: ret + } + + } + +} + +.class private abstract auto ansi sealed ''.$assembly$fsx + extends [runtime]System.Object +{ + .method public static void main@() cil managed + { + .entrypoint + + .maxstack 8 + IL_0000: ret + } + +} + + + + + + diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/GenericComparison/Equals05.fsx.il.net472.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/GenericComparison/Equals05.fsx.il.net472.bsl new file mode 100644 index 00000000000..c626341997d --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/GenericComparison/Equals05.fsx.il.net472.bsl @@ -0,0 +1,651 @@ + + + + + +.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 +} +.mresource public FSharpSignatureData.assembly +{ + + +} +.mresource public FSharpOptimizationData.assembly +{ + + +} +.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 abstract auto ansi sealed nested public EqualsMicroPerfAndCodeGenerationTests + 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 public KeyR + 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 [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 02 00 00 00 00 00 ) + .field assembly int32 key1@ + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.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 ) + .field assembly int32 key2@ + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.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 ) + .method public hidebysig specialname + instance int32 get_key1() 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/EqualsMicroPerfAndCodeGenerationTests/KeyR::key1@ + IL_0006: ret + } + + .method public hidebysig specialname + instance int32 get_key2() 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/EqualsMicroPerfAndCodeGenerationTests/KeyR::key2@ + IL_0006: ret + } + + .method public specialname rtspecialname + instance void .ctor(int32 key1, + int32 key2) 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 33 45 71 75 61 6C 73 30 35 2B + 45 71 75 61 6C 73 4D 69 63 72 6F 50 65 72 66 41 + 6E 64 43 6F 64 65 47 65 6E 65 72 61 74 69 6F 6E + 54 65 73 74 73 2B 4B 65 79 52 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/EqualsMicroPerfAndCodeGenerationTests/KeyR::key1@ + IL_000d: ldarg.0 + IL_000e: ldarg.2 + IL_000f: stfld int32 assembly/EqualsMicroPerfAndCodeGenerationTests/KeyR::key2@ + IL_0014: 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/EqualsMicroPerfAndCodeGenerationTests/KeyR>::.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/EqualsMicroPerfAndCodeGenerationTests/KeyR 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, + int32 V_2, + int32 V_3) + IL_0000: ldarg.0 + IL_0001: brfalse.s IL_0050 + + IL_0003: ldarg.1 + IL_0004: brfalse.s IL_004e + + IL_0006: call class [runtime]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() + IL_000b: stloc.1 + IL_000c: ldarg.0 + IL_000d: ldfld int32 assembly/EqualsMicroPerfAndCodeGenerationTests/KeyR::key1@ + IL_0012: stloc.2 + IL_0013: ldarg.1 + IL_0014: ldfld int32 assembly/EqualsMicroPerfAndCodeGenerationTests/KeyR::key1@ + IL_0019: stloc.3 + IL_001a: ldloc.2 + IL_001b: ldloc.3 + IL_001c: cgt + IL_001e: ldloc.2 + IL_001f: ldloc.3 + IL_0020: clt + IL_0022: sub + IL_0023: stloc.0 + IL_0024: ldloc.0 + IL_0025: ldc.i4.0 + IL_0026: bge.s IL_002a + + IL_0028: ldloc.0 + IL_0029: ret + + IL_002a: ldloc.0 + IL_002b: ldc.i4.0 + IL_002c: ble.s IL_0030 + + IL_002e: ldloc.0 + IL_002f: ret + + IL_0030: call class [runtime]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() + IL_0035: stloc.1 + IL_0036: ldarg.0 + IL_0037: ldfld int32 assembly/EqualsMicroPerfAndCodeGenerationTests/KeyR::key2@ + IL_003c: stloc.2 + IL_003d: ldarg.1 + IL_003e: ldfld int32 assembly/EqualsMicroPerfAndCodeGenerationTests/KeyR::key2@ + IL_0043: stloc.3 + IL_0044: ldloc.2 + IL_0045: ldloc.3 + IL_0046: cgt + IL_0048: ldloc.2 + IL_0049: ldloc.3 + IL_004a: clt + IL_004c: sub + IL_004d: ret + + IL_004e: ldc.i4.1 + IL_004f: ret + + IL_0050: ldarg.1 + IL_0051: brfalse.s IL_0055 + + IL_0053: ldc.i4.m1 + IL_0054: ret + + IL_0055: ldc.i4.0 + IL_0056: 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/EqualsMicroPerfAndCodeGenerationTests/KeyR + IL_0007: callvirt instance int32 assembly/EqualsMicroPerfAndCodeGenerationTests/KeyR::CompareTo(class assembly/EqualsMicroPerfAndCodeGenerationTests/KeyR) + 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 assembly/EqualsMicroPerfAndCodeGenerationTests/KeyR V_0, + int32 V_1, + int32 V_2, + int32 V_3) + IL_0000: ldarg.1 + IL_0001: unbox.any assembly/EqualsMicroPerfAndCodeGenerationTests/KeyR + IL_0006: stloc.0 + IL_0007: ldarg.0 + IL_0008: brfalse.s IL_0050 + + IL_000a: ldarg.1 + IL_000b: unbox.any assembly/EqualsMicroPerfAndCodeGenerationTests/KeyR + IL_0010: brfalse.s IL_004e + + IL_0012: ldarg.0 + IL_0013: ldfld int32 assembly/EqualsMicroPerfAndCodeGenerationTests/KeyR::key1@ + IL_0018: stloc.2 + IL_0019: ldloc.0 + IL_001a: ldfld int32 assembly/EqualsMicroPerfAndCodeGenerationTests/KeyR::key1@ + IL_001f: stloc.3 + IL_0020: ldloc.2 + IL_0021: ldloc.3 + IL_0022: cgt + IL_0024: ldloc.2 + IL_0025: ldloc.3 + IL_0026: clt + IL_0028: sub + IL_0029: stloc.1 + IL_002a: ldloc.1 + IL_002b: ldc.i4.0 + IL_002c: bge.s IL_0030 + + IL_002e: ldloc.1 + IL_002f: ret + + IL_0030: ldloc.1 + IL_0031: ldc.i4.0 + IL_0032: ble.s IL_0036 + + IL_0034: ldloc.1 + IL_0035: ret + + IL_0036: ldarg.0 + IL_0037: ldfld int32 assembly/EqualsMicroPerfAndCodeGenerationTests/KeyR::key2@ + IL_003c: stloc.2 + IL_003d: ldloc.0 + IL_003e: ldfld int32 assembly/EqualsMicroPerfAndCodeGenerationTests/KeyR::key2@ + IL_0043: stloc.3 + IL_0044: ldloc.2 + IL_0045: ldloc.3 + IL_0046: cgt + IL_0048: ldloc.2 + IL_0049: ldloc.3 + IL_004a: clt + IL_004c: sub + IL_004d: ret + + IL_004e: ldc.i4.1 + IL_004f: ret + + IL_0050: ldarg.1 + IL_0051: unbox.any assembly/EqualsMicroPerfAndCodeGenerationTests/KeyR + IL_0056: brfalse.s IL_005a + + IL_0058: ldc.i4.m1 + IL_0059: ret + + IL_005a: ldc.i4.0 + IL_005b: 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: ldarg.0 + IL_0001: brfalse.s IL_0031 + + IL_0003: ldc.i4.0 + IL_0004: stloc.0 + IL_0005: ldc.i4 0x9e3779b9 + IL_000a: ldarg.0 + IL_000b: ldfld int32 assembly/EqualsMicroPerfAndCodeGenerationTests/KeyR::key2@ + IL_0010: ldloc.0 + IL_0011: ldc.i4.6 + IL_0012: shl + IL_0013: ldloc.0 + IL_0014: ldc.i4.2 + IL_0015: shr + IL_0016: add + IL_0017: add + IL_0018: add + IL_0019: stloc.0 + IL_001a: ldc.i4 0x9e3779b9 + IL_001f: ldarg.0 + IL_0020: ldfld int32 assembly/EqualsMicroPerfAndCodeGenerationTests/KeyR::key1@ + IL_0025: ldloc.0 + IL_0026: ldc.i4.6 + IL_0027: shl + IL_0028: ldloc.0 + IL_0029: ldc.i4.2 + IL_002a: shr + IL_002b: add + IL_002c: add + IL_002d: add + IL_002e: stloc.0 + IL_002f: ldloc.0 + IL_0030: ret + + IL_0031: ldc.i4.0 + IL_0032: 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/EqualsMicroPerfAndCodeGenerationTests/KeyR::GetHashCode(class [runtime]System.Collections.IEqualityComparer) + IL_000b: 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 4 + .locals init (class assembly/EqualsMicroPerfAndCodeGenerationTests/KeyR V_0) + IL_0000: ldarg.0 + IL_0001: brfalse.s IL_002e + + IL_0003: ldarg.1 + IL_0004: isinst assembly/EqualsMicroPerfAndCodeGenerationTests/KeyR + IL_0009: stloc.0 + IL_000a: ldloc.0 + IL_000b: brfalse.s IL_002c + + IL_000d: ldarg.0 + IL_000e: ldfld int32 assembly/EqualsMicroPerfAndCodeGenerationTests/KeyR::key1@ + IL_0013: ldloc.0 + IL_0014: ldfld int32 assembly/EqualsMicroPerfAndCodeGenerationTests/KeyR::key1@ + IL_0019: bne.un.s IL_002a + + IL_001b: ldarg.0 + IL_001c: ldfld int32 assembly/EqualsMicroPerfAndCodeGenerationTests/KeyR::key2@ + IL_0021: ldloc.0 + IL_0022: ldfld int32 assembly/EqualsMicroPerfAndCodeGenerationTests/KeyR::key2@ + IL_0027: ceq + IL_0029: ret + + IL_002a: ldc.i4.0 + IL_002b: ret + + IL_002c: ldc.i4.0 + IL_002d: ret + + IL_002e: ldarg.1 + IL_002f: ldnull + IL_0030: cgt.un + IL_0032: ldc.i4.0 + IL_0033: ceq + IL_0035: ret + } + + .method public hidebysig virtual final + instance bool Equals(class assembly/EqualsMicroPerfAndCodeGenerationTests/KeyR 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_0027 + + IL_0003: ldarg.1 + IL_0004: brfalse.s IL_0025 + + IL_0006: ldarg.0 + IL_0007: ldfld int32 assembly/EqualsMicroPerfAndCodeGenerationTests/KeyR::key1@ + IL_000c: ldarg.1 + IL_000d: ldfld int32 assembly/EqualsMicroPerfAndCodeGenerationTests/KeyR::key1@ + IL_0012: bne.un.s IL_0023 + + IL_0014: ldarg.0 + IL_0015: ldfld int32 assembly/EqualsMicroPerfAndCodeGenerationTests/KeyR::key2@ + IL_001a: ldarg.1 + IL_001b: ldfld int32 assembly/EqualsMicroPerfAndCodeGenerationTests/KeyR::key2@ + IL_0020: ceq + IL_0022: ret + + IL_0023: ldc.i4.0 + IL_0024: ret + + IL_0025: ldc.i4.0 + IL_0026: ret + + IL_0027: ldarg.1 + IL_0028: ldnull + IL_0029: cgt.un + IL_002b: ldc.i4.0 + IL_002c: ceq + IL_002e: 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/EqualsMicroPerfAndCodeGenerationTests/KeyR V_0) + IL_0000: ldarg.1 + IL_0001: isinst assembly/EqualsMicroPerfAndCodeGenerationTests/KeyR + 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/EqualsMicroPerfAndCodeGenerationTests/KeyR::Equals(class assembly/EqualsMicroPerfAndCodeGenerationTests/KeyR) + IL_0011: ret + + IL_0012: ldc.i4.0 + IL_0013: ret + } + + .property instance int32 key1() + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags, + int32) = ( 01 00 04 00 00 00 00 00 00 00 00 00 ) + .get instance int32 assembly/EqualsMicroPerfAndCodeGenerationTests/KeyR::get_key1() + } + .property instance int32 key2() + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags, + int32) = ( 01 00 04 00 00 00 01 00 00 00 00 00 ) + .get instance int32 assembly/EqualsMicroPerfAndCodeGenerationTests/KeyR::get_key2() + } + } + + .method public static void f5c() cil managed + { + + .maxstack 5 + .locals init (bool V_0, + class assembly/EqualsMicroPerfAndCodeGenerationTests/KeyR V_1, + class assembly/EqualsMicroPerfAndCodeGenerationTests/KeyR V_2, + int32 V_3) + IL_0000: ldc.i4.0 + IL_0001: stloc.0 + IL_0002: ldc.i4.1 + IL_0003: ldc.i4.2 + IL_0004: newobj instance void assembly/EqualsMicroPerfAndCodeGenerationTests/KeyR::.ctor(int32, + int32) + IL_0009: stloc.1 + IL_000a: ldc.i4.1 + IL_000b: ldc.i4.3 + IL_000c: newobj instance void assembly/EqualsMicroPerfAndCodeGenerationTests/KeyR::.ctor(int32, + int32) + IL_0011: stloc.2 + IL_0012: ldc.i4.0 + IL_0013: stloc.3 + IL_0014: br.s IL_0027 + + IL_0016: ldloc.1 + IL_0017: ldloc.2 + IL_0018: call class [runtime]System.Collections.IEqualityComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericEqualityComparer() + IL_001d: callvirt instance bool assembly/EqualsMicroPerfAndCodeGenerationTests/KeyR::Equals(object, + class [runtime]System.Collections.IEqualityComparer) + IL_0022: stloc.0 + IL_0023: ldloc.3 + IL_0024: ldc.i4.1 + IL_0025: add + IL_0026: stloc.3 + IL_0027: ldloc.3 + IL_0028: ldc.i4 0x989681 + IL_002d: blt.s IL_0016 + + IL_002f: ret + } + + } + +} + +.class private abstract auto ansi sealed ''.$assembly$fsx + extends [runtime]System.Object +{ + .method public static void main@() cil managed + { + .entrypoint + + .maxstack 8 + IL_0000: ret + } + +} + +.class private auto ansi 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__ = int32(0x00000000) + .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 +{ + .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 private hidebysig specialname instance void + set_Type(class [runtime]System.Type 'value') 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: ldarg.1 + IL_0002: stfld class [runtime]System.Type System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::Type@ + IL_0007: 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 + } + + .method private hidebysig specialname instance void + set_MemberType(valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes 'value') 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: ldarg.1 + IL_0002: stfld valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::MemberType@ + IL_0007: 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 ) + .set instance void System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::set_MemberType(valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes) + .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 ) + .set instance void System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::set_Type(class [runtime]System.Type) + .get instance class [runtime]System.Type System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::get_Type() + } +} + + + + + + diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/GenericComparison/Equals05.fsx.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/GenericComparison/Equals05.fsx.il.netcore.bsl similarity index 95% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/GenericComparison/Equals05.fsx.il.bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/GenericComparison/Equals05.fsx.il.netcore.bsl index c89cc78089f..0b2be0a0404 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/GenericComparison/Equals05.fsx.il.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/GenericComparison/Equals05.fsx.il.netcore.bsl @@ -1,525 +1,530 @@ - - - - - -.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 -} -.mresource public FSharpSignatureData.assembly -{ - - -} -.mresource public FSharpOptimizationData.assembly -{ - - -} -.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 abstract auto ansi sealed nested public EqualsMicroPerfAndCodeGenerationTests - 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 public KeyR - 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 [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 02 00 00 00 00 00 ) - .field assembly int32 key1@ - .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.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 ) - .field assembly int32 key2@ - .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.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 ) - .method public hidebysig specialname - instance int32 get_key1() 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/EqualsMicroPerfAndCodeGenerationTests/KeyR::key1@ - IL_0006: ret - } - - .method public hidebysig specialname - instance int32 get_key2() 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/EqualsMicroPerfAndCodeGenerationTests/KeyR::key2@ - IL_0006: ret - } - - .method public specialname rtspecialname - instance void .ctor(int32 key1, - int32 key2) cil managed - { - - .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/EqualsMicroPerfAndCodeGenerationTests/KeyR::key1@ - IL_000d: ldarg.0 - IL_000e: ldarg.2 - IL_000f: stfld int32 assembly/EqualsMicroPerfAndCodeGenerationTests/KeyR::key2@ - IL_0014: 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/EqualsMicroPerfAndCodeGenerationTests/KeyR>::.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/EqualsMicroPerfAndCodeGenerationTests/KeyR 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, - int32 V_2, - int32 V_3) - IL_0000: ldarg.0 - IL_0001: brfalse.s IL_0050 - - IL_0003: ldarg.1 - IL_0004: brfalse.s IL_004e - - IL_0006: call class [runtime]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() - IL_000b: stloc.1 - IL_000c: ldarg.0 - IL_000d: ldfld int32 assembly/EqualsMicroPerfAndCodeGenerationTests/KeyR::key1@ - IL_0012: stloc.2 - IL_0013: ldarg.1 - IL_0014: ldfld int32 assembly/EqualsMicroPerfAndCodeGenerationTests/KeyR::key1@ - IL_0019: stloc.3 - IL_001a: ldloc.2 - IL_001b: ldloc.3 - IL_001c: cgt - IL_001e: ldloc.2 - IL_001f: ldloc.3 - IL_0020: clt - IL_0022: sub - IL_0023: stloc.0 - IL_0024: ldloc.0 - IL_0025: ldc.i4.0 - IL_0026: bge.s IL_002a - - IL_0028: ldloc.0 - IL_0029: ret - - IL_002a: ldloc.0 - IL_002b: ldc.i4.0 - IL_002c: ble.s IL_0030 - - IL_002e: ldloc.0 - IL_002f: ret - - IL_0030: call class [runtime]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() - IL_0035: stloc.1 - IL_0036: ldarg.0 - IL_0037: ldfld int32 assembly/EqualsMicroPerfAndCodeGenerationTests/KeyR::key2@ - IL_003c: stloc.2 - IL_003d: ldarg.1 - IL_003e: ldfld int32 assembly/EqualsMicroPerfAndCodeGenerationTests/KeyR::key2@ - IL_0043: stloc.3 - IL_0044: ldloc.2 - IL_0045: ldloc.3 - IL_0046: cgt - IL_0048: ldloc.2 - IL_0049: ldloc.3 - IL_004a: clt - IL_004c: sub - IL_004d: ret - - IL_004e: ldc.i4.1 - IL_004f: ret - - IL_0050: ldarg.1 - IL_0051: brfalse.s IL_0055 - - IL_0053: ldc.i4.m1 - IL_0054: ret - - IL_0055: ldc.i4.0 - IL_0056: 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/EqualsMicroPerfAndCodeGenerationTests/KeyR - IL_0007: callvirt instance int32 assembly/EqualsMicroPerfAndCodeGenerationTests/KeyR::CompareTo(class assembly/EqualsMicroPerfAndCodeGenerationTests/KeyR) - 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 assembly/EqualsMicroPerfAndCodeGenerationTests/KeyR V_0, - int32 V_1, - int32 V_2, - int32 V_3) - IL_0000: ldarg.1 - IL_0001: unbox.any assembly/EqualsMicroPerfAndCodeGenerationTests/KeyR - IL_0006: stloc.0 - IL_0007: ldarg.0 - IL_0008: brfalse.s IL_0050 - - IL_000a: ldarg.1 - IL_000b: unbox.any assembly/EqualsMicroPerfAndCodeGenerationTests/KeyR - IL_0010: brfalse.s IL_004e - - IL_0012: ldarg.0 - IL_0013: ldfld int32 assembly/EqualsMicroPerfAndCodeGenerationTests/KeyR::key1@ - IL_0018: stloc.2 - IL_0019: ldloc.0 - IL_001a: ldfld int32 assembly/EqualsMicroPerfAndCodeGenerationTests/KeyR::key1@ - IL_001f: stloc.3 - IL_0020: ldloc.2 - IL_0021: ldloc.3 - IL_0022: cgt - IL_0024: ldloc.2 - IL_0025: ldloc.3 - IL_0026: clt - IL_0028: sub - IL_0029: stloc.1 - IL_002a: ldloc.1 - IL_002b: ldc.i4.0 - IL_002c: bge.s IL_0030 - - IL_002e: ldloc.1 - IL_002f: ret - - IL_0030: ldloc.1 - IL_0031: ldc.i4.0 - IL_0032: ble.s IL_0036 - - IL_0034: ldloc.1 - IL_0035: ret - - IL_0036: ldarg.0 - IL_0037: ldfld int32 assembly/EqualsMicroPerfAndCodeGenerationTests/KeyR::key2@ - IL_003c: stloc.2 - IL_003d: ldloc.0 - IL_003e: ldfld int32 assembly/EqualsMicroPerfAndCodeGenerationTests/KeyR::key2@ - IL_0043: stloc.3 - IL_0044: ldloc.2 - IL_0045: ldloc.3 - IL_0046: cgt - IL_0048: ldloc.2 - IL_0049: ldloc.3 - IL_004a: clt - IL_004c: sub - IL_004d: ret - - IL_004e: ldc.i4.1 - IL_004f: ret - - IL_0050: ldarg.1 - IL_0051: unbox.any assembly/EqualsMicroPerfAndCodeGenerationTests/KeyR - IL_0056: brfalse.s IL_005a - - IL_0058: ldc.i4.m1 - IL_0059: ret - - IL_005a: ldc.i4.0 - IL_005b: 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: ldarg.0 - IL_0001: brfalse.s IL_0031 - - IL_0003: ldc.i4.0 - IL_0004: stloc.0 - IL_0005: ldc.i4 0x9e3779b9 - IL_000a: ldarg.0 - IL_000b: ldfld int32 assembly/EqualsMicroPerfAndCodeGenerationTests/KeyR::key2@ - IL_0010: ldloc.0 - IL_0011: ldc.i4.6 - IL_0012: shl - IL_0013: ldloc.0 - IL_0014: ldc.i4.2 - IL_0015: shr - IL_0016: add - IL_0017: add - IL_0018: add - IL_0019: stloc.0 - IL_001a: ldc.i4 0x9e3779b9 - IL_001f: ldarg.0 - IL_0020: ldfld int32 assembly/EqualsMicroPerfAndCodeGenerationTests/KeyR::key1@ - IL_0025: ldloc.0 - IL_0026: ldc.i4.6 - IL_0027: shl - IL_0028: ldloc.0 - IL_0029: ldc.i4.2 - IL_002a: shr - IL_002b: add - IL_002c: add - IL_002d: add - IL_002e: stloc.0 - IL_002f: ldloc.0 - IL_0030: ret - - IL_0031: ldc.i4.0 - IL_0032: 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/EqualsMicroPerfAndCodeGenerationTests/KeyR::GetHashCode(class [runtime]System.Collections.IEqualityComparer) - IL_000b: 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 4 - .locals init (class assembly/EqualsMicroPerfAndCodeGenerationTests/KeyR V_0) - IL_0000: ldarg.0 - IL_0001: brfalse.s IL_002e - - IL_0003: ldarg.1 - IL_0004: isinst assembly/EqualsMicroPerfAndCodeGenerationTests/KeyR - IL_0009: stloc.0 - IL_000a: ldloc.0 - IL_000b: brfalse.s IL_002c - - IL_000d: ldarg.0 - IL_000e: ldfld int32 assembly/EqualsMicroPerfAndCodeGenerationTests/KeyR::key1@ - IL_0013: ldloc.0 - IL_0014: ldfld int32 assembly/EqualsMicroPerfAndCodeGenerationTests/KeyR::key1@ - IL_0019: bne.un.s IL_002a - - IL_001b: ldarg.0 - IL_001c: ldfld int32 assembly/EqualsMicroPerfAndCodeGenerationTests/KeyR::key2@ - IL_0021: ldloc.0 - IL_0022: ldfld int32 assembly/EqualsMicroPerfAndCodeGenerationTests/KeyR::key2@ - IL_0027: ceq - IL_0029: ret - - IL_002a: ldc.i4.0 - IL_002b: ret - - IL_002c: ldc.i4.0 - IL_002d: ret - - IL_002e: ldarg.1 - IL_002f: ldnull - IL_0030: cgt.un - IL_0032: ldc.i4.0 - IL_0033: ceq - IL_0035: ret - } - - .method public hidebysig virtual final - instance bool Equals(class assembly/EqualsMicroPerfAndCodeGenerationTests/KeyR 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_0027 - - IL_0003: ldarg.1 - IL_0004: brfalse.s IL_0025 - - IL_0006: ldarg.0 - IL_0007: ldfld int32 assembly/EqualsMicroPerfAndCodeGenerationTests/KeyR::key1@ - IL_000c: ldarg.1 - IL_000d: ldfld int32 assembly/EqualsMicroPerfAndCodeGenerationTests/KeyR::key1@ - IL_0012: bne.un.s IL_0023 - - IL_0014: ldarg.0 - IL_0015: ldfld int32 assembly/EqualsMicroPerfAndCodeGenerationTests/KeyR::key2@ - IL_001a: ldarg.1 - IL_001b: ldfld int32 assembly/EqualsMicroPerfAndCodeGenerationTests/KeyR::key2@ - IL_0020: ceq - IL_0022: ret - - IL_0023: ldc.i4.0 - IL_0024: ret - - IL_0025: ldc.i4.0 - IL_0026: ret - - IL_0027: ldarg.1 - IL_0028: ldnull - IL_0029: cgt.un - IL_002b: ldc.i4.0 - IL_002c: ceq - IL_002e: 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/EqualsMicroPerfAndCodeGenerationTests/KeyR V_0) - IL_0000: ldarg.1 - IL_0001: isinst assembly/EqualsMicroPerfAndCodeGenerationTests/KeyR - 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/EqualsMicroPerfAndCodeGenerationTests/KeyR::Equals(class assembly/EqualsMicroPerfAndCodeGenerationTests/KeyR) - IL_0011: ret - - IL_0012: ldc.i4.0 - IL_0013: ret - } - - .property instance int32 key1() - { - .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags, - int32) = ( 01 00 04 00 00 00 00 00 00 00 00 00 ) - .get instance int32 assembly/EqualsMicroPerfAndCodeGenerationTests/KeyR::get_key1() - } - .property instance int32 key2() - { - .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags, - int32) = ( 01 00 04 00 00 00 01 00 00 00 00 00 ) - .get instance int32 assembly/EqualsMicroPerfAndCodeGenerationTests/KeyR::get_key2() - } - } - - .method public static void f5c() cil managed - { - - .maxstack 5 - .locals init (bool V_0, - class assembly/EqualsMicroPerfAndCodeGenerationTests/KeyR V_1, - class assembly/EqualsMicroPerfAndCodeGenerationTests/KeyR V_2, - int32 V_3) - IL_0000: ldc.i4.0 - IL_0001: stloc.0 - IL_0002: ldc.i4.1 - IL_0003: ldc.i4.2 - IL_0004: newobj instance void assembly/EqualsMicroPerfAndCodeGenerationTests/KeyR::.ctor(int32, - int32) - IL_0009: stloc.1 - IL_000a: ldc.i4.1 - IL_000b: ldc.i4.3 - IL_000c: newobj instance void assembly/EqualsMicroPerfAndCodeGenerationTests/KeyR::.ctor(int32, - int32) - IL_0011: stloc.2 - IL_0012: ldc.i4.0 - IL_0013: stloc.3 - IL_0014: br.s IL_0027 - - IL_0016: ldloc.1 - IL_0017: ldloc.2 - IL_0018: call class [runtime]System.Collections.IEqualityComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericEqualityComparer() - IL_001d: callvirt instance bool assembly/EqualsMicroPerfAndCodeGenerationTests/KeyR::Equals(object, - class [runtime]System.Collections.IEqualityComparer) - IL_0022: stloc.0 - IL_0023: ldloc.3 - IL_0024: ldc.i4.1 - IL_0025: add - IL_0026: stloc.3 - IL_0027: ldloc.3 - IL_0028: ldc.i4 0x989681 - IL_002d: blt.s IL_0016 - - IL_002f: ret - } - - } - -} - -.class private abstract auto ansi sealed ''.$assembly$fsx - extends [runtime]System.Object -{ - .method public static void main@() cil managed - { - .entrypoint - - .maxstack 8 - IL_0000: ret - } - -} - - - - - - + + + + + +.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 +} +.mresource public FSharpSignatureData.assembly +{ + + +} +.mresource public FSharpOptimizationData.assembly +{ + + +} +.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 abstract auto ansi sealed nested public EqualsMicroPerfAndCodeGenerationTests + 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 public KeyR + 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 [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 02 00 00 00 00 00 ) + .field assembly int32 key1@ + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.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 ) + .field assembly int32 key2@ + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.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 ) + .method public hidebysig specialname + instance int32 get_key1() 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/EqualsMicroPerfAndCodeGenerationTests/KeyR::key1@ + IL_0006: ret + } + + .method public hidebysig specialname + instance int32 get_key2() 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/EqualsMicroPerfAndCodeGenerationTests/KeyR::key2@ + IL_0006: ret + } + + .method public specialname rtspecialname + instance void .ctor(int32 key1, + int32 key2) cil managed + { + .custom instance void [runtime]System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::.ctor(valuetype [runtime]System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes, + class [runtime]System.Type) = ( 01 00 60 06 00 00 33 45 71 75 61 6C 73 30 35 2B + 45 71 75 61 6C 73 4D 69 63 72 6F 50 65 72 66 41 + 6E 64 43 6F 64 65 47 65 6E 65 72 61 74 69 6F 6E + 54 65 73 74 73 2B 4B 65 79 52 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/EqualsMicroPerfAndCodeGenerationTests/KeyR::key1@ + IL_000d: ldarg.0 + IL_000e: ldarg.2 + IL_000f: stfld int32 assembly/EqualsMicroPerfAndCodeGenerationTests/KeyR::key2@ + IL_0014: 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/EqualsMicroPerfAndCodeGenerationTests/KeyR>::.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/EqualsMicroPerfAndCodeGenerationTests/KeyR 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, + int32 V_2, + int32 V_3) + IL_0000: ldarg.0 + IL_0001: brfalse.s IL_0050 + + IL_0003: ldarg.1 + IL_0004: brfalse.s IL_004e + + IL_0006: call class [runtime]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() + IL_000b: stloc.1 + IL_000c: ldarg.0 + IL_000d: ldfld int32 assembly/EqualsMicroPerfAndCodeGenerationTests/KeyR::key1@ + IL_0012: stloc.2 + IL_0013: ldarg.1 + IL_0014: ldfld int32 assembly/EqualsMicroPerfAndCodeGenerationTests/KeyR::key1@ + IL_0019: stloc.3 + IL_001a: ldloc.2 + IL_001b: ldloc.3 + IL_001c: cgt + IL_001e: ldloc.2 + IL_001f: ldloc.3 + IL_0020: clt + IL_0022: sub + IL_0023: stloc.0 + IL_0024: ldloc.0 + IL_0025: ldc.i4.0 + IL_0026: bge.s IL_002a + + IL_0028: ldloc.0 + IL_0029: ret + + IL_002a: ldloc.0 + IL_002b: ldc.i4.0 + IL_002c: ble.s IL_0030 + + IL_002e: ldloc.0 + IL_002f: ret + + IL_0030: call class [runtime]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() + IL_0035: stloc.1 + IL_0036: ldarg.0 + IL_0037: ldfld int32 assembly/EqualsMicroPerfAndCodeGenerationTests/KeyR::key2@ + IL_003c: stloc.2 + IL_003d: ldarg.1 + IL_003e: ldfld int32 assembly/EqualsMicroPerfAndCodeGenerationTests/KeyR::key2@ + IL_0043: stloc.3 + IL_0044: ldloc.2 + IL_0045: ldloc.3 + IL_0046: cgt + IL_0048: ldloc.2 + IL_0049: ldloc.3 + IL_004a: clt + IL_004c: sub + IL_004d: ret + + IL_004e: ldc.i4.1 + IL_004f: ret + + IL_0050: ldarg.1 + IL_0051: brfalse.s IL_0055 + + IL_0053: ldc.i4.m1 + IL_0054: ret + + IL_0055: ldc.i4.0 + IL_0056: 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/EqualsMicroPerfAndCodeGenerationTests/KeyR + IL_0007: callvirt instance int32 assembly/EqualsMicroPerfAndCodeGenerationTests/KeyR::CompareTo(class assembly/EqualsMicroPerfAndCodeGenerationTests/KeyR) + 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 assembly/EqualsMicroPerfAndCodeGenerationTests/KeyR V_0, + int32 V_1, + int32 V_2, + int32 V_3) + IL_0000: ldarg.1 + IL_0001: unbox.any assembly/EqualsMicroPerfAndCodeGenerationTests/KeyR + IL_0006: stloc.0 + IL_0007: ldarg.0 + IL_0008: brfalse.s IL_0050 + + IL_000a: ldarg.1 + IL_000b: unbox.any assembly/EqualsMicroPerfAndCodeGenerationTests/KeyR + IL_0010: brfalse.s IL_004e + + IL_0012: ldarg.0 + IL_0013: ldfld int32 assembly/EqualsMicroPerfAndCodeGenerationTests/KeyR::key1@ + IL_0018: stloc.2 + IL_0019: ldloc.0 + IL_001a: ldfld int32 assembly/EqualsMicroPerfAndCodeGenerationTests/KeyR::key1@ + IL_001f: stloc.3 + IL_0020: ldloc.2 + IL_0021: ldloc.3 + IL_0022: cgt + IL_0024: ldloc.2 + IL_0025: ldloc.3 + IL_0026: clt + IL_0028: sub + IL_0029: stloc.1 + IL_002a: ldloc.1 + IL_002b: ldc.i4.0 + IL_002c: bge.s IL_0030 + + IL_002e: ldloc.1 + IL_002f: ret + + IL_0030: ldloc.1 + IL_0031: ldc.i4.0 + IL_0032: ble.s IL_0036 + + IL_0034: ldloc.1 + IL_0035: ret + + IL_0036: ldarg.0 + IL_0037: ldfld int32 assembly/EqualsMicroPerfAndCodeGenerationTests/KeyR::key2@ + IL_003c: stloc.2 + IL_003d: ldloc.0 + IL_003e: ldfld int32 assembly/EqualsMicroPerfAndCodeGenerationTests/KeyR::key2@ + IL_0043: stloc.3 + IL_0044: ldloc.2 + IL_0045: ldloc.3 + IL_0046: cgt + IL_0048: ldloc.2 + IL_0049: ldloc.3 + IL_004a: clt + IL_004c: sub + IL_004d: ret + + IL_004e: ldc.i4.1 + IL_004f: ret + + IL_0050: ldarg.1 + IL_0051: unbox.any assembly/EqualsMicroPerfAndCodeGenerationTests/KeyR + IL_0056: brfalse.s IL_005a + + IL_0058: ldc.i4.m1 + IL_0059: ret + + IL_005a: ldc.i4.0 + IL_005b: 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: ldarg.0 + IL_0001: brfalse.s IL_0031 + + IL_0003: ldc.i4.0 + IL_0004: stloc.0 + IL_0005: ldc.i4 0x9e3779b9 + IL_000a: ldarg.0 + IL_000b: ldfld int32 assembly/EqualsMicroPerfAndCodeGenerationTests/KeyR::key2@ + IL_0010: ldloc.0 + IL_0011: ldc.i4.6 + IL_0012: shl + IL_0013: ldloc.0 + IL_0014: ldc.i4.2 + IL_0015: shr + IL_0016: add + IL_0017: add + IL_0018: add + IL_0019: stloc.0 + IL_001a: ldc.i4 0x9e3779b9 + IL_001f: ldarg.0 + IL_0020: ldfld int32 assembly/EqualsMicroPerfAndCodeGenerationTests/KeyR::key1@ + IL_0025: ldloc.0 + IL_0026: ldc.i4.6 + IL_0027: shl + IL_0028: ldloc.0 + IL_0029: ldc.i4.2 + IL_002a: shr + IL_002b: add + IL_002c: add + IL_002d: add + IL_002e: stloc.0 + IL_002f: ldloc.0 + IL_0030: ret + + IL_0031: ldc.i4.0 + IL_0032: 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/EqualsMicroPerfAndCodeGenerationTests/KeyR::GetHashCode(class [runtime]System.Collections.IEqualityComparer) + IL_000b: 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 4 + .locals init (class assembly/EqualsMicroPerfAndCodeGenerationTests/KeyR V_0) + IL_0000: ldarg.0 + IL_0001: brfalse.s IL_002e + + IL_0003: ldarg.1 + IL_0004: isinst assembly/EqualsMicroPerfAndCodeGenerationTests/KeyR + IL_0009: stloc.0 + IL_000a: ldloc.0 + IL_000b: brfalse.s IL_002c + + IL_000d: ldarg.0 + IL_000e: ldfld int32 assembly/EqualsMicroPerfAndCodeGenerationTests/KeyR::key1@ + IL_0013: ldloc.0 + IL_0014: ldfld int32 assembly/EqualsMicroPerfAndCodeGenerationTests/KeyR::key1@ + IL_0019: bne.un.s IL_002a + + IL_001b: ldarg.0 + IL_001c: ldfld int32 assembly/EqualsMicroPerfAndCodeGenerationTests/KeyR::key2@ + IL_0021: ldloc.0 + IL_0022: ldfld int32 assembly/EqualsMicroPerfAndCodeGenerationTests/KeyR::key2@ + IL_0027: ceq + IL_0029: ret + + IL_002a: ldc.i4.0 + IL_002b: ret + + IL_002c: ldc.i4.0 + IL_002d: ret + + IL_002e: ldarg.1 + IL_002f: ldnull + IL_0030: cgt.un + IL_0032: ldc.i4.0 + IL_0033: ceq + IL_0035: ret + } + + .method public hidebysig virtual final + instance bool Equals(class assembly/EqualsMicroPerfAndCodeGenerationTests/KeyR 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_0027 + + IL_0003: ldarg.1 + IL_0004: brfalse.s IL_0025 + + IL_0006: ldarg.0 + IL_0007: ldfld int32 assembly/EqualsMicroPerfAndCodeGenerationTests/KeyR::key1@ + IL_000c: ldarg.1 + IL_000d: ldfld int32 assembly/EqualsMicroPerfAndCodeGenerationTests/KeyR::key1@ + IL_0012: bne.un.s IL_0023 + + IL_0014: ldarg.0 + IL_0015: ldfld int32 assembly/EqualsMicroPerfAndCodeGenerationTests/KeyR::key2@ + IL_001a: ldarg.1 + IL_001b: ldfld int32 assembly/EqualsMicroPerfAndCodeGenerationTests/KeyR::key2@ + IL_0020: ceq + IL_0022: ret + + IL_0023: ldc.i4.0 + IL_0024: ret + + IL_0025: ldc.i4.0 + IL_0026: ret + + IL_0027: ldarg.1 + IL_0028: ldnull + IL_0029: cgt.un + IL_002b: ldc.i4.0 + IL_002c: ceq + IL_002e: 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/EqualsMicroPerfAndCodeGenerationTests/KeyR V_0) + IL_0000: ldarg.1 + IL_0001: isinst assembly/EqualsMicroPerfAndCodeGenerationTests/KeyR + 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/EqualsMicroPerfAndCodeGenerationTests/KeyR::Equals(class assembly/EqualsMicroPerfAndCodeGenerationTests/KeyR) + IL_0011: ret + + IL_0012: ldc.i4.0 + IL_0013: ret + } + + .property instance int32 key1() + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags, + int32) = ( 01 00 04 00 00 00 00 00 00 00 00 00 ) + .get instance int32 assembly/EqualsMicroPerfAndCodeGenerationTests/KeyR::get_key1() + } + .property instance int32 key2() + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags, + int32) = ( 01 00 04 00 00 00 01 00 00 00 00 00 ) + .get instance int32 assembly/EqualsMicroPerfAndCodeGenerationTests/KeyR::get_key2() + } + } + + .method public static void f5c() cil managed + { + + .maxstack 5 + .locals init (bool V_0, + class assembly/EqualsMicroPerfAndCodeGenerationTests/KeyR V_1, + class assembly/EqualsMicroPerfAndCodeGenerationTests/KeyR V_2, + int32 V_3) + IL_0000: ldc.i4.0 + IL_0001: stloc.0 + IL_0002: ldc.i4.1 + IL_0003: ldc.i4.2 + IL_0004: newobj instance void assembly/EqualsMicroPerfAndCodeGenerationTests/KeyR::.ctor(int32, + int32) + IL_0009: stloc.1 + IL_000a: ldc.i4.1 + IL_000b: ldc.i4.3 + IL_000c: newobj instance void assembly/EqualsMicroPerfAndCodeGenerationTests/KeyR::.ctor(int32, + int32) + IL_0011: stloc.2 + IL_0012: ldc.i4.0 + IL_0013: stloc.3 + IL_0014: br.s IL_0027 + + IL_0016: ldloc.1 + IL_0017: ldloc.2 + IL_0018: call class [runtime]System.Collections.IEqualityComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericEqualityComparer() + IL_001d: callvirt instance bool assembly/EqualsMicroPerfAndCodeGenerationTests/KeyR::Equals(object, + class [runtime]System.Collections.IEqualityComparer) + IL_0022: stloc.0 + IL_0023: ldloc.3 + IL_0024: ldc.i4.1 + IL_0025: add + IL_0026: stloc.3 + IL_0027: ldloc.3 + IL_0028: ldc.i4 0x989681 + IL_002d: blt.s IL_0016 + + IL_002f: ret + } + + } + +} + +.class private abstract auto ansi sealed ''.$assembly$fsx + extends [runtime]System.Object +{ + .method public static void main@() cil managed + { + .entrypoint + + .maxstack 8 + IL_0000: ret + } + +} + + + + + + diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/GenericComparison/Hash08.fsx.il.net472.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/GenericComparison/Hash08.fsx.il.net472.bsl new file mode 100644 index 00000000000..ce74f3ca8f8 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/GenericComparison/Hash08.fsx.il.net472.bsl @@ -0,0 +1,639 @@ + + + + + +.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 +} +.mresource public FSharpSignatureData.assembly +{ + + +} +.mresource public FSharpOptimizationData.assembly +{ + + +} +.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 abstract auto ansi sealed nested public HashMicroPerfAndCodeGenerationTests + 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 public KeyR + 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 [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 02 00 00 00 00 00 ) + .field assembly int32 key1@ + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.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 ) + .field assembly int32 key2@ + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.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 ) + .method public hidebysig specialname + instance int32 get_key1() 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/HashMicroPerfAndCodeGenerationTests/KeyR::key1@ + IL_0006: ret + } + + .method public hidebysig specialname + instance int32 get_key2() 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/HashMicroPerfAndCodeGenerationTests/KeyR::key2@ + IL_0006: ret + } + + .method public specialname rtspecialname + instance void .ctor(int32 key1, + int32 key2) 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 2F 48 61 73 68 30 38 2B 48 61 + 73 68 4D 69 63 72 6F 50 65 72 66 41 6E 64 43 6F + 64 65 47 65 6E 65 72 61 74 69 6F 6E 54 65 73 74 + 73 2B 4B 65 79 52 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/HashMicroPerfAndCodeGenerationTests/KeyR::key1@ + IL_000d: ldarg.0 + IL_000e: ldarg.2 + IL_000f: stfld int32 assembly/HashMicroPerfAndCodeGenerationTests/KeyR::key2@ + IL_0014: 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/HashMicroPerfAndCodeGenerationTests/KeyR>::.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/HashMicroPerfAndCodeGenerationTests/KeyR 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, + int32 V_2, + int32 V_3) + IL_0000: ldarg.0 + IL_0001: brfalse.s IL_0050 + + IL_0003: ldarg.1 + IL_0004: brfalse.s IL_004e + + IL_0006: call class [runtime]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() + IL_000b: stloc.1 + IL_000c: ldarg.0 + IL_000d: ldfld int32 assembly/HashMicroPerfAndCodeGenerationTests/KeyR::key1@ + IL_0012: stloc.2 + IL_0013: ldarg.1 + IL_0014: ldfld int32 assembly/HashMicroPerfAndCodeGenerationTests/KeyR::key1@ + IL_0019: stloc.3 + IL_001a: ldloc.2 + IL_001b: ldloc.3 + IL_001c: cgt + IL_001e: ldloc.2 + IL_001f: ldloc.3 + IL_0020: clt + IL_0022: sub + IL_0023: stloc.0 + IL_0024: ldloc.0 + IL_0025: ldc.i4.0 + IL_0026: bge.s IL_002a + + IL_0028: ldloc.0 + IL_0029: ret + + IL_002a: ldloc.0 + IL_002b: ldc.i4.0 + IL_002c: ble.s IL_0030 + + IL_002e: ldloc.0 + IL_002f: ret + + IL_0030: call class [runtime]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() + IL_0035: stloc.1 + IL_0036: ldarg.0 + IL_0037: ldfld int32 assembly/HashMicroPerfAndCodeGenerationTests/KeyR::key2@ + IL_003c: stloc.2 + IL_003d: ldarg.1 + IL_003e: ldfld int32 assembly/HashMicroPerfAndCodeGenerationTests/KeyR::key2@ + IL_0043: stloc.3 + IL_0044: ldloc.2 + IL_0045: ldloc.3 + IL_0046: cgt + IL_0048: ldloc.2 + IL_0049: ldloc.3 + IL_004a: clt + IL_004c: sub + IL_004d: ret + + IL_004e: ldc.i4.1 + IL_004f: ret + + IL_0050: ldarg.1 + IL_0051: brfalse.s IL_0055 + + IL_0053: ldc.i4.m1 + IL_0054: ret + + IL_0055: ldc.i4.0 + IL_0056: 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/HashMicroPerfAndCodeGenerationTests/KeyR + IL_0007: callvirt instance int32 assembly/HashMicroPerfAndCodeGenerationTests/KeyR::CompareTo(class assembly/HashMicroPerfAndCodeGenerationTests/KeyR) + 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 assembly/HashMicroPerfAndCodeGenerationTests/KeyR V_0, + int32 V_1, + int32 V_2, + int32 V_3) + IL_0000: ldarg.1 + IL_0001: unbox.any assembly/HashMicroPerfAndCodeGenerationTests/KeyR + IL_0006: stloc.0 + IL_0007: ldarg.0 + IL_0008: brfalse.s IL_0050 + + IL_000a: ldarg.1 + IL_000b: unbox.any assembly/HashMicroPerfAndCodeGenerationTests/KeyR + IL_0010: brfalse.s IL_004e + + IL_0012: ldarg.0 + IL_0013: ldfld int32 assembly/HashMicroPerfAndCodeGenerationTests/KeyR::key1@ + IL_0018: stloc.2 + IL_0019: ldloc.0 + IL_001a: ldfld int32 assembly/HashMicroPerfAndCodeGenerationTests/KeyR::key1@ + IL_001f: stloc.3 + IL_0020: ldloc.2 + IL_0021: ldloc.3 + IL_0022: cgt + IL_0024: ldloc.2 + IL_0025: ldloc.3 + IL_0026: clt + IL_0028: sub + IL_0029: stloc.1 + IL_002a: ldloc.1 + IL_002b: ldc.i4.0 + IL_002c: bge.s IL_0030 + + IL_002e: ldloc.1 + IL_002f: ret + + IL_0030: ldloc.1 + IL_0031: ldc.i4.0 + IL_0032: ble.s IL_0036 + + IL_0034: ldloc.1 + IL_0035: ret + + IL_0036: ldarg.0 + IL_0037: ldfld int32 assembly/HashMicroPerfAndCodeGenerationTests/KeyR::key2@ + IL_003c: stloc.2 + IL_003d: ldloc.0 + IL_003e: ldfld int32 assembly/HashMicroPerfAndCodeGenerationTests/KeyR::key2@ + IL_0043: stloc.3 + IL_0044: ldloc.2 + IL_0045: ldloc.3 + IL_0046: cgt + IL_0048: ldloc.2 + IL_0049: ldloc.3 + IL_004a: clt + IL_004c: sub + IL_004d: ret + + IL_004e: ldc.i4.1 + IL_004f: ret + + IL_0050: ldarg.1 + IL_0051: unbox.any assembly/HashMicroPerfAndCodeGenerationTests/KeyR + IL_0056: brfalse.s IL_005a + + IL_0058: ldc.i4.m1 + IL_0059: ret + + IL_005a: ldc.i4.0 + IL_005b: 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: ldarg.0 + IL_0001: brfalse.s IL_0031 + + IL_0003: ldc.i4.0 + IL_0004: stloc.0 + IL_0005: ldc.i4 0x9e3779b9 + IL_000a: ldarg.0 + IL_000b: ldfld int32 assembly/HashMicroPerfAndCodeGenerationTests/KeyR::key2@ + IL_0010: ldloc.0 + IL_0011: ldc.i4.6 + IL_0012: shl + IL_0013: ldloc.0 + IL_0014: ldc.i4.2 + IL_0015: shr + IL_0016: add + IL_0017: add + IL_0018: add + IL_0019: stloc.0 + IL_001a: ldc.i4 0x9e3779b9 + IL_001f: ldarg.0 + IL_0020: ldfld int32 assembly/HashMicroPerfAndCodeGenerationTests/KeyR::key1@ + IL_0025: ldloc.0 + IL_0026: ldc.i4.6 + IL_0027: shl + IL_0028: ldloc.0 + IL_0029: ldc.i4.2 + IL_002a: shr + IL_002b: add + IL_002c: add + IL_002d: add + IL_002e: stloc.0 + IL_002f: ldloc.0 + IL_0030: ret + + IL_0031: ldc.i4.0 + IL_0032: 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/HashMicroPerfAndCodeGenerationTests/KeyR::GetHashCode(class [runtime]System.Collections.IEqualityComparer) + IL_000b: 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 4 + .locals init (class assembly/HashMicroPerfAndCodeGenerationTests/KeyR V_0) + IL_0000: ldarg.0 + IL_0001: brfalse.s IL_002e + + IL_0003: ldarg.1 + IL_0004: isinst assembly/HashMicroPerfAndCodeGenerationTests/KeyR + IL_0009: stloc.0 + IL_000a: ldloc.0 + IL_000b: brfalse.s IL_002c + + IL_000d: ldarg.0 + IL_000e: ldfld int32 assembly/HashMicroPerfAndCodeGenerationTests/KeyR::key1@ + IL_0013: ldloc.0 + IL_0014: ldfld int32 assembly/HashMicroPerfAndCodeGenerationTests/KeyR::key1@ + IL_0019: bne.un.s IL_002a + + IL_001b: ldarg.0 + IL_001c: ldfld int32 assembly/HashMicroPerfAndCodeGenerationTests/KeyR::key2@ + IL_0021: ldloc.0 + IL_0022: ldfld int32 assembly/HashMicroPerfAndCodeGenerationTests/KeyR::key2@ + IL_0027: ceq + IL_0029: ret + + IL_002a: ldc.i4.0 + IL_002b: ret + + IL_002c: ldc.i4.0 + IL_002d: ret + + IL_002e: ldarg.1 + IL_002f: ldnull + IL_0030: cgt.un + IL_0032: ldc.i4.0 + IL_0033: ceq + IL_0035: ret + } + + .method public hidebysig virtual final + instance bool Equals(class assembly/HashMicroPerfAndCodeGenerationTests/KeyR 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_0027 + + IL_0003: ldarg.1 + IL_0004: brfalse.s IL_0025 + + IL_0006: ldarg.0 + IL_0007: ldfld int32 assembly/HashMicroPerfAndCodeGenerationTests/KeyR::key1@ + IL_000c: ldarg.1 + IL_000d: ldfld int32 assembly/HashMicroPerfAndCodeGenerationTests/KeyR::key1@ + IL_0012: bne.un.s IL_0023 + + IL_0014: ldarg.0 + IL_0015: ldfld int32 assembly/HashMicroPerfAndCodeGenerationTests/KeyR::key2@ + IL_001a: ldarg.1 + IL_001b: ldfld int32 assembly/HashMicroPerfAndCodeGenerationTests/KeyR::key2@ + IL_0020: ceq + IL_0022: ret + + IL_0023: ldc.i4.0 + IL_0024: ret + + IL_0025: ldc.i4.0 + IL_0026: ret + + IL_0027: ldarg.1 + IL_0028: ldnull + IL_0029: cgt.un + IL_002b: ldc.i4.0 + IL_002c: ceq + IL_002e: 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/HashMicroPerfAndCodeGenerationTests/KeyR V_0) + IL_0000: ldarg.1 + IL_0001: isinst assembly/HashMicroPerfAndCodeGenerationTests/KeyR + 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/HashMicroPerfAndCodeGenerationTests/KeyR::Equals(class assembly/HashMicroPerfAndCodeGenerationTests/KeyR) + IL_0011: ret + + IL_0012: ldc.i4.0 + IL_0013: ret + } + + .property instance int32 key1() + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags, + int32) = ( 01 00 04 00 00 00 00 00 00 00 00 00 ) + .get instance int32 assembly/HashMicroPerfAndCodeGenerationTests/KeyR::get_key1() + } + .property instance int32 key2() + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags, + int32) = ( 01 00 04 00 00 00 01 00 00 00 00 00 ) + .get instance int32 assembly/HashMicroPerfAndCodeGenerationTests/KeyR::get_key2() + } + } + + .method public static void f5c() cil managed + { + + .maxstack 4 + .locals init (int32 V_0, + int32 V_1) + IL_0000: nop + IL_0001: ldc.i4.0 + IL_0002: stloc.0 + IL_0003: br.s IL_001b + + IL_0005: ldc.i4.1 + IL_0006: ldc.i4.2 + IL_0007: newobj instance void assembly/HashMicroPerfAndCodeGenerationTests/KeyR::.ctor(int32, + int32) + IL_000c: call class [runtime]System.Collections.IEqualityComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericEqualityERComparer() + IL_0011: callvirt instance int32 assembly/HashMicroPerfAndCodeGenerationTests/KeyR::GetHashCode(class [runtime]System.Collections.IEqualityComparer) + IL_0016: stloc.1 + IL_0017: ldloc.0 + IL_0018: ldc.i4.1 + IL_0019: add + IL_001a: stloc.0 + IL_001b: ldloc.0 + IL_001c: ldc.i4 0x989681 + IL_0021: blt.s IL_0005 + + IL_0023: ret + } + + } + +} + +.class private abstract auto ansi sealed ''.$assembly$fsx + extends [runtime]System.Object +{ + .method public static void main@() cil managed + { + .entrypoint + + .maxstack 8 + IL_0000: ret + } + +} + +.class private auto ansi 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__ = int32(0x00000000) + .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 +{ + .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 private hidebysig specialname instance void + set_Type(class [runtime]System.Type 'value') 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: ldarg.1 + IL_0002: stfld class [runtime]System.Type System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::Type@ + IL_0007: 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 + } + + .method private hidebysig specialname instance void + set_MemberType(valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes 'value') 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: ldarg.1 + IL_0002: stfld valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::MemberType@ + IL_0007: 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 ) + .set instance void System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::set_MemberType(valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes) + .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 ) + .set instance void System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::set_Type(class [runtime]System.Type) + .get instance class [runtime]System.Type System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::get_Type() + } +} + + + + + + diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/GenericComparison/Hash08.fsx.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/GenericComparison/Hash08.fsx.il.netcore.bsl similarity index 95% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/GenericComparison/Hash08.fsx.il.bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/GenericComparison/Hash08.fsx.il.netcore.bsl index cc47d29e1d5..1762a694211 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/GenericComparison/Hash08.fsx.il.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/GenericComparison/Hash08.fsx.il.netcore.bsl @@ -1,513 +1,518 @@ - - - - - -.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 -} -.mresource public FSharpSignatureData.assembly -{ - - -} -.mresource public FSharpOptimizationData.assembly -{ - - -} -.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 abstract auto ansi sealed nested public HashMicroPerfAndCodeGenerationTests - 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 public KeyR - 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 [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 02 00 00 00 00 00 ) - .field assembly int32 key1@ - .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.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 ) - .field assembly int32 key2@ - .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.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 ) - .method public hidebysig specialname - instance int32 get_key1() 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/HashMicroPerfAndCodeGenerationTests/KeyR::key1@ - IL_0006: ret - } - - .method public hidebysig specialname - instance int32 get_key2() 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/HashMicroPerfAndCodeGenerationTests/KeyR::key2@ - IL_0006: ret - } - - .method public specialname rtspecialname - instance void .ctor(int32 key1, - int32 key2) cil managed - { - - .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/HashMicroPerfAndCodeGenerationTests/KeyR::key1@ - IL_000d: ldarg.0 - IL_000e: ldarg.2 - IL_000f: stfld int32 assembly/HashMicroPerfAndCodeGenerationTests/KeyR::key2@ - IL_0014: 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/HashMicroPerfAndCodeGenerationTests/KeyR>::.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/HashMicroPerfAndCodeGenerationTests/KeyR 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, - int32 V_2, - int32 V_3) - IL_0000: ldarg.0 - IL_0001: brfalse.s IL_0050 - - IL_0003: ldarg.1 - IL_0004: brfalse.s IL_004e - - IL_0006: call class [runtime]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() - IL_000b: stloc.1 - IL_000c: ldarg.0 - IL_000d: ldfld int32 assembly/HashMicroPerfAndCodeGenerationTests/KeyR::key1@ - IL_0012: stloc.2 - IL_0013: ldarg.1 - IL_0014: ldfld int32 assembly/HashMicroPerfAndCodeGenerationTests/KeyR::key1@ - IL_0019: stloc.3 - IL_001a: ldloc.2 - IL_001b: ldloc.3 - IL_001c: cgt - IL_001e: ldloc.2 - IL_001f: ldloc.3 - IL_0020: clt - IL_0022: sub - IL_0023: stloc.0 - IL_0024: ldloc.0 - IL_0025: ldc.i4.0 - IL_0026: bge.s IL_002a - - IL_0028: ldloc.0 - IL_0029: ret - - IL_002a: ldloc.0 - IL_002b: ldc.i4.0 - IL_002c: ble.s IL_0030 - - IL_002e: ldloc.0 - IL_002f: ret - - IL_0030: call class [runtime]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() - IL_0035: stloc.1 - IL_0036: ldarg.0 - IL_0037: ldfld int32 assembly/HashMicroPerfAndCodeGenerationTests/KeyR::key2@ - IL_003c: stloc.2 - IL_003d: ldarg.1 - IL_003e: ldfld int32 assembly/HashMicroPerfAndCodeGenerationTests/KeyR::key2@ - IL_0043: stloc.3 - IL_0044: ldloc.2 - IL_0045: ldloc.3 - IL_0046: cgt - IL_0048: ldloc.2 - IL_0049: ldloc.3 - IL_004a: clt - IL_004c: sub - IL_004d: ret - - IL_004e: ldc.i4.1 - IL_004f: ret - - IL_0050: ldarg.1 - IL_0051: brfalse.s IL_0055 - - IL_0053: ldc.i4.m1 - IL_0054: ret - - IL_0055: ldc.i4.0 - IL_0056: 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/HashMicroPerfAndCodeGenerationTests/KeyR - IL_0007: callvirt instance int32 assembly/HashMicroPerfAndCodeGenerationTests/KeyR::CompareTo(class assembly/HashMicroPerfAndCodeGenerationTests/KeyR) - 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 assembly/HashMicroPerfAndCodeGenerationTests/KeyR V_0, - int32 V_1, - int32 V_2, - int32 V_3) - IL_0000: ldarg.1 - IL_0001: unbox.any assembly/HashMicroPerfAndCodeGenerationTests/KeyR - IL_0006: stloc.0 - IL_0007: ldarg.0 - IL_0008: brfalse.s IL_0050 - - IL_000a: ldarg.1 - IL_000b: unbox.any assembly/HashMicroPerfAndCodeGenerationTests/KeyR - IL_0010: brfalse.s IL_004e - - IL_0012: ldarg.0 - IL_0013: ldfld int32 assembly/HashMicroPerfAndCodeGenerationTests/KeyR::key1@ - IL_0018: stloc.2 - IL_0019: ldloc.0 - IL_001a: ldfld int32 assembly/HashMicroPerfAndCodeGenerationTests/KeyR::key1@ - IL_001f: stloc.3 - IL_0020: ldloc.2 - IL_0021: ldloc.3 - IL_0022: cgt - IL_0024: ldloc.2 - IL_0025: ldloc.3 - IL_0026: clt - IL_0028: sub - IL_0029: stloc.1 - IL_002a: ldloc.1 - IL_002b: ldc.i4.0 - IL_002c: bge.s IL_0030 - - IL_002e: ldloc.1 - IL_002f: ret - - IL_0030: ldloc.1 - IL_0031: ldc.i4.0 - IL_0032: ble.s IL_0036 - - IL_0034: ldloc.1 - IL_0035: ret - - IL_0036: ldarg.0 - IL_0037: ldfld int32 assembly/HashMicroPerfAndCodeGenerationTests/KeyR::key2@ - IL_003c: stloc.2 - IL_003d: ldloc.0 - IL_003e: ldfld int32 assembly/HashMicroPerfAndCodeGenerationTests/KeyR::key2@ - IL_0043: stloc.3 - IL_0044: ldloc.2 - IL_0045: ldloc.3 - IL_0046: cgt - IL_0048: ldloc.2 - IL_0049: ldloc.3 - IL_004a: clt - IL_004c: sub - IL_004d: ret - - IL_004e: ldc.i4.1 - IL_004f: ret - - IL_0050: ldarg.1 - IL_0051: unbox.any assembly/HashMicroPerfAndCodeGenerationTests/KeyR - IL_0056: brfalse.s IL_005a - - IL_0058: ldc.i4.m1 - IL_0059: ret - - IL_005a: ldc.i4.0 - IL_005b: 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: ldarg.0 - IL_0001: brfalse.s IL_0031 - - IL_0003: ldc.i4.0 - IL_0004: stloc.0 - IL_0005: ldc.i4 0x9e3779b9 - IL_000a: ldarg.0 - IL_000b: ldfld int32 assembly/HashMicroPerfAndCodeGenerationTests/KeyR::key2@ - IL_0010: ldloc.0 - IL_0011: ldc.i4.6 - IL_0012: shl - IL_0013: ldloc.0 - IL_0014: ldc.i4.2 - IL_0015: shr - IL_0016: add - IL_0017: add - IL_0018: add - IL_0019: stloc.0 - IL_001a: ldc.i4 0x9e3779b9 - IL_001f: ldarg.0 - IL_0020: ldfld int32 assembly/HashMicroPerfAndCodeGenerationTests/KeyR::key1@ - IL_0025: ldloc.0 - IL_0026: ldc.i4.6 - IL_0027: shl - IL_0028: ldloc.0 - IL_0029: ldc.i4.2 - IL_002a: shr - IL_002b: add - IL_002c: add - IL_002d: add - IL_002e: stloc.0 - IL_002f: ldloc.0 - IL_0030: ret - - IL_0031: ldc.i4.0 - IL_0032: 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/HashMicroPerfAndCodeGenerationTests/KeyR::GetHashCode(class [runtime]System.Collections.IEqualityComparer) - IL_000b: 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 4 - .locals init (class assembly/HashMicroPerfAndCodeGenerationTests/KeyR V_0) - IL_0000: ldarg.0 - IL_0001: brfalse.s IL_002e - - IL_0003: ldarg.1 - IL_0004: isinst assembly/HashMicroPerfAndCodeGenerationTests/KeyR - IL_0009: stloc.0 - IL_000a: ldloc.0 - IL_000b: brfalse.s IL_002c - - IL_000d: ldarg.0 - IL_000e: ldfld int32 assembly/HashMicroPerfAndCodeGenerationTests/KeyR::key1@ - IL_0013: ldloc.0 - IL_0014: ldfld int32 assembly/HashMicroPerfAndCodeGenerationTests/KeyR::key1@ - IL_0019: bne.un.s IL_002a - - IL_001b: ldarg.0 - IL_001c: ldfld int32 assembly/HashMicroPerfAndCodeGenerationTests/KeyR::key2@ - IL_0021: ldloc.0 - IL_0022: ldfld int32 assembly/HashMicroPerfAndCodeGenerationTests/KeyR::key2@ - IL_0027: ceq - IL_0029: ret - - IL_002a: ldc.i4.0 - IL_002b: ret - - IL_002c: ldc.i4.0 - IL_002d: ret - - IL_002e: ldarg.1 - IL_002f: ldnull - IL_0030: cgt.un - IL_0032: ldc.i4.0 - IL_0033: ceq - IL_0035: ret - } - - .method public hidebysig virtual final - instance bool Equals(class assembly/HashMicroPerfAndCodeGenerationTests/KeyR 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_0027 - - IL_0003: ldarg.1 - IL_0004: brfalse.s IL_0025 - - IL_0006: ldarg.0 - IL_0007: ldfld int32 assembly/HashMicroPerfAndCodeGenerationTests/KeyR::key1@ - IL_000c: ldarg.1 - IL_000d: ldfld int32 assembly/HashMicroPerfAndCodeGenerationTests/KeyR::key1@ - IL_0012: bne.un.s IL_0023 - - IL_0014: ldarg.0 - IL_0015: ldfld int32 assembly/HashMicroPerfAndCodeGenerationTests/KeyR::key2@ - IL_001a: ldarg.1 - IL_001b: ldfld int32 assembly/HashMicroPerfAndCodeGenerationTests/KeyR::key2@ - IL_0020: ceq - IL_0022: ret - - IL_0023: ldc.i4.0 - IL_0024: ret - - IL_0025: ldc.i4.0 - IL_0026: ret - - IL_0027: ldarg.1 - IL_0028: ldnull - IL_0029: cgt.un - IL_002b: ldc.i4.0 - IL_002c: ceq - IL_002e: 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/HashMicroPerfAndCodeGenerationTests/KeyR V_0) - IL_0000: ldarg.1 - IL_0001: isinst assembly/HashMicroPerfAndCodeGenerationTests/KeyR - 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/HashMicroPerfAndCodeGenerationTests/KeyR::Equals(class assembly/HashMicroPerfAndCodeGenerationTests/KeyR) - IL_0011: ret - - IL_0012: ldc.i4.0 - IL_0013: ret - } - - .property instance int32 key1() - { - .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags, - int32) = ( 01 00 04 00 00 00 00 00 00 00 00 00 ) - .get instance int32 assembly/HashMicroPerfAndCodeGenerationTests/KeyR::get_key1() - } - .property instance int32 key2() - { - .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags, - int32) = ( 01 00 04 00 00 00 01 00 00 00 00 00 ) - .get instance int32 assembly/HashMicroPerfAndCodeGenerationTests/KeyR::get_key2() - } - } - - .method public static void f5c() cil managed - { - - .maxstack 4 - .locals init (int32 V_0, - int32 V_1) - IL_0000: nop - IL_0001: ldc.i4.0 - IL_0002: stloc.0 - IL_0003: br.s IL_001b - - IL_0005: ldc.i4.1 - IL_0006: ldc.i4.2 - IL_0007: newobj instance void assembly/HashMicroPerfAndCodeGenerationTests/KeyR::.ctor(int32, - int32) - IL_000c: call class [runtime]System.Collections.IEqualityComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericEqualityERComparer() - IL_0011: callvirt instance int32 assembly/HashMicroPerfAndCodeGenerationTests/KeyR::GetHashCode(class [runtime]System.Collections.IEqualityComparer) - IL_0016: stloc.1 - IL_0017: ldloc.0 - IL_0018: ldc.i4.1 - IL_0019: add - IL_001a: stloc.0 - IL_001b: ldloc.0 - IL_001c: ldc.i4 0x989681 - IL_0021: blt.s IL_0005 - - IL_0023: ret - } - - } - -} - -.class private abstract auto ansi sealed ''.$assembly$fsx - extends [runtime]System.Object -{ - .method public static void main@() cil managed - { - .entrypoint - - .maxstack 8 - IL_0000: ret - } - -} - - - - - - + + + + + +.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 +} +.mresource public FSharpSignatureData.assembly +{ + + +} +.mresource public FSharpOptimizationData.assembly +{ + + +} +.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 abstract auto ansi sealed nested public HashMicroPerfAndCodeGenerationTests + 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 public KeyR + 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 [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 02 00 00 00 00 00 ) + .field assembly int32 key1@ + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.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 ) + .field assembly int32 key2@ + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.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 ) + .method public hidebysig specialname + instance int32 get_key1() 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/HashMicroPerfAndCodeGenerationTests/KeyR::key1@ + IL_0006: ret + } + + .method public hidebysig specialname + instance int32 get_key2() 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/HashMicroPerfAndCodeGenerationTests/KeyR::key2@ + IL_0006: ret + } + + .method public specialname rtspecialname + instance void .ctor(int32 key1, + int32 key2) cil managed + { + .custom instance void [runtime]System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::.ctor(valuetype [runtime]System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes, + class [runtime]System.Type) = ( 01 00 60 06 00 00 2F 48 61 73 68 30 38 2B 48 61 + 73 68 4D 69 63 72 6F 50 65 72 66 41 6E 64 43 6F + 64 65 47 65 6E 65 72 61 74 69 6F 6E 54 65 73 74 + 73 2B 4B 65 79 52 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/HashMicroPerfAndCodeGenerationTests/KeyR::key1@ + IL_000d: ldarg.0 + IL_000e: ldarg.2 + IL_000f: stfld int32 assembly/HashMicroPerfAndCodeGenerationTests/KeyR::key2@ + IL_0014: 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/HashMicroPerfAndCodeGenerationTests/KeyR>::.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/HashMicroPerfAndCodeGenerationTests/KeyR 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, + int32 V_2, + int32 V_3) + IL_0000: ldarg.0 + IL_0001: brfalse.s IL_0050 + + IL_0003: ldarg.1 + IL_0004: brfalse.s IL_004e + + IL_0006: call class [runtime]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() + IL_000b: stloc.1 + IL_000c: ldarg.0 + IL_000d: ldfld int32 assembly/HashMicroPerfAndCodeGenerationTests/KeyR::key1@ + IL_0012: stloc.2 + IL_0013: ldarg.1 + IL_0014: ldfld int32 assembly/HashMicroPerfAndCodeGenerationTests/KeyR::key1@ + IL_0019: stloc.3 + IL_001a: ldloc.2 + IL_001b: ldloc.3 + IL_001c: cgt + IL_001e: ldloc.2 + IL_001f: ldloc.3 + IL_0020: clt + IL_0022: sub + IL_0023: stloc.0 + IL_0024: ldloc.0 + IL_0025: ldc.i4.0 + IL_0026: bge.s IL_002a + + IL_0028: ldloc.0 + IL_0029: ret + + IL_002a: ldloc.0 + IL_002b: ldc.i4.0 + IL_002c: ble.s IL_0030 + + IL_002e: ldloc.0 + IL_002f: ret + + IL_0030: call class [runtime]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() + IL_0035: stloc.1 + IL_0036: ldarg.0 + IL_0037: ldfld int32 assembly/HashMicroPerfAndCodeGenerationTests/KeyR::key2@ + IL_003c: stloc.2 + IL_003d: ldarg.1 + IL_003e: ldfld int32 assembly/HashMicroPerfAndCodeGenerationTests/KeyR::key2@ + IL_0043: stloc.3 + IL_0044: ldloc.2 + IL_0045: ldloc.3 + IL_0046: cgt + IL_0048: ldloc.2 + IL_0049: ldloc.3 + IL_004a: clt + IL_004c: sub + IL_004d: ret + + IL_004e: ldc.i4.1 + IL_004f: ret + + IL_0050: ldarg.1 + IL_0051: brfalse.s IL_0055 + + IL_0053: ldc.i4.m1 + IL_0054: ret + + IL_0055: ldc.i4.0 + IL_0056: 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/HashMicroPerfAndCodeGenerationTests/KeyR + IL_0007: callvirt instance int32 assembly/HashMicroPerfAndCodeGenerationTests/KeyR::CompareTo(class assembly/HashMicroPerfAndCodeGenerationTests/KeyR) + 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 assembly/HashMicroPerfAndCodeGenerationTests/KeyR V_0, + int32 V_1, + int32 V_2, + int32 V_3) + IL_0000: ldarg.1 + IL_0001: unbox.any assembly/HashMicroPerfAndCodeGenerationTests/KeyR + IL_0006: stloc.0 + IL_0007: ldarg.0 + IL_0008: brfalse.s IL_0050 + + IL_000a: ldarg.1 + IL_000b: unbox.any assembly/HashMicroPerfAndCodeGenerationTests/KeyR + IL_0010: brfalse.s IL_004e + + IL_0012: ldarg.0 + IL_0013: ldfld int32 assembly/HashMicroPerfAndCodeGenerationTests/KeyR::key1@ + IL_0018: stloc.2 + IL_0019: ldloc.0 + IL_001a: ldfld int32 assembly/HashMicroPerfAndCodeGenerationTests/KeyR::key1@ + IL_001f: stloc.3 + IL_0020: ldloc.2 + IL_0021: ldloc.3 + IL_0022: cgt + IL_0024: ldloc.2 + IL_0025: ldloc.3 + IL_0026: clt + IL_0028: sub + IL_0029: stloc.1 + IL_002a: ldloc.1 + IL_002b: ldc.i4.0 + IL_002c: bge.s IL_0030 + + IL_002e: ldloc.1 + IL_002f: ret + + IL_0030: ldloc.1 + IL_0031: ldc.i4.0 + IL_0032: ble.s IL_0036 + + IL_0034: ldloc.1 + IL_0035: ret + + IL_0036: ldarg.0 + IL_0037: ldfld int32 assembly/HashMicroPerfAndCodeGenerationTests/KeyR::key2@ + IL_003c: stloc.2 + IL_003d: ldloc.0 + IL_003e: ldfld int32 assembly/HashMicroPerfAndCodeGenerationTests/KeyR::key2@ + IL_0043: stloc.3 + IL_0044: ldloc.2 + IL_0045: ldloc.3 + IL_0046: cgt + IL_0048: ldloc.2 + IL_0049: ldloc.3 + IL_004a: clt + IL_004c: sub + IL_004d: ret + + IL_004e: ldc.i4.1 + IL_004f: ret + + IL_0050: ldarg.1 + IL_0051: unbox.any assembly/HashMicroPerfAndCodeGenerationTests/KeyR + IL_0056: brfalse.s IL_005a + + IL_0058: ldc.i4.m1 + IL_0059: ret + + IL_005a: ldc.i4.0 + IL_005b: 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: ldarg.0 + IL_0001: brfalse.s IL_0031 + + IL_0003: ldc.i4.0 + IL_0004: stloc.0 + IL_0005: ldc.i4 0x9e3779b9 + IL_000a: ldarg.0 + IL_000b: ldfld int32 assembly/HashMicroPerfAndCodeGenerationTests/KeyR::key2@ + IL_0010: ldloc.0 + IL_0011: ldc.i4.6 + IL_0012: shl + IL_0013: ldloc.0 + IL_0014: ldc.i4.2 + IL_0015: shr + IL_0016: add + IL_0017: add + IL_0018: add + IL_0019: stloc.0 + IL_001a: ldc.i4 0x9e3779b9 + IL_001f: ldarg.0 + IL_0020: ldfld int32 assembly/HashMicroPerfAndCodeGenerationTests/KeyR::key1@ + IL_0025: ldloc.0 + IL_0026: ldc.i4.6 + IL_0027: shl + IL_0028: ldloc.0 + IL_0029: ldc.i4.2 + IL_002a: shr + IL_002b: add + IL_002c: add + IL_002d: add + IL_002e: stloc.0 + IL_002f: ldloc.0 + IL_0030: ret + + IL_0031: ldc.i4.0 + IL_0032: 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/HashMicroPerfAndCodeGenerationTests/KeyR::GetHashCode(class [runtime]System.Collections.IEqualityComparer) + IL_000b: 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 4 + .locals init (class assembly/HashMicroPerfAndCodeGenerationTests/KeyR V_0) + IL_0000: ldarg.0 + IL_0001: brfalse.s IL_002e + + IL_0003: ldarg.1 + IL_0004: isinst assembly/HashMicroPerfAndCodeGenerationTests/KeyR + IL_0009: stloc.0 + IL_000a: ldloc.0 + IL_000b: brfalse.s IL_002c + + IL_000d: ldarg.0 + IL_000e: ldfld int32 assembly/HashMicroPerfAndCodeGenerationTests/KeyR::key1@ + IL_0013: ldloc.0 + IL_0014: ldfld int32 assembly/HashMicroPerfAndCodeGenerationTests/KeyR::key1@ + IL_0019: bne.un.s IL_002a + + IL_001b: ldarg.0 + IL_001c: ldfld int32 assembly/HashMicroPerfAndCodeGenerationTests/KeyR::key2@ + IL_0021: ldloc.0 + IL_0022: ldfld int32 assembly/HashMicroPerfAndCodeGenerationTests/KeyR::key2@ + IL_0027: ceq + IL_0029: ret + + IL_002a: ldc.i4.0 + IL_002b: ret + + IL_002c: ldc.i4.0 + IL_002d: ret + + IL_002e: ldarg.1 + IL_002f: ldnull + IL_0030: cgt.un + IL_0032: ldc.i4.0 + IL_0033: ceq + IL_0035: ret + } + + .method public hidebysig virtual final + instance bool Equals(class assembly/HashMicroPerfAndCodeGenerationTests/KeyR 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_0027 + + IL_0003: ldarg.1 + IL_0004: brfalse.s IL_0025 + + IL_0006: ldarg.0 + IL_0007: ldfld int32 assembly/HashMicroPerfAndCodeGenerationTests/KeyR::key1@ + IL_000c: ldarg.1 + IL_000d: ldfld int32 assembly/HashMicroPerfAndCodeGenerationTests/KeyR::key1@ + IL_0012: bne.un.s IL_0023 + + IL_0014: ldarg.0 + IL_0015: ldfld int32 assembly/HashMicroPerfAndCodeGenerationTests/KeyR::key2@ + IL_001a: ldarg.1 + IL_001b: ldfld int32 assembly/HashMicroPerfAndCodeGenerationTests/KeyR::key2@ + IL_0020: ceq + IL_0022: ret + + IL_0023: ldc.i4.0 + IL_0024: ret + + IL_0025: ldc.i4.0 + IL_0026: ret + + IL_0027: ldarg.1 + IL_0028: ldnull + IL_0029: cgt.un + IL_002b: ldc.i4.0 + IL_002c: ceq + IL_002e: 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/HashMicroPerfAndCodeGenerationTests/KeyR V_0) + IL_0000: ldarg.1 + IL_0001: isinst assembly/HashMicroPerfAndCodeGenerationTests/KeyR + 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/HashMicroPerfAndCodeGenerationTests/KeyR::Equals(class assembly/HashMicroPerfAndCodeGenerationTests/KeyR) + IL_0011: ret + + IL_0012: ldc.i4.0 + IL_0013: ret + } + + .property instance int32 key1() + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags, + int32) = ( 01 00 04 00 00 00 00 00 00 00 00 00 ) + .get instance int32 assembly/HashMicroPerfAndCodeGenerationTests/KeyR::get_key1() + } + .property instance int32 key2() + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags, + int32) = ( 01 00 04 00 00 00 01 00 00 00 00 00 ) + .get instance int32 assembly/HashMicroPerfAndCodeGenerationTests/KeyR::get_key2() + } + } + + .method public static void f5c() cil managed + { + + .maxstack 4 + .locals init (int32 V_0, + int32 V_1) + IL_0000: nop + IL_0001: ldc.i4.0 + IL_0002: stloc.0 + IL_0003: br.s IL_001b + + IL_0005: ldc.i4.1 + IL_0006: ldc.i4.2 + IL_0007: newobj instance void assembly/HashMicroPerfAndCodeGenerationTests/KeyR::.ctor(int32, + int32) + IL_000c: call class [runtime]System.Collections.IEqualityComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericEqualityERComparer() + IL_0011: callvirt instance int32 assembly/HashMicroPerfAndCodeGenerationTests/KeyR::GetHashCode(class [runtime]System.Collections.IEqualityComparer) + IL_0016: stloc.1 + IL_0017: ldloc.0 + IL_0018: ldc.i4.1 + IL_0019: add + IL_001a: stloc.0 + IL_001b: ldloc.0 + IL_001c: ldc.i4 0x989681 + IL_0021: blt.s IL_0005 + + IL_0023: ret + } + + } + +} + +.class private abstract auto ansi sealed ''.$assembly$fsx + extends [runtime]System.Object +{ + .method public static void main@() cil managed + { + .entrypoint + + .maxstack 8 + IL_0000: ret + } + +} + + + + + + diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction17.fs.il.net472.debug.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction17.fs.il.net472.debug.bsl new file mode 100644 index 00000000000..8da825a7508 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction17.fs.il.net472.debug.bsl @@ -0,0 +1,716 @@ + + + + + +.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 +} +.mresource public FSharpSignatureData.assembly +{ + + +} +.mresource public FSharpOptimizationData.assembly +{ + + +} +.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 auto ansi serializable sealed nested public R + 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 [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 02 00 00 00 00 00 ) + .field assembly int32 x@ + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.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 ) + .field assembly int32 y@ + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.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 ) + .method public hidebysig specialname + instance int32 get_x() 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/R::x@ + IL_0006: ret + } + + .method public hidebysig specialname + instance int32 get_y() 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/R::y@ + IL_0006: ret + } + + .method public specialname rtspecialname + instance void .ctor(int32 x, + int32 y) 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 10 54 65 73 74 46 75 6E 63 74 + 69 6F 6E 31 37 2B 52 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/R::x@ + IL_000d: ldarg.0 + IL_000e: ldarg.2 + IL_000f: stfld int32 assembly/R::y@ + IL_0014: 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/R>::.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/R 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, + int32 V_2, + int32 V_3, + class [runtime]System.Collections.IComparer V_4, + int32 V_5, + int32 V_6, + class [runtime]System.Collections.IComparer V_7, + int32 V_8, + int32 V_9, + class [runtime]System.Collections.IComparer V_10, + int32 V_11, + int32 V_12) + IL_0000: ldarg.0 + IL_0001: brfalse.s IL_0070 + + IL_0003: ldarg.1 + IL_0004: brfalse.s IL_006e + + IL_0006: call class [runtime]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() + IL_000b: stloc.1 + IL_000c: ldarg.0 + IL_000d: ldfld int32 assembly/R::x@ + IL_0012: stloc.2 + IL_0013: ldarg.1 + IL_0014: ldfld int32 assembly/R::x@ + IL_0019: stloc.3 + IL_001a: ldloc.1 + IL_001b: stloc.s V_4 + IL_001d: ldloc.2 + IL_001e: stloc.s V_5 + IL_0020: ldloc.3 + IL_0021: stloc.s V_6 + IL_0023: ldloc.s V_5 + IL_0025: ldloc.s V_6 + IL_0027: cgt + IL_0029: ldloc.s V_5 + IL_002b: ldloc.s V_6 + IL_002d: clt + IL_002f: sub + IL_0030: stloc.0 + IL_0031: ldloc.0 + IL_0032: ldc.i4.0 + IL_0033: bge.s IL_0037 + + IL_0035: ldloc.0 + IL_0036: ret + + IL_0037: ldloc.0 + IL_0038: ldc.i4.0 + IL_0039: ble.s IL_003d + + IL_003b: ldloc.0 + IL_003c: ret + + IL_003d: call class [runtime]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() + IL_0042: stloc.s V_7 + IL_0044: ldarg.0 + IL_0045: ldfld int32 assembly/R::y@ + IL_004a: stloc.s V_8 + IL_004c: ldarg.1 + IL_004d: ldfld int32 assembly/R::y@ + IL_0052: stloc.s V_9 + IL_0054: ldloc.s V_7 + IL_0056: stloc.s V_10 + IL_0058: ldloc.s V_8 + IL_005a: stloc.s V_11 + IL_005c: ldloc.s V_9 + IL_005e: stloc.s V_12 + IL_0060: ldloc.s V_11 + IL_0062: ldloc.s V_12 + IL_0064: cgt + IL_0066: ldloc.s V_11 + IL_0068: ldloc.s V_12 + IL_006a: clt + IL_006c: sub + IL_006d: ret + + IL_006e: ldc.i4.1 + IL_006f: ret + + IL_0070: ldarg.1 + IL_0071: brfalse.s IL_0075 + + IL_0073: ldc.i4.m1 + IL_0074: ret + + IL_0075: ldc.i4.0 + IL_0076: 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/R + IL_0007: callvirt instance int32 assembly/R::CompareTo(class assembly/R) + 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 assembly/R V_0, + class assembly/R V_1, + int32 V_2, + class [runtime]System.Collections.IComparer V_3, + int32 V_4, + int32 V_5, + class [runtime]System.Collections.IComparer V_6, + int32 V_7, + int32 V_8, + class [runtime]System.Collections.IComparer V_9, + int32 V_10, + int32 V_11, + class [runtime]System.Collections.IComparer V_12, + int32 V_13, + int32 V_14) + IL_0000: ldarg.1 + IL_0001: unbox.any assembly/R + IL_0006: stloc.0 + IL_0007: ldloc.0 + IL_0008: stloc.1 + IL_0009: ldarg.0 + IL_000a: brfalse.s IL_007a + + IL_000c: ldarg.1 + IL_000d: unbox.any assembly/R + IL_0012: brfalse.s IL_0078 + + IL_0014: ldarg.2 + IL_0015: stloc.3 + IL_0016: ldarg.0 + IL_0017: ldfld int32 assembly/R::x@ + IL_001c: stloc.s V_4 + IL_001e: ldloc.1 + IL_001f: ldfld int32 assembly/R::x@ + IL_0024: stloc.s V_5 + IL_0026: ldloc.3 + IL_0027: stloc.s V_6 + IL_0029: ldloc.s V_4 + IL_002b: stloc.s V_7 + IL_002d: ldloc.s V_5 + IL_002f: stloc.s V_8 + IL_0031: ldloc.s V_7 + IL_0033: ldloc.s V_8 + IL_0035: cgt + IL_0037: ldloc.s V_7 + IL_0039: ldloc.s V_8 + IL_003b: clt + IL_003d: sub + IL_003e: stloc.2 + IL_003f: ldloc.2 + IL_0040: ldc.i4.0 + IL_0041: bge.s IL_0045 + + IL_0043: ldloc.2 + IL_0044: ret + + IL_0045: ldloc.2 + IL_0046: ldc.i4.0 + IL_0047: ble.s IL_004b + + IL_0049: ldloc.2 + IL_004a: ret + + IL_004b: ldarg.2 + IL_004c: stloc.s V_9 + IL_004e: ldarg.0 + IL_004f: ldfld int32 assembly/R::y@ + IL_0054: stloc.s V_10 + IL_0056: ldloc.1 + IL_0057: ldfld int32 assembly/R::y@ + IL_005c: stloc.s V_11 + IL_005e: ldloc.s V_9 + IL_0060: stloc.s V_12 + IL_0062: ldloc.s V_10 + IL_0064: stloc.s V_13 + IL_0066: ldloc.s V_11 + IL_0068: stloc.s V_14 + IL_006a: ldloc.s V_13 + IL_006c: ldloc.s V_14 + IL_006e: cgt + IL_0070: ldloc.s V_13 + IL_0072: ldloc.s V_14 + IL_0074: clt + IL_0076: sub + IL_0077: ret + + IL_0078: ldc.i4.1 + IL_0079: ret + + IL_007a: ldarg.1 + IL_007b: unbox.any assembly/R + IL_0080: brfalse.s IL_0084 + + IL_0082: ldc.i4.m1 + IL_0083: ret + + IL_0084: ldc.i4.0 + IL_0085: 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 [runtime]System.Collections.IEqualityComparer V_1, + int32 V_2, + class [runtime]System.Collections.IEqualityComparer V_3, + class [runtime]System.Collections.IEqualityComparer V_4, + int32 V_5, + class [runtime]System.Collections.IEqualityComparer V_6) + IL_0000: ldarg.0 + IL_0001: brfalse.s IL_0042 + + IL_0003: ldc.i4.0 + IL_0004: stloc.0 + IL_0005: ldc.i4 0x9e3779b9 + IL_000a: ldarg.1 + IL_000b: stloc.1 + IL_000c: ldarg.0 + IL_000d: ldfld int32 assembly/R::y@ + IL_0012: stloc.2 + IL_0013: ldloc.1 + IL_0014: stloc.3 + IL_0015: ldloc.2 + IL_0016: ldloc.0 + IL_0017: ldc.i4.6 + IL_0018: shl + IL_0019: ldloc.0 + IL_001a: ldc.i4.2 + IL_001b: shr + IL_001c: add + IL_001d: add + IL_001e: add + IL_001f: stloc.0 + IL_0020: ldc.i4 0x9e3779b9 + IL_0025: ldarg.1 + IL_0026: stloc.s V_4 + IL_0028: ldarg.0 + IL_0029: ldfld int32 assembly/R::x@ + IL_002e: stloc.s V_5 + IL_0030: ldloc.s V_4 + IL_0032: stloc.s V_6 + IL_0034: ldloc.s V_5 + IL_0036: ldloc.0 + IL_0037: ldc.i4.6 + IL_0038: shl + IL_0039: ldloc.0 + IL_003a: ldc.i4.2 + IL_003b: shr + IL_003c: add + IL_003d: add + IL_003e: add + IL_003f: stloc.0 + IL_0040: ldloc.0 + IL_0041: ret + + IL_0042: ldc.i4.0 + IL_0043: 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/R::GetHashCode(class [runtime]System.Collections.IEqualityComparer) + IL_000b: 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 4 + .locals init (class assembly/R V_0, + class assembly/R V_1, + class [runtime]System.Collections.IEqualityComparer V_2, + int32 V_3, + int32 V_4, + class [runtime]System.Collections.IEqualityComparer V_5, + class [runtime]System.Collections.IEqualityComparer V_6, + int32 V_7, + int32 V_8, + class [runtime]System.Collections.IEqualityComparer V_9) + IL_0000: ldarg.0 + IL_0001: brfalse.s IL_004c + + IL_0003: ldarg.1 + IL_0004: isinst assembly/R + IL_0009: stloc.0 + IL_000a: ldloc.0 + IL_000b: brfalse.s IL_004a + + IL_000d: ldloc.0 + IL_000e: stloc.1 + IL_000f: ldarg.2 + IL_0010: stloc.2 + IL_0011: ldarg.0 + IL_0012: ldfld int32 assembly/R::x@ + IL_0017: stloc.3 + IL_0018: ldloc.1 + IL_0019: ldfld int32 assembly/R::x@ + IL_001e: stloc.s V_4 + IL_0020: ldloc.2 + IL_0021: stloc.s V_5 + IL_0023: ldloc.3 + IL_0024: ldloc.s V_4 + IL_0026: ceq + IL_0028: brfalse.s IL_0048 + + IL_002a: ldarg.2 + IL_002b: stloc.s V_6 + IL_002d: ldarg.0 + IL_002e: ldfld int32 assembly/R::y@ + IL_0033: stloc.s V_7 + IL_0035: ldloc.1 + IL_0036: ldfld int32 assembly/R::y@ + IL_003b: stloc.s V_8 + IL_003d: ldloc.s V_6 + IL_003f: stloc.s V_9 + IL_0041: ldloc.s V_7 + IL_0043: ldloc.s V_8 + IL_0045: ceq + IL_0047: ret + + IL_0048: ldc.i4.0 + IL_0049: ret + + IL_004a: ldc.i4.0 + IL_004b: ret + + IL_004c: ldarg.1 + IL_004d: ldnull + IL_004e: cgt.un + IL_0050: ldc.i4.0 + IL_0051: ceq + IL_0053: ret + } + + .method public hidebysig virtual final + instance bool Equals(class assembly/R 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_0027 + + IL_0003: ldarg.1 + IL_0004: brfalse.s IL_0025 + + IL_0006: ldarg.0 + IL_0007: ldfld int32 assembly/R::x@ + IL_000c: ldarg.1 + IL_000d: ldfld int32 assembly/R::x@ + IL_0012: bne.un.s IL_0023 + + IL_0014: ldarg.0 + IL_0015: ldfld int32 assembly/R::y@ + IL_001a: ldarg.1 + IL_001b: ldfld int32 assembly/R::y@ + IL_0020: ceq + IL_0022: ret + + IL_0023: ldc.i4.0 + IL_0024: ret + + IL_0025: ldc.i4.0 + IL_0026: ret + + IL_0027: ldarg.1 + IL_0028: ldnull + IL_0029: cgt.un + IL_002b: ldc.i4.0 + IL_002c: ceq + IL_002e: 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/R V_0) + IL_0000: ldarg.1 + IL_0001: isinst assembly/R + 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/R::Equals(class assembly/R) + IL_0011: ret + + IL_0012: ldc.i4.0 + IL_0013: ret + } + + .property instance int32 x() + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags, + int32) = ( 01 00 04 00 00 00 00 00 00 00 00 00 ) + .get instance int32 assembly/R::get_x() + } + .property instance int32 y() + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags, + int32) = ( 01 00 04 00 00 00 01 00 00 00 00 00 ) + .get instance int32 assembly/R::get_y() + } + } + + .method public static class [runtime]System.Tuple`2 + assembly(int32 inp) cil managed + { + + .maxstack 4 + .locals init (class assembly/R V_0) + IL_0000: ldc.i4.3 + IL_0001: ldarg.0 + IL_0002: newobj instance void assembly/R::.ctor(int32, + int32) + IL_0007: stloc.0 + IL_0008: ldloc.0 + IL_0009: ldloc.0 + IL_000a: newobj instance void class [runtime]System.Tuple`2::.ctor(!0, + !1) + IL_000f: 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 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__ = int32(0x00000000) + .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 +{ + .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 private hidebysig specialname instance void + set_Type(class [runtime]System.Type 'value') 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: ldarg.1 + IL_0002: stfld class [runtime]System.Type System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::Type@ + IL_0007: 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 + } + + .method private hidebysig specialname instance void + set_MemberType(valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes 'value') 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: ldarg.1 + IL_0002: stfld valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::MemberType@ + IL_0007: 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 ) + .set instance void System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::set_MemberType(valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes) + .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 ) + .set instance void System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::set_Type(class [runtime]System.Type) + .get instance class [runtime]System.Type System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::get_Type() + } +} + + + + + + diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction17.fs.il.net472.release.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction17.fs.il.net472.release.bsl new file mode 100644 index 00000000000..2798b0c326e --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction17.fs.il.net472.release.bsl @@ -0,0 +1,650 @@ + + + + + +.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 +} +.mresource public FSharpSignatureData.assembly +{ + + +} +.mresource public FSharpOptimizationData.assembly +{ + + +} +.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 auto ansi serializable sealed nested public R + 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 [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 02 00 00 00 00 00 ) + .field assembly int32 x@ + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.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 ) + .field assembly int32 y@ + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.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 ) + .method public hidebysig specialname + instance int32 get_x() 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/R::x@ + IL_0006: ret + } + + .method public hidebysig specialname + instance int32 get_y() 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/R::y@ + IL_0006: ret + } + + .method public specialname rtspecialname + instance void .ctor(int32 x, + int32 y) 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 10 54 65 73 74 46 75 6E 63 74 + 69 6F 6E 31 37 2B 52 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/R::x@ + IL_000d: ldarg.0 + IL_000e: ldarg.2 + IL_000f: stfld int32 assembly/R::y@ + IL_0014: 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/R>::.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/R 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, + int32 V_2, + int32 V_3, + class [runtime]System.Collections.IComparer V_4, + int32 V_5, + int32 V_6) + IL_0000: ldarg.0 + IL_0001: brfalse.s IL_0057 + + IL_0003: ldarg.1 + IL_0004: brfalse.s IL_0055 + + IL_0006: call class [runtime]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() + IL_000b: stloc.1 + IL_000c: ldarg.0 + IL_000d: ldfld int32 assembly/R::x@ + IL_0012: stloc.2 + IL_0013: ldarg.1 + IL_0014: ldfld int32 assembly/R::x@ + IL_0019: stloc.3 + IL_001a: ldloc.2 + IL_001b: ldloc.3 + IL_001c: cgt + IL_001e: ldloc.2 + IL_001f: ldloc.3 + IL_0020: clt + IL_0022: sub + IL_0023: stloc.0 + IL_0024: ldloc.0 + IL_0025: ldc.i4.0 + IL_0026: bge.s IL_002a + + IL_0028: ldloc.0 + IL_0029: ret + + IL_002a: ldloc.0 + IL_002b: ldc.i4.0 + IL_002c: ble.s IL_0030 + + IL_002e: ldloc.0 + IL_002f: ret + + IL_0030: call class [runtime]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() + IL_0035: stloc.s V_4 + IL_0037: ldarg.0 + IL_0038: ldfld int32 assembly/R::y@ + IL_003d: stloc.s V_5 + IL_003f: ldarg.1 + IL_0040: ldfld int32 assembly/R::y@ + IL_0045: stloc.s V_6 + IL_0047: ldloc.s V_5 + IL_0049: ldloc.s V_6 + IL_004b: cgt + IL_004d: ldloc.s V_5 + IL_004f: ldloc.s V_6 + IL_0051: clt + IL_0053: sub + IL_0054: ret + + IL_0055: ldc.i4.1 + IL_0056: ret + + IL_0057: ldarg.1 + IL_0058: brfalse.s IL_005c + + IL_005a: ldc.i4.m1 + IL_005b: ret + + IL_005c: ldc.i4.0 + IL_005d: 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/R + IL_0007: callvirt instance int32 assembly/R::CompareTo(class assembly/R) + 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 assembly/R V_0, + class assembly/R V_1, + int32 V_2, + class [runtime]System.Collections.IComparer V_3, + int32 V_4, + int32 V_5, + class [runtime]System.Collections.IComparer V_6, + int32 V_7, + int32 V_8) + IL_0000: ldarg.1 + IL_0001: unbox.any assembly/R + IL_0006: stloc.0 + IL_0007: ldloc.0 + IL_0008: stloc.1 + IL_0009: ldarg.0 + IL_000a: brfalse.s IL_0063 + + IL_000c: ldarg.1 + IL_000d: unbox.any assembly/R + IL_0012: brfalse.s IL_0061 + + IL_0014: ldarg.2 + IL_0015: stloc.3 + IL_0016: ldarg.0 + IL_0017: ldfld int32 assembly/R::x@ + IL_001c: stloc.s V_4 + IL_001e: ldloc.1 + IL_001f: ldfld int32 assembly/R::x@ + IL_0024: stloc.s V_5 + IL_0026: ldloc.s V_4 + IL_0028: ldloc.s V_5 + IL_002a: cgt + IL_002c: ldloc.s V_4 + IL_002e: ldloc.s V_5 + IL_0030: clt + IL_0032: sub + IL_0033: stloc.2 + IL_0034: ldloc.2 + IL_0035: ldc.i4.0 + IL_0036: bge.s IL_003a + + IL_0038: ldloc.2 + IL_0039: ret + + IL_003a: ldloc.2 + IL_003b: ldc.i4.0 + IL_003c: ble.s IL_0040 + + IL_003e: ldloc.2 + IL_003f: ret + + IL_0040: ldarg.2 + IL_0041: stloc.s V_6 + IL_0043: ldarg.0 + IL_0044: ldfld int32 assembly/R::y@ + IL_0049: stloc.s V_7 + IL_004b: ldloc.1 + IL_004c: ldfld int32 assembly/R::y@ + IL_0051: stloc.s V_8 + IL_0053: ldloc.s V_7 + IL_0055: ldloc.s V_8 + IL_0057: cgt + IL_0059: ldloc.s V_7 + IL_005b: ldloc.s V_8 + IL_005d: clt + IL_005f: sub + IL_0060: ret + + IL_0061: ldc.i4.1 + IL_0062: ret + + IL_0063: ldarg.1 + IL_0064: unbox.any assembly/R + IL_0069: brfalse.s IL_006d + + IL_006b: ldc.i4.m1 + IL_006c: ret + + IL_006d: ldc.i4.0 + IL_006e: 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 [runtime]System.Collections.IEqualityComparer V_1, + class [runtime]System.Collections.IEqualityComparer V_2) + IL_0000: ldarg.0 + IL_0001: brfalse.s IL_0035 + + IL_0003: ldc.i4.0 + IL_0004: stloc.0 + IL_0005: ldc.i4 0x9e3779b9 + IL_000a: ldarg.1 + IL_000b: stloc.1 + IL_000c: ldarg.0 + IL_000d: ldfld int32 assembly/R::y@ + IL_0012: ldloc.0 + IL_0013: ldc.i4.6 + IL_0014: shl + IL_0015: ldloc.0 + IL_0016: ldc.i4.2 + IL_0017: shr + IL_0018: add + IL_0019: add + IL_001a: add + IL_001b: stloc.0 + IL_001c: ldc.i4 0x9e3779b9 + IL_0021: ldarg.1 + IL_0022: stloc.2 + IL_0023: ldarg.0 + IL_0024: ldfld int32 assembly/R::x@ + IL_0029: ldloc.0 + IL_002a: ldc.i4.6 + IL_002b: shl + IL_002c: ldloc.0 + IL_002d: ldc.i4.2 + IL_002e: shr + IL_002f: add + IL_0030: add + IL_0031: add + IL_0032: stloc.0 + IL_0033: ldloc.0 + IL_0034: ret + + IL_0035: ldc.i4.0 + IL_0036: 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/R::GetHashCode(class [runtime]System.Collections.IEqualityComparer) + IL_000b: 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 4 + .locals init (class assembly/R V_0, + class assembly/R V_1, + class [runtime]System.Collections.IEqualityComparer V_2, + class [runtime]System.Collections.IEqualityComparer V_3) + IL_0000: ldarg.0 + IL_0001: brfalse.s IL_0036 + + IL_0003: ldarg.1 + IL_0004: isinst assembly/R + IL_0009: stloc.0 + IL_000a: ldloc.0 + IL_000b: brfalse.s IL_0034 + + IL_000d: ldloc.0 + IL_000e: stloc.1 + IL_000f: ldarg.2 + IL_0010: stloc.2 + IL_0011: ldarg.0 + IL_0012: ldfld int32 assembly/R::x@ + IL_0017: ldloc.1 + IL_0018: ldfld int32 assembly/R::x@ + IL_001d: ceq + IL_001f: brfalse.s IL_0032 + + IL_0021: ldarg.2 + IL_0022: stloc.3 + IL_0023: ldarg.0 + IL_0024: ldfld int32 assembly/R::y@ + IL_0029: ldloc.1 + IL_002a: ldfld int32 assembly/R::y@ + IL_002f: ceq + IL_0031: ret + + IL_0032: ldc.i4.0 + IL_0033: ret + + IL_0034: ldc.i4.0 + IL_0035: ret + + IL_0036: ldarg.1 + IL_0037: ldnull + IL_0038: cgt.un + IL_003a: ldc.i4.0 + IL_003b: ceq + IL_003d: ret + } + + .method public hidebysig virtual final + instance bool Equals(class assembly/R 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_0027 + + IL_0003: ldarg.1 + IL_0004: brfalse.s IL_0025 + + IL_0006: ldarg.0 + IL_0007: ldfld int32 assembly/R::x@ + IL_000c: ldarg.1 + IL_000d: ldfld int32 assembly/R::x@ + IL_0012: bne.un.s IL_0023 + + IL_0014: ldarg.0 + IL_0015: ldfld int32 assembly/R::y@ + IL_001a: ldarg.1 + IL_001b: ldfld int32 assembly/R::y@ + IL_0020: ceq + IL_0022: ret + + IL_0023: ldc.i4.0 + IL_0024: ret + + IL_0025: ldc.i4.0 + IL_0026: ret + + IL_0027: ldarg.1 + IL_0028: ldnull + IL_0029: cgt.un + IL_002b: ldc.i4.0 + IL_002c: ceq + IL_002e: 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/R V_0) + IL_0000: ldarg.1 + IL_0001: isinst assembly/R + 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/R::Equals(class assembly/R) + IL_0011: ret + + IL_0012: ldc.i4.0 + IL_0013: ret + } + + .property instance int32 x() + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags, + int32) = ( 01 00 04 00 00 00 00 00 00 00 00 00 ) + .get instance int32 assembly/R::get_x() + } + .property instance int32 y() + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags, + int32) = ( 01 00 04 00 00 00 01 00 00 00 00 00 ) + .get instance int32 assembly/R::get_y() + } + } + + .method public static class [runtime]System.Tuple`2 + assembly(int32 inp) cil managed + { + + .maxstack 4 + .locals init (class assembly/R V_0) + IL_0000: ldc.i4.3 + IL_0001: ldarg.0 + IL_0002: newobj instance void assembly/R::.ctor(int32, + int32) + IL_0007: stloc.0 + IL_0008: ldloc.0 + IL_0009: ldloc.0 + IL_000a: newobj instance void class [runtime]System.Tuple`2::.ctor(!0, + !1) + IL_000f: 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 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__ = int32(0x00000000) + .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 +{ + .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 private hidebysig specialname instance void + set_Type(class [runtime]System.Type 'value') 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: ldarg.1 + IL_0002: stfld class [runtime]System.Type System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::Type@ + IL_0007: 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 + } + + .method private hidebysig specialname instance void + set_MemberType(valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes 'value') 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: ldarg.1 + IL_0002: stfld valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::MemberType@ + IL_0007: 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 ) + .set instance void System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::set_MemberType(valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes) + .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 ) + .set instance void System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::set_Type(class [runtime]System.Type) + .get instance class [runtime]System.Type System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::get_Type() + } +} + + + + + + diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction17.fs.il.debug.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction17.fs.il.netcore.debug.bsl similarity index 97% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction17.fs.il.debug.bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction17.fs.il.netcore.debug.bsl index 16b6f6bb5f2..9d2e9c744cf 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction17.fs.il.debug.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction17.fs.il.netcore.debug.bsl @@ -86,6 +86,9 @@ instance void .ctor(int32 x, int32 y) cil managed { + .custom instance void [runtime]System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::.ctor(valuetype [runtime]System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes, + class [runtime]System.Type) = ( 01 00 60 06 00 00 10 54 65 73 74 46 75 6E 63 74 + 69 6F 6E 31 37 2B 52 00 00 ) .maxstack 8 IL_0000: ldarg.0 diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction17.fs.il.release.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction17.fs.il.netcore.release.bsl similarity index 96% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction17.fs.il.release.bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction17.fs.il.netcore.release.bsl index 1a692222b19..374ac9d2bbf 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction17.fs.il.release.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction17.fs.il.netcore.release.bsl @@ -1,526 +1,529 @@ - - - - - -.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 -} -.mresource public FSharpSignatureData.assembly -{ - - -} -.mresource public FSharpOptimizationData.assembly -{ - - -} -.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 auto ansi serializable sealed nested public R - 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 [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 02 00 00 00 00 00 ) - .field assembly int32 x@ - .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.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 ) - .field assembly int32 y@ - .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.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 ) - .method public hidebysig specialname - instance int32 get_x() 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/R::x@ - IL_0006: ret - } - - .method public hidebysig specialname - instance int32 get_y() 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/R::y@ - IL_0006: ret - } - - .method public specialname rtspecialname - instance void .ctor(int32 x, - int32 y) cil managed - { - - .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/R::x@ - IL_000d: ldarg.0 - IL_000e: ldarg.2 - IL_000f: stfld int32 assembly/R::y@ - IL_0014: 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/R>::.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/R 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, - int32 V_2, - int32 V_3, - class [runtime]System.Collections.IComparer V_4, - int32 V_5, - int32 V_6) - IL_0000: ldarg.0 - IL_0001: brfalse.s IL_0057 - - IL_0003: ldarg.1 - IL_0004: brfalse.s IL_0055 - - IL_0006: call class [runtime]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() - IL_000b: stloc.1 - IL_000c: ldarg.0 - IL_000d: ldfld int32 assembly/R::x@ - IL_0012: stloc.2 - IL_0013: ldarg.1 - IL_0014: ldfld int32 assembly/R::x@ - IL_0019: stloc.3 - IL_001a: ldloc.2 - IL_001b: ldloc.3 - IL_001c: cgt - IL_001e: ldloc.2 - IL_001f: ldloc.3 - IL_0020: clt - IL_0022: sub - IL_0023: stloc.0 - IL_0024: ldloc.0 - IL_0025: ldc.i4.0 - IL_0026: bge.s IL_002a - - IL_0028: ldloc.0 - IL_0029: ret - - IL_002a: ldloc.0 - IL_002b: ldc.i4.0 - IL_002c: ble.s IL_0030 - - IL_002e: ldloc.0 - IL_002f: ret - - IL_0030: call class [runtime]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() - IL_0035: stloc.s V_4 - IL_0037: ldarg.0 - IL_0038: ldfld int32 assembly/R::y@ - IL_003d: stloc.s V_5 - IL_003f: ldarg.1 - IL_0040: ldfld int32 assembly/R::y@ - IL_0045: stloc.s V_6 - IL_0047: ldloc.s V_5 - IL_0049: ldloc.s V_6 - IL_004b: cgt - IL_004d: ldloc.s V_5 - IL_004f: ldloc.s V_6 - IL_0051: clt - IL_0053: sub - IL_0054: ret - - IL_0055: ldc.i4.1 - IL_0056: ret - - IL_0057: ldarg.1 - IL_0058: brfalse.s IL_005c - - IL_005a: ldc.i4.m1 - IL_005b: ret - - IL_005c: ldc.i4.0 - IL_005d: 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/R - IL_0007: callvirt instance int32 assembly/R::CompareTo(class assembly/R) - 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 assembly/R V_0, - class assembly/R V_1, - int32 V_2, - class [runtime]System.Collections.IComparer V_3, - int32 V_4, - int32 V_5, - class [runtime]System.Collections.IComparer V_6, - int32 V_7, - int32 V_8) - IL_0000: ldarg.1 - IL_0001: unbox.any assembly/R - IL_0006: stloc.0 - IL_0007: ldloc.0 - IL_0008: stloc.1 - IL_0009: ldarg.0 - IL_000a: brfalse.s IL_0063 - - IL_000c: ldarg.1 - IL_000d: unbox.any assembly/R - IL_0012: brfalse.s IL_0061 - - IL_0014: ldarg.2 - IL_0015: stloc.3 - IL_0016: ldarg.0 - IL_0017: ldfld int32 assembly/R::x@ - IL_001c: stloc.s V_4 - IL_001e: ldloc.1 - IL_001f: ldfld int32 assembly/R::x@ - IL_0024: stloc.s V_5 - IL_0026: ldloc.s V_4 - IL_0028: ldloc.s V_5 - IL_002a: cgt - IL_002c: ldloc.s V_4 - IL_002e: ldloc.s V_5 - IL_0030: clt - IL_0032: sub - IL_0033: stloc.2 - IL_0034: ldloc.2 - IL_0035: ldc.i4.0 - IL_0036: bge.s IL_003a - - IL_0038: ldloc.2 - IL_0039: ret - - IL_003a: ldloc.2 - IL_003b: ldc.i4.0 - IL_003c: ble.s IL_0040 - - IL_003e: ldloc.2 - IL_003f: ret - - IL_0040: ldarg.2 - IL_0041: stloc.s V_6 - IL_0043: ldarg.0 - IL_0044: ldfld int32 assembly/R::y@ - IL_0049: stloc.s V_7 - IL_004b: ldloc.1 - IL_004c: ldfld int32 assembly/R::y@ - IL_0051: stloc.s V_8 - IL_0053: ldloc.s V_7 - IL_0055: ldloc.s V_8 - IL_0057: cgt - IL_0059: ldloc.s V_7 - IL_005b: ldloc.s V_8 - IL_005d: clt - IL_005f: sub - IL_0060: ret - - IL_0061: ldc.i4.1 - IL_0062: ret - - IL_0063: ldarg.1 - IL_0064: unbox.any assembly/R - IL_0069: brfalse.s IL_006d - - IL_006b: ldc.i4.m1 - IL_006c: ret - - IL_006d: ldc.i4.0 - IL_006e: 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 [runtime]System.Collections.IEqualityComparer V_1, - class [runtime]System.Collections.IEqualityComparer V_2) - IL_0000: ldarg.0 - IL_0001: brfalse.s IL_0035 - - IL_0003: ldc.i4.0 - IL_0004: stloc.0 - IL_0005: ldc.i4 0x9e3779b9 - IL_000a: ldarg.1 - IL_000b: stloc.1 - IL_000c: ldarg.0 - IL_000d: ldfld int32 assembly/R::y@ - IL_0012: ldloc.0 - IL_0013: ldc.i4.6 - IL_0014: shl - IL_0015: ldloc.0 - IL_0016: ldc.i4.2 - IL_0017: shr - IL_0018: add - IL_0019: add - IL_001a: add - IL_001b: stloc.0 - IL_001c: ldc.i4 0x9e3779b9 - IL_0021: ldarg.1 - IL_0022: stloc.2 - IL_0023: ldarg.0 - IL_0024: ldfld int32 assembly/R::x@ - IL_0029: ldloc.0 - IL_002a: ldc.i4.6 - IL_002b: shl - IL_002c: ldloc.0 - IL_002d: ldc.i4.2 - IL_002e: shr - IL_002f: add - IL_0030: add - IL_0031: add - IL_0032: stloc.0 - IL_0033: ldloc.0 - IL_0034: ret - - IL_0035: ldc.i4.0 - IL_0036: 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/R::GetHashCode(class [runtime]System.Collections.IEqualityComparer) - IL_000b: 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 4 - .locals init (class assembly/R V_0, - class assembly/R V_1, - class [runtime]System.Collections.IEqualityComparer V_2, - class [runtime]System.Collections.IEqualityComparer V_3) - IL_0000: ldarg.0 - IL_0001: brfalse.s IL_0036 - - IL_0003: ldarg.1 - IL_0004: isinst assembly/R - IL_0009: stloc.0 - IL_000a: ldloc.0 - IL_000b: brfalse.s IL_0034 - - IL_000d: ldloc.0 - IL_000e: stloc.1 - IL_000f: ldarg.2 - IL_0010: stloc.2 - IL_0011: ldarg.0 - IL_0012: ldfld int32 assembly/R::x@ - IL_0017: ldloc.1 - IL_0018: ldfld int32 assembly/R::x@ - IL_001d: ceq - IL_001f: brfalse.s IL_0032 - - IL_0021: ldarg.2 - IL_0022: stloc.3 - IL_0023: ldarg.0 - IL_0024: ldfld int32 assembly/R::y@ - IL_0029: ldloc.1 - IL_002a: ldfld int32 assembly/R::y@ - IL_002f: ceq - IL_0031: ret - - IL_0032: ldc.i4.0 - IL_0033: ret - - IL_0034: ldc.i4.0 - IL_0035: ret - - IL_0036: ldarg.1 - IL_0037: ldnull - IL_0038: cgt.un - IL_003a: ldc.i4.0 - IL_003b: ceq - IL_003d: ret - } - - .method public hidebysig virtual final - instance bool Equals(class assembly/R 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_0027 - - IL_0003: ldarg.1 - IL_0004: brfalse.s IL_0025 - - IL_0006: ldarg.0 - IL_0007: ldfld int32 assembly/R::x@ - IL_000c: ldarg.1 - IL_000d: ldfld int32 assembly/R::x@ - IL_0012: bne.un.s IL_0023 - - IL_0014: ldarg.0 - IL_0015: ldfld int32 assembly/R::y@ - IL_001a: ldarg.1 - IL_001b: ldfld int32 assembly/R::y@ - IL_0020: ceq - IL_0022: ret - - IL_0023: ldc.i4.0 - IL_0024: ret - - IL_0025: ldc.i4.0 - IL_0026: ret - - IL_0027: ldarg.1 - IL_0028: ldnull - IL_0029: cgt.un - IL_002b: ldc.i4.0 - IL_002c: ceq - IL_002e: 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/R V_0) - IL_0000: ldarg.1 - IL_0001: isinst assembly/R - 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/R::Equals(class assembly/R) - IL_0011: ret - - IL_0012: ldc.i4.0 - IL_0013: ret - } - - .property instance int32 x() - { - .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags, - int32) = ( 01 00 04 00 00 00 00 00 00 00 00 00 ) - .get instance int32 assembly/R::get_x() - } - .property instance int32 y() - { - .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags, - int32) = ( 01 00 04 00 00 00 01 00 00 00 00 00 ) - .get instance int32 assembly/R::get_y() - } - } - - .method public static class [runtime]System.Tuple`2 - assembly(int32 inp) cil managed - { - - .maxstack 4 - .locals init (class assembly/R V_0) - IL_0000: ldc.i4.3 - IL_0001: ldarg.0 - IL_0002: newobj instance void assembly/R::.ctor(int32, - int32) - IL_0007: stloc.0 - IL_0008: ldloc.0 - IL_0009: ldloc.0 - IL_000a: newobj instance void class [runtime]System.Tuple`2::.ctor(!0, - !1) - IL_000f: 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 - } - -} - - - - - - + + + + + +.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 +} +.mresource public FSharpSignatureData.assembly +{ + + +} +.mresource public FSharpOptimizationData.assembly +{ + + +} +.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 auto ansi serializable sealed nested public R + 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 [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 02 00 00 00 00 00 ) + .field assembly int32 x@ + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.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 ) + .field assembly int32 y@ + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.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 ) + .method public hidebysig specialname + instance int32 get_x() 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/R::x@ + IL_0006: ret + } + + .method public hidebysig specialname + instance int32 get_y() 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/R::y@ + IL_0006: ret + } + + .method public specialname rtspecialname + instance void .ctor(int32 x, + int32 y) cil managed + { + .custom instance void [runtime]System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::.ctor(valuetype [runtime]System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes, + class [runtime]System.Type) = ( 01 00 60 06 00 00 10 54 65 73 74 46 75 6E 63 74 + 69 6F 6E 31 37 2B 52 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/R::x@ + IL_000d: ldarg.0 + IL_000e: ldarg.2 + IL_000f: stfld int32 assembly/R::y@ + IL_0014: 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/R>::.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/R 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, + int32 V_2, + int32 V_3, + class [runtime]System.Collections.IComparer V_4, + int32 V_5, + int32 V_6) + IL_0000: ldarg.0 + IL_0001: brfalse.s IL_0057 + + IL_0003: ldarg.1 + IL_0004: brfalse.s IL_0055 + + IL_0006: call class [runtime]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() + IL_000b: stloc.1 + IL_000c: ldarg.0 + IL_000d: ldfld int32 assembly/R::x@ + IL_0012: stloc.2 + IL_0013: ldarg.1 + IL_0014: ldfld int32 assembly/R::x@ + IL_0019: stloc.3 + IL_001a: ldloc.2 + IL_001b: ldloc.3 + IL_001c: cgt + IL_001e: ldloc.2 + IL_001f: ldloc.3 + IL_0020: clt + IL_0022: sub + IL_0023: stloc.0 + IL_0024: ldloc.0 + IL_0025: ldc.i4.0 + IL_0026: bge.s IL_002a + + IL_0028: ldloc.0 + IL_0029: ret + + IL_002a: ldloc.0 + IL_002b: ldc.i4.0 + IL_002c: ble.s IL_0030 + + IL_002e: ldloc.0 + IL_002f: ret + + IL_0030: call class [runtime]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() + IL_0035: stloc.s V_4 + IL_0037: ldarg.0 + IL_0038: ldfld int32 assembly/R::y@ + IL_003d: stloc.s V_5 + IL_003f: ldarg.1 + IL_0040: ldfld int32 assembly/R::y@ + IL_0045: stloc.s V_6 + IL_0047: ldloc.s V_5 + IL_0049: ldloc.s V_6 + IL_004b: cgt + IL_004d: ldloc.s V_5 + IL_004f: ldloc.s V_6 + IL_0051: clt + IL_0053: sub + IL_0054: ret + + IL_0055: ldc.i4.1 + IL_0056: ret + + IL_0057: ldarg.1 + IL_0058: brfalse.s IL_005c + + IL_005a: ldc.i4.m1 + IL_005b: ret + + IL_005c: ldc.i4.0 + IL_005d: 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/R + IL_0007: callvirt instance int32 assembly/R::CompareTo(class assembly/R) + 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 assembly/R V_0, + class assembly/R V_1, + int32 V_2, + class [runtime]System.Collections.IComparer V_3, + int32 V_4, + int32 V_5, + class [runtime]System.Collections.IComparer V_6, + int32 V_7, + int32 V_8) + IL_0000: ldarg.1 + IL_0001: unbox.any assembly/R + IL_0006: stloc.0 + IL_0007: ldloc.0 + IL_0008: stloc.1 + IL_0009: ldarg.0 + IL_000a: brfalse.s IL_0063 + + IL_000c: ldarg.1 + IL_000d: unbox.any assembly/R + IL_0012: brfalse.s IL_0061 + + IL_0014: ldarg.2 + IL_0015: stloc.3 + IL_0016: ldarg.0 + IL_0017: ldfld int32 assembly/R::x@ + IL_001c: stloc.s V_4 + IL_001e: ldloc.1 + IL_001f: ldfld int32 assembly/R::x@ + IL_0024: stloc.s V_5 + IL_0026: ldloc.s V_4 + IL_0028: ldloc.s V_5 + IL_002a: cgt + IL_002c: ldloc.s V_4 + IL_002e: ldloc.s V_5 + IL_0030: clt + IL_0032: sub + IL_0033: stloc.2 + IL_0034: ldloc.2 + IL_0035: ldc.i4.0 + IL_0036: bge.s IL_003a + + IL_0038: ldloc.2 + IL_0039: ret + + IL_003a: ldloc.2 + IL_003b: ldc.i4.0 + IL_003c: ble.s IL_0040 + + IL_003e: ldloc.2 + IL_003f: ret + + IL_0040: ldarg.2 + IL_0041: stloc.s V_6 + IL_0043: ldarg.0 + IL_0044: ldfld int32 assembly/R::y@ + IL_0049: stloc.s V_7 + IL_004b: ldloc.1 + IL_004c: ldfld int32 assembly/R::y@ + IL_0051: stloc.s V_8 + IL_0053: ldloc.s V_7 + IL_0055: ldloc.s V_8 + IL_0057: cgt + IL_0059: ldloc.s V_7 + IL_005b: ldloc.s V_8 + IL_005d: clt + IL_005f: sub + IL_0060: ret + + IL_0061: ldc.i4.1 + IL_0062: ret + + IL_0063: ldarg.1 + IL_0064: unbox.any assembly/R + IL_0069: brfalse.s IL_006d + + IL_006b: ldc.i4.m1 + IL_006c: ret + + IL_006d: ldc.i4.0 + IL_006e: 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 [runtime]System.Collections.IEqualityComparer V_1, + class [runtime]System.Collections.IEqualityComparer V_2) + IL_0000: ldarg.0 + IL_0001: brfalse.s IL_0035 + + IL_0003: ldc.i4.0 + IL_0004: stloc.0 + IL_0005: ldc.i4 0x9e3779b9 + IL_000a: ldarg.1 + IL_000b: stloc.1 + IL_000c: ldarg.0 + IL_000d: ldfld int32 assembly/R::y@ + IL_0012: ldloc.0 + IL_0013: ldc.i4.6 + IL_0014: shl + IL_0015: ldloc.0 + IL_0016: ldc.i4.2 + IL_0017: shr + IL_0018: add + IL_0019: add + IL_001a: add + IL_001b: stloc.0 + IL_001c: ldc.i4 0x9e3779b9 + IL_0021: ldarg.1 + IL_0022: stloc.2 + IL_0023: ldarg.0 + IL_0024: ldfld int32 assembly/R::x@ + IL_0029: ldloc.0 + IL_002a: ldc.i4.6 + IL_002b: shl + IL_002c: ldloc.0 + IL_002d: ldc.i4.2 + IL_002e: shr + IL_002f: add + IL_0030: add + IL_0031: add + IL_0032: stloc.0 + IL_0033: ldloc.0 + IL_0034: ret + + IL_0035: ldc.i4.0 + IL_0036: 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/R::GetHashCode(class [runtime]System.Collections.IEqualityComparer) + IL_000b: 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 4 + .locals init (class assembly/R V_0, + class assembly/R V_1, + class [runtime]System.Collections.IEqualityComparer V_2, + class [runtime]System.Collections.IEqualityComparer V_3) + IL_0000: ldarg.0 + IL_0001: brfalse.s IL_0036 + + IL_0003: ldarg.1 + IL_0004: isinst assembly/R + IL_0009: stloc.0 + IL_000a: ldloc.0 + IL_000b: brfalse.s IL_0034 + + IL_000d: ldloc.0 + IL_000e: stloc.1 + IL_000f: ldarg.2 + IL_0010: stloc.2 + IL_0011: ldarg.0 + IL_0012: ldfld int32 assembly/R::x@ + IL_0017: ldloc.1 + IL_0018: ldfld int32 assembly/R::x@ + IL_001d: ceq + IL_001f: brfalse.s IL_0032 + + IL_0021: ldarg.2 + IL_0022: stloc.3 + IL_0023: ldarg.0 + IL_0024: ldfld int32 assembly/R::y@ + IL_0029: ldloc.1 + IL_002a: ldfld int32 assembly/R::y@ + IL_002f: ceq + IL_0031: ret + + IL_0032: ldc.i4.0 + IL_0033: ret + + IL_0034: ldc.i4.0 + IL_0035: ret + + IL_0036: ldarg.1 + IL_0037: ldnull + IL_0038: cgt.un + IL_003a: ldc.i4.0 + IL_003b: ceq + IL_003d: ret + } + + .method public hidebysig virtual final + instance bool Equals(class assembly/R 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_0027 + + IL_0003: ldarg.1 + IL_0004: brfalse.s IL_0025 + + IL_0006: ldarg.0 + IL_0007: ldfld int32 assembly/R::x@ + IL_000c: ldarg.1 + IL_000d: ldfld int32 assembly/R::x@ + IL_0012: bne.un.s IL_0023 + + IL_0014: ldarg.0 + IL_0015: ldfld int32 assembly/R::y@ + IL_001a: ldarg.1 + IL_001b: ldfld int32 assembly/R::y@ + IL_0020: ceq + IL_0022: ret + + IL_0023: ldc.i4.0 + IL_0024: ret + + IL_0025: ldc.i4.0 + IL_0026: ret + + IL_0027: ldarg.1 + IL_0028: ldnull + IL_0029: cgt.un + IL_002b: ldc.i4.0 + IL_002c: ceq + IL_002e: 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/R V_0) + IL_0000: ldarg.1 + IL_0001: isinst assembly/R + 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/R::Equals(class assembly/R) + IL_0011: ret + + IL_0012: ldc.i4.0 + IL_0013: ret + } + + .property instance int32 x() + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags, + int32) = ( 01 00 04 00 00 00 00 00 00 00 00 00 ) + .get instance int32 assembly/R::get_x() + } + .property instance int32 y() + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags, + int32) = ( 01 00 04 00 00 00 01 00 00 00 00 00 ) + .get instance int32 assembly/R::get_y() + } + } + + .method public static class [runtime]System.Tuple`2 + assembly(int32 inp) cil managed + { + + .maxstack 4 + .locals init (class assembly/R V_0) + IL_0000: ldc.i4.3 + IL_0001: ldarg.0 + IL_0002: newobj instance void assembly/R::.ctor(int32, + int32) + IL_0007: stloc.0 + IL_0008: ldloc.0 + IL_0009: ldloc.0 + IL_000a: newobj instance void class [runtime]System.Tuple`2::.ctor(!0, + !1) + IL_000f: 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 + } + +} + + + + + + diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction24.fs.il.net472.debug.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction24.fs.il.net472.debug.bsl new file mode 100644 index 00000000000..4e97b29887a --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction24.fs.il.net472.debug.bsl @@ -0,0 +1,1065 @@ + + + + + +.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 +} +.mresource public FSharpSignatureData.assembly +{ + + +} +.mresource public FSharpOptimizationData.assembly +{ + + +} +.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 auto ansi serializable sealed nested public Point + 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 [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 02 00 00 00 00 00 ) + .field public int32 x@ + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.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 ) + .field public int32 y@ + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.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 ) + .method public hidebysig specialname + instance int32 get_x() 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/Point::x@ + IL_0006: ret + } + + .method public hidebysig specialname + instance int32 get_y() 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/Point::y@ + IL_0006: ret + } + + .method public hidebysig specialname + instance void set_x(int32 'value') 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: ldarg.1 + IL_0002: stfld int32 assembly/Point::x@ + IL_0007: ret + } + + .method public hidebysig specialname + instance void set_y(int32 'value') 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: ldarg.1 + IL_0002: stfld int32 assembly/Point::y@ + IL_0007: ret + } + + .method public specialname rtspecialname + instance void .ctor(int32 x, + int32 y) 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 14 54 65 73 74 46 75 6E 63 74 + 69 6F 6E 32 34 2B 50 6F 69 6E 74 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/Point::x@ + IL_000d: ldarg.0 + IL_000e: ldarg.2 + IL_000f: stfld int32 assembly/Point::y@ + IL_0014: 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/Point>::.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/Point 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, + int32 V_2, + int32 V_3, + class [runtime]System.Collections.IComparer V_4, + int32 V_5, + int32 V_6, + class [runtime]System.Collections.IComparer V_7, + int32 V_8, + int32 V_9, + class [runtime]System.Collections.IComparer V_10, + int32 V_11, + int32 V_12) + IL_0000: ldarg.0 + IL_0001: brfalse.s IL_0070 + + IL_0003: ldarg.1 + IL_0004: brfalse.s IL_006e + + IL_0006: call class [runtime]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() + IL_000b: stloc.1 + IL_000c: ldarg.0 + IL_000d: ldfld int32 assembly/Point::x@ + IL_0012: stloc.2 + IL_0013: ldarg.1 + IL_0014: ldfld int32 assembly/Point::x@ + IL_0019: stloc.3 + IL_001a: ldloc.1 + IL_001b: stloc.s V_4 + IL_001d: ldloc.2 + IL_001e: stloc.s V_5 + IL_0020: ldloc.3 + IL_0021: stloc.s V_6 + IL_0023: ldloc.s V_5 + IL_0025: ldloc.s V_6 + IL_0027: cgt + IL_0029: ldloc.s V_5 + IL_002b: ldloc.s V_6 + IL_002d: clt + IL_002f: sub + IL_0030: stloc.0 + IL_0031: ldloc.0 + IL_0032: ldc.i4.0 + IL_0033: bge.s IL_0037 + + IL_0035: ldloc.0 + IL_0036: ret + + IL_0037: ldloc.0 + IL_0038: ldc.i4.0 + IL_0039: ble.s IL_003d + + IL_003b: ldloc.0 + IL_003c: ret + + IL_003d: call class [runtime]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() + IL_0042: stloc.s V_7 + IL_0044: ldarg.0 + IL_0045: ldfld int32 assembly/Point::y@ + IL_004a: stloc.s V_8 + IL_004c: ldarg.1 + IL_004d: ldfld int32 assembly/Point::y@ + IL_0052: stloc.s V_9 + IL_0054: ldloc.s V_7 + IL_0056: stloc.s V_10 + IL_0058: ldloc.s V_8 + IL_005a: stloc.s V_11 + IL_005c: ldloc.s V_9 + IL_005e: stloc.s V_12 + IL_0060: ldloc.s V_11 + IL_0062: ldloc.s V_12 + IL_0064: cgt + IL_0066: ldloc.s V_11 + IL_0068: ldloc.s V_12 + IL_006a: clt + IL_006c: sub + IL_006d: ret + + IL_006e: ldc.i4.1 + IL_006f: ret + + IL_0070: ldarg.1 + IL_0071: brfalse.s IL_0075 + + IL_0073: ldc.i4.m1 + IL_0074: ret + + IL_0075: ldc.i4.0 + IL_0076: 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/Point + IL_0007: callvirt instance int32 assembly/Point::CompareTo(class assembly/Point) + 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 assembly/Point V_0, + class assembly/Point V_1, + int32 V_2, + class [runtime]System.Collections.IComparer V_3, + int32 V_4, + int32 V_5, + class [runtime]System.Collections.IComparer V_6, + int32 V_7, + int32 V_8, + class [runtime]System.Collections.IComparer V_9, + int32 V_10, + int32 V_11, + class [runtime]System.Collections.IComparer V_12, + int32 V_13, + int32 V_14) + IL_0000: ldarg.1 + IL_0001: unbox.any assembly/Point + IL_0006: stloc.0 + IL_0007: ldloc.0 + IL_0008: stloc.1 + IL_0009: ldarg.0 + IL_000a: brfalse.s IL_007a + + IL_000c: ldarg.1 + IL_000d: unbox.any assembly/Point + IL_0012: brfalse.s IL_0078 + + IL_0014: ldarg.2 + IL_0015: stloc.3 + IL_0016: ldarg.0 + IL_0017: ldfld int32 assembly/Point::x@ + IL_001c: stloc.s V_4 + IL_001e: ldloc.1 + IL_001f: ldfld int32 assembly/Point::x@ + IL_0024: stloc.s V_5 + IL_0026: ldloc.3 + IL_0027: stloc.s V_6 + IL_0029: ldloc.s V_4 + IL_002b: stloc.s V_7 + IL_002d: ldloc.s V_5 + IL_002f: stloc.s V_8 + IL_0031: ldloc.s V_7 + IL_0033: ldloc.s V_8 + IL_0035: cgt + IL_0037: ldloc.s V_7 + IL_0039: ldloc.s V_8 + IL_003b: clt + IL_003d: sub + IL_003e: stloc.2 + IL_003f: ldloc.2 + IL_0040: ldc.i4.0 + IL_0041: bge.s IL_0045 + + IL_0043: ldloc.2 + IL_0044: ret + + IL_0045: ldloc.2 + IL_0046: ldc.i4.0 + IL_0047: ble.s IL_004b + + IL_0049: ldloc.2 + IL_004a: ret + + IL_004b: ldarg.2 + IL_004c: stloc.s V_9 + IL_004e: ldarg.0 + IL_004f: ldfld int32 assembly/Point::y@ + IL_0054: stloc.s V_10 + IL_0056: ldloc.1 + IL_0057: ldfld int32 assembly/Point::y@ + IL_005c: stloc.s V_11 + IL_005e: ldloc.s V_9 + IL_0060: stloc.s V_12 + IL_0062: ldloc.s V_10 + IL_0064: stloc.s V_13 + IL_0066: ldloc.s V_11 + IL_0068: stloc.s V_14 + IL_006a: ldloc.s V_13 + IL_006c: ldloc.s V_14 + IL_006e: cgt + IL_0070: ldloc.s V_13 + IL_0072: ldloc.s V_14 + IL_0074: clt + IL_0076: sub + IL_0077: ret + + IL_0078: ldc.i4.1 + IL_0079: ret + + IL_007a: ldarg.1 + IL_007b: unbox.any assembly/Point + IL_0080: brfalse.s IL_0084 + + IL_0082: ldc.i4.m1 + IL_0083: ret + + IL_0084: ldc.i4.0 + IL_0085: 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 [runtime]System.Collections.IEqualityComparer V_1, + int32 V_2, + class [runtime]System.Collections.IEqualityComparer V_3, + class [runtime]System.Collections.IEqualityComparer V_4, + int32 V_5, + class [runtime]System.Collections.IEqualityComparer V_6) + IL_0000: ldarg.0 + IL_0001: brfalse.s IL_0042 + + IL_0003: ldc.i4.0 + IL_0004: stloc.0 + IL_0005: ldc.i4 0x9e3779b9 + IL_000a: ldarg.1 + IL_000b: stloc.1 + IL_000c: ldarg.0 + IL_000d: ldfld int32 assembly/Point::y@ + IL_0012: stloc.2 + IL_0013: ldloc.1 + IL_0014: stloc.3 + IL_0015: ldloc.2 + IL_0016: ldloc.0 + IL_0017: ldc.i4.6 + IL_0018: shl + IL_0019: ldloc.0 + IL_001a: ldc.i4.2 + IL_001b: shr + IL_001c: add + IL_001d: add + IL_001e: add + IL_001f: stloc.0 + IL_0020: ldc.i4 0x9e3779b9 + IL_0025: ldarg.1 + IL_0026: stloc.s V_4 + IL_0028: ldarg.0 + IL_0029: ldfld int32 assembly/Point::x@ + IL_002e: stloc.s V_5 + IL_0030: ldloc.s V_4 + IL_0032: stloc.s V_6 + IL_0034: ldloc.s V_5 + IL_0036: ldloc.0 + IL_0037: ldc.i4.6 + IL_0038: shl + IL_0039: ldloc.0 + IL_003a: ldc.i4.2 + IL_003b: shr + IL_003c: add + IL_003d: add + IL_003e: add + IL_003f: stloc.0 + IL_0040: ldloc.0 + IL_0041: ret + + IL_0042: ldc.i4.0 + IL_0043: 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/Point::GetHashCode(class [runtime]System.Collections.IEqualityComparer) + IL_000b: 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 4 + .locals init (class assembly/Point V_0, + class assembly/Point V_1, + class [runtime]System.Collections.IEqualityComparer V_2, + int32 V_3, + int32 V_4, + class [runtime]System.Collections.IEqualityComparer V_5, + class [runtime]System.Collections.IEqualityComparer V_6, + int32 V_7, + int32 V_8, + class [runtime]System.Collections.IEqualityComparer V_9) + IL_0000: ldarg.0 + IL_0001: brfalse.s IL_004c + + IL_0003: ldarg.1 + IL_0004: isinst assembly/Point + IL_0009: stloc.0 + IL_000a: ldloc.0 + IL_000b: brfalse.s IL_004a + + IL_000d: ldloc.0 + IL_000e: stloc.1 + IL_000f: ldarg.2 + IL_0010: stloc.2 + IL_0011: ldarg.0 + IL_0012: ldfld int32 assembly/Point::x@ + IL_0017: stloc.3 + IL_0018: ldloc.1 + IL_0019: ldfld int32 assembly/Point::x@ + IL_001e: stloc.s V_4 + IL_0020: ldloc.2 + IL_0021: stloc.s V_5 + IL_0023: ldloc.3 + IL_0024: ldloc.s V_4 + IL_0026: ceq + IL_0028: brfalse.s IL_0048 + + IL_002a: ldarg.2 + IL_002b: stloc.s V_6 + IL_002d: ldarg.0 + IL_002e: ldfld int32 assembly/Point::y@ + IL_0033: stloc.s V_7 + IL_0035: ldloc.1 + IL_0036: ldfld int32 assembly/Point::y@ + IL_003b: stloc.s V_8 + IL_003d: ldloc.s V_6 + IL_003f: stloc.s V_9 + IL_0041: ldloc.s V_7 + IL_0043: ldloc.s V_8 + IL_0045: ceq + IL_0047: ret + + IL_0048: ldc.i4.0 + IL_0049: ret + + IL_004a: ldc.i4.0 + IL_004b: ret + + IL_004c: ldarg.1 + IL_004d: ldnull + IL_004e: cgt.un + IL_0050: ldc.i4.0 + IL_0051: ceq + IL_0053: ret + } + + .method public hidebysig virtual final + instance bool Equals(class assembly/Point 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_0027 + + IL_0003: ldarg.1 + IL_0004: brfalse.s IL_0025 + + IL_0006: ldarg.0 + IL_0007: ldfld int32 assembly/Point::x@ + IL_000c: ldarg.1 + IL_000d: ldfld int32 assembly/Point::x@ + IL_0012: bne.un.s IL_0023 + + IL_0014: ldarg.0 + IL_0015: ldfld int32 assembly/Point::y@ + IL_001a: ldarg.1 + IL_001b: ldfld int32 assembly/Point::y@ + IL_0020: ceq + IL_0022: ret + + IL_0023: ldc.i4.0 + IL_0024: ret + + IL_0025: ldc.i4.0 + IL_0026: ret + + IL_0027: ldarg.1 + IL_0028: ldnull + IL_0029: cgt.un + IL_002b: ldc.i4.0 + IL_002c: ceq + IL_002e: 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/Point V_0) + IL_0000: ldarg.1 + IL_0001: isinst assembly/Point + 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/Point::Equals(class assembly/Point) + IL_0011: ret + + IL_0012: ldc.i4.0 + IL_0013: ret + } + + .property instance int32 x() + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags, + int32) = ( 01 00 04 00 00 00 00 00 00 00 00 00 ) + .set instance void assembly/Point::set_x(int32) + .get instance int32 assembly/Point::get_x() + } + .property instance int32 y() + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags, + int32) = ( 01 00 04 00 00 00 01 00 00 00 00 00 ) + .set instance void assembly/Point::set_y(int32) + .get instance int32 assembly/Point::get_y() + } + } + + .method public static int32 pinObject() cil managed + { + + .maxstack 6 + .locals init (class assembly/Point V_0, + native int V_1, + int32& pinned V_2, + native int V_3, + int32 V_4, + native int V_5, + int32 V_6, + native int V_7, + int32 V_8, + native int V_9, + int32 V_10) + IL_0000: ldc.i4.1 + IL_0001: ldc.i4.2 + IL_0002: newobj instance void assembly/Point::.ctor(int32, + int32) + IL_0007: stloc.0 + IL_0008: ldloc.0 + IL_0009: ldflda int32 assembly/Point::x@ + IL_000e: stloc.2 + IL_000f: ldloc.2 + IL_0010: conv.i + IL_0011: stloc.1 + IL_0012: ldloc.1 + IL_0013: stloc.3 + IL_0014: ldc.i4.0 + IL_0015: stloc.s V_4 + IL_0017: ldloc.3 + IL_0018: stloc.s V_5 + IL_001a: ldloc.s V_4 + IL_001c: stloc.s V_6 + IL_001e: ldloc.s V_5 + IL_0020: ldloc.s V_6 + IL_0022: conv.i + IL_0023: sizeof [runtime]System.Int32 + IL_0029: mul + IL_002a: add + IL_002b: ldobj [runtime]System.Int32 + IL_0030: ldloc.1 + IL_0031: stloc.s V_7 + IL_0033: ldc.i4.1 + IL_0034: stloc.s V_8 + IL_0036: ldloc.s V_7 + IL_0038: stloc.s V_9 + IL_003a: ldloc.s V_8 + IL_003c: stloc.s V_10 + IL_003e: ldloc.s V_9 + IL_0040: ldloc.s V_10 + IL_0042: conv.i + IL_0043: sizeof [runtime]System.Int32 + IL_0049: mul + IL_004a: add + IL_004b: ldobj [runtime]System.Int32 + IL_0050: add + IL_0051: ret + } + + .method public static int32 pinRef() cil managed + { + + .maxstack 4 + .locals init (class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 V_0, + native int V_1, + int32& pinned V_2) + IL_0000: ldc.i4.s 17 + IL_0002: call class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 [FSharp.Core]Microsoft.FSharp.Core.Operators::Ref(!!0) + IL_0007: stloc.0 + IL_0008: ldloc.0 + IL_0009: ldflda !0 class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1::contents@ + IL_000e: stloc.2 + IL_000f: ldloc.2 + IL_0010: conv.i + IL_0011: stloc.1 + IL_0012: ldloc.1 + IL_0013: ldobj [runtime]System.Int32 + IL_0018: ldloc.1 + IL_0019: ldobj [runtime]System.Int32 + IL_001e: add + IL_001f: ret + } + + .method public static float64 pinArray1() cil managed + { + + .maxstack 6 + .locals init (float64[] V_0, + native int V_1, + float64[] V_2, + float64& pinned V_3, + native int V_4, + int32 V_5, + native int V_6, + int32 V_7, + native int V_8, + int32 V_9, + native int V_10, + int32 V_11) + IL_0000: ldc.i4.6 + IL_0001: newarr [runtime]System.Double + IL_0006: dup + IL_0007: ldc.i4.0 + IL_0008: ldc.r8 0.0 + IL_0011: stelem [runtime]System.Double + IL_0016: dup + IL_0017: ldc.i4.1 + IL_0018: ldc.r8 1.5 + IL_0021: stelem [runtime]System.Double + IL_0026: dup + IL_0027: ldc.i4.2 + IL_0028: ldc.r8 2.2999999999999998 + IL_0031: stelem [runtime]System.Double + IL_0036: dup + IL_0037: ldc.i4.3 + IL_0038: ldc.r8 3.3999999999999999 + IL_0041: stelem [runtime]System.Double + IL_0046: dup + IL_0047: ldc.i4.4 + IL_0048: ldc.r8 4.0999999999999996 + IL_0051: stelem [runtime]System.Double + IL_0056: dup + IL_0057: ldc.i4.5 + IL_0058: ldc.r8 5.9000000000000004 + IL_0061: stelem [runtime]System.Double + IL_0066: stloc.0 + IL_0067: ldloc.0 + IL_0068: stloc.2 + IL_0069: ldloc.2 + IL_006a: brfalse.s IL_0086 + + IL_006c: ldloc.2 + IL_006d: call int32 [FSharp.Core]Microsoft.FSharp.Collections.ArrayModule::Length(!!0[]) + IL_0072: brfalse.s IL_0081 + + IL_0074: ldloc.2 + IL_0075: ldc.i4.0 + IL_0076: ldelema [runtime]System.Double + IL_007b: stloc.3 + IL_007c: ldloc.3 + IL_007d: conv.i + IL_007e: nop + IL_007f: br.s IL_0089 + + IL_0081: ldc.i4.0 + IL_0082: conv.i + IL_0083: nop + IL_0084: br.s IL_0089 + + IL_0086: ldc.i4.0 + IL_0087: conv.i + IL_0088: nop + IL_0089: stloc.1 + IL_008a: ldloc.1 + IL_008b: stloc.s V_4 + IL_008d: ldc.i4.0 + IL_008e: stloc.s V_5 + IL_0090: ldloc.s V_4 + IL_0092: stloc.s V_6 + IL_0094: ldloc.s V_5 + IL_0096: stloc.s V_7 + IL_0098: ldloc.s V_6 + IL_009a: ldloc.s V_7 + IL_009c: conv.i + IL_009d: sizeof [runtime]System.Double + IL_00a3: mul + IL_00a4: add + IL_00a5: ldobj [runtime]System.Double + IL_00aa: ldloc.1 + IL_00ab: stloc.s V_8 + IL_00ad: ldc.i4.1 + IL_00ae: stloc.s V_9 + IL_00b0: ldloc.s V_8 + IL_00b2: stloc.s V_10 + IL_00b4: ldloc.s V_9 + IL_00b6: stloc.s V_11 + IL_00b8: ldloc.s V_10 + IL_00ba: ldloc.s V_11 + IL_00bc: conv.i + IL_00bd: sizeof [runtime]System.Double + IL_00c3: mul + IL_00c4: add + IL_00c5: ldobj [runtime]System.Double + IL_00ca: add + IL_00cb: ret + } + + .method public static float64 pinArray2() cil managed + { + + .maxstack 6 + .locals init (float64[] V_0, + native int V_1, + float64& pinned V_2, + native int V_3, + int32 V_4, + native int V_5, + int32 V_6, + native int V_7, + int32 V_8, + native int V_9, + int32 V_10) + IL_0000: ldc.i4.6 + IL_0001: newarr [runtime]System.Double + IL_0006: dup + IL_0007: ldc.i4.0 + IL_0008: ldc.r8 0.0 + IL_0011: stelem [runtime]System.Double + IL_0016: dup + IL_0017: ldc.i4.1 + IL_0018: ldc.r8 1.5 + IL_0021: stelem [runtime]System.Double + IL_0026: dup + IL_0027: ldc.i4.2 + IL_0028: ldc.r8 2.2999999999999998 + IL_0031: stelem [runtime]System.Double + IL_0036: dup + IL_0037: ldc.i4.3 + IL_0038: ldc.r8 3.3999999999999999 + IL_0041: stelem [runtime]System.Double + IL_0046: dup + IL_0047: ldc.i4.4 + IL_0048: ldc.r8 4.0999999999999996 + IL_0051: stelem [runtime]System.Double + IL_0056: dup + IL_0057: ldc.i4.5 + IL_0058: ldc.r8 5.9000000000000004 + IL_0061: stelem [runtime]System.Double + IL_0066: stloc.0 + IL_0067: ldloc.0 + IL_0068: ldc.i4.0 + IL_0069: ldelema [runtime]System.Double + IL_006e: stloc.2 + IL_006f: ldloc.2 + IL_0070: conv.i + IL_0071: stloc.1 + IL_0072: ldloc.1 + IL_0073: stloc.3 + IL_0074: ldc.i4.0 + IL_0075: stloc.s V_4 + IL_0077: ldloc.3 + IL_0078: stloc.s V_5 + IL_007a: ldloc.s V_4 + IL_007c: stloc.s V_6 + IL_007e: ldloc.s V_5 + IL_0080: ldloc.s V_6 + IL_0082: conv.i + IL_0083: sizeof [runtime]System.Double + IL_0089: mul + IL_008a: add + IL_008b: ldobj [runtime]System.Double + IL_0090: ldloc.1 + IL_0091: stloc.s V_7 + IL_0093: ldc.i4.1 + IL_0094: stloc.s V_8 + IL_0096: ldloc.s V_7 + IL_0098: stloc.s V_9 + IL_009a: ldloc.s V_8 + IL_009c: stloc.s V_10 + IL_009e: ldloc.s V_9 + IL_00a0: ldloc.s V_10 + IL_00a2: conv.i + IL_00a3: sizeof [runtime]System.Double + IL_00a9: mul + IL_00aa: add + IL_00ab: ldobj [runtime]System.Double + IL_00b0: add + IL_00b1: ret + } + + .method public static class [runtime]System.Tuple`2 + pinString() cil managed + { + + .maxstack 6 + .locals init (string V_0, + native int V_1, + string pinned V_2, + native int V_3, + int32 V_4, + native int V_5, + int32 V_6, + native int V_7, + int32 V_8, + native int V_9, + int32 V_10) + IL_0000: ldstr "Hello World" + IL_0005: stloc.0 + IL_0006: ldloc.0 + IL_0007: stloc.2 + IL_0008: ldloc.2 + IL_0009: brfalse.s IL_0016 + + IL_000b: ldloc.2 + IL_000c: conv.i + IL_000d: call int32 [runtime]System.Runtime.CompilerServices.RuntimeHelpers::get_OffsetToStringData() + IL_0012: add + IL_0013: nop + IL_0014: br.s IL_0018 + + IL_0016: ldloc.2 + IL_0017: nop + IL_0018: stloc.1 + IL_0019: ldloc.1 + IL_001a: stloc.3 + IL_001b: ldc.i4.0 + IL_001c: stloc.s V_4 + IL_001e: ldloc.3 + IL_001f: stloc.s V_5 + IL_0021: ldloc.s V_4 + IL_0023: stloc.s V_6 + IL_0025: ldloc.s V_5 + IL_0027: ldloc.s V_6 + IL_0029: conv.i + IL_002a: sizeof [runtime]System.Char + IL_0030: mul + IL_0031: add + IL_0032: ldobj [runtime]System.Char + IL_0037: ldloc.1 + IL_0038: stloc.s V_7 + IL_003a: ldc.i4.1 + IL_003b: stloc.s V_8 + IL_003d: ldloc.s V_7 + IL_003f: stloc.s V_9 + IL_0041: ldloc.s V_8 + IL_0043: stloc.s V_10 + IL_0045: ldloc.s V_9 + IL_0047: ldloc.s V_10 + IL_0049: conv.i + IL_004a: sizeof [runtime]System.Char + IL_0050: mul + IL_0051: add + IL_0052: ldobj [runtime]System.Char + IL_0057: newobj instance void class [runtime]System.Tuple`2::.ctor(!0, + !1) + IL_005c: 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 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__ = int32(0x00000000) + .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 +{ + .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 private hidebysig specialname instance void + set_Type(class [runtime]System.Type 'value') 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: ldarg.1 + IL_0002: stfld class [runtime]System.Type System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::Type@ + IL_0007: 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 + } + + .method private hidebysig specialname instance void + set_MemberType(valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes 'value') 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: ldarg.1 + IL_0002: stfld valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::MemberType@ + IL_0007: 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 ) + .set instance void System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::set_MemberType(valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes) + .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 ) + .set instance void System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::set_Type(class [runtime]System.Type) + .get instance class [runtime]System.Type System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::get_Type() + } +} + + + + + + diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction24.fs.il.net472.release.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction24.fs.il.net472.release.bsl new file mode 100644 index 00000000000..ae1c94ba855 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction24.fs.il.net472.release.bsl @@ -0,0 +1,951 @@ + + + + + +.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 +} +.mresource public FSharpSignatureData.assembly +{ + + +} +.mresource public FSharpOptimizationData.assembly +{ + + +} +.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 auto ansi serializable sealed nested public Point + 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 [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 02 00 00 00 00 00 ) + .field public int32 x@ + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.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 ) + .field public int32 y@ + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.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 ) + .method public hidebysig specialname + instance int32 get_x() 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/Point::x@ + IL_0006: ret + } + + .method public hidebysig specialname + instance int32 get_y() 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/Point::y@ + IL_0006: ret + } + + .method public hidebysig specialname + instance void set_x(int32 'value') 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: ldarg.1 + IL_0002: stfld int32 assembly/Point::x@ + IL_0007: ret + } + + .method public hidebysig specialname + instance void set_y(int32 'value') 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: ldarg.1 + IL_0002: stfld int32 assembly/Point::y@ + IL_0007: ret + } + + .method public specialname rtspecialname + instance void .ctor(int32 x, + int32 y) 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 14 54 65 73 74 46 75 6E 63 74 + 69 6F 6E 32 34 2B 50 6F 69 6E 74 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/Point::x@ + IL_000d: ldarg.0 + IL_000e: ldarg.2 + IL_000f: stfld int32 assembly/Point::y@ + IL_0014: 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/Point>::.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/Point 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, + int32 V_2, + int32 V_3, + class [runtime]System.Collections.IComparer V_4, + int32 V_5, + int32 V_6) + IL_0000: ldarg.0 + IL_0001: brfalse.s IL_0057 + + IL_0003: ldarg.1 + IL_0004: brfalse.s IL_0055 + + IL_0006: call class [runtime]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() + IL_000b: stloc.1 + IL_000c: ldarg.0 + IL_000d: ldfld int32 assembly/Point::x@ + IL_0012: stloc.2 + IL_0013: ldarg.1 + IL_0014: ldfld int32 assembly/Point::x@ + IL_0019: stloc.3 + IL_001a: ldloc.2 + IL_001b: ldloc.3 + IL_001c: cgt + IL_001e: ldloc.2 + IL_001f: ldloc.3 + IL_0020: clt + IL_0022: sub + IL_0023: stloc.0 + IL_0024: ldloc.0 + IL_0025: ldc.i4.0 + IL_0026: bge.s IL_002a + + IL_0028: ldloc.0 + IL_0029: ret + + IL_002a: ldloc.0 + IL_002b: ldc.i4.0 + IL_002c: ble.s IL_0030 + + IL_002e: ldloc.0 + IL_002f: ret + + IL_0030: call class [runtime]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() + IL_0035: stloc.s V_4 + IL_0037: ldarg.0 + IL_0038: ldfld int32 assembly/Point::y@ + IL_003d: stloc.s V_5 + IL_003f: ldarg.1 + IL_0040: ldfld int32 assembly/Point::y@ + IL_0045: stloc.s V_6 + IL_0047: ldloc.s V_5 + IL_0049: ldloc.s V_6 + IL_004b: cgt + IL_004d: ldloc.s V_5 + IL_004f: ldloc.s V_6 + IL_0051: clt + IL_0053: sub + IL_0054: ret + + IL_0055: ldc.i4.1 + IL_0056: ret + + IL_0057: ldarg.1 + IL_0058: brfalse.s IL_005c + + IL_005a: ldc.i4.m1 + IL_005b: ret + + IL_005c: ldc.i4.0 + IL_005d: 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/Point + IL_0007: callvirt instance int32 assembly/Point::CompareTo(class assembly/Point) + 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 assembly/Point V_0, + class assembly/Point V_1, + int32 V_2, + class [runtime]System.Collections.IComparer V_3, + int32 V_4, + int32 V_5, + class [runtime]System.Collections.IComparer V_6, + int32 V_7, + int32 V_8) + IL_0000: ldarg.1 + IL_0001: unbox.any assembly/Point + IL_0006: stloc.0 + IL_0007: ldloc.0 + IL_0008: stloc.1 + IL_0009: ldarg.0 + IL_000a: brfalse.s IL_0063 + + IL_000c: ldarg.1 + IL_000d: unbox.any assembly/Point + IL_0012: brfalse.s IL_0061 + + IL_0014: ldarg.2 + IL_0015: stloc.3 + IL_0016: ldarg.0 + IL_0017: ldfld int32 assembly/Point::x@ + IL_001c: stloc.s V_4 + IL_001e: ldloc.1 + IL_001f: ldfld int32 assembly/Point::x@ + IL_0024: stloc.s V_5 + IL_0026: ldloc.s V_4 + IL_0028: ldloc.s V_5 + IL_002a: cgt + IL_002c: ldloc.s V_4 + IL_002e: ldloc.s V_5 + IL_0030: clt + IL_0032: sub + IL_0033: stloc.2 + IL_0034: ldloc.2 + IL_0035: ldc.i4.0 + IL_0036: bge.s IL_003a + + IL_0038: ldloc.2 + IL_0039: ret + + IL_003a: ldloc.2 + IL_003b: ldc.i4.0 + IL_003c: ble.s IL_0040 + + IL_003e: ldloc.2 + IL_003f: ret + + IL_0040: ldarg.2 + IL_0041: stloc.s V_6 + IL_0043: ldarg.0 + IL_0044: ldfld int32 assembly/Point::y@ + IL_0049: stloc.s V_7 + IL_004b: ldloc.1 + IL_004c: ldfld int32 assembly/Point::y@ + IL_0051: stloc.s V_8 + IL_0053: ldloc.s V_7 + IL_0055: ldloc.s V_8 + IL_0057: cgt + IL_0059: ldloc.s V_7 + IL_005b: ldloc.s V_8 + IL_005d: clt + IL_005f: sub + IL_0060: ret + + IL_0061: ldc.i4.1 + IL_0062: ret + + IL_0063: ldarg.1 + IL_0064: unbox.any assembly/Point + IL_0069: brfalse.s IL_006d + + IL_006b: ldc.i4.m1 + IL_006c: ret + + IL_006d: ldc.i4.0 + IL_006e: 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 [runtime]System.Collections.IEqualityComparer V_1, + class [runtime]System.Collections.IEqualityComparer V_2) + IL_0000: ldarg.0 + IL_0001: brfalse.s IL_0035 + + IL_0003: ldc.i4.0 + IL_0004: stloc.0 + IL_0005: ldc.i4 0x9e3779b9 + IL_000a: ldarg.1 + IL_000b: stloc.1 + IL_000c: ldarg.0 + IL_000d: ldfld int32 assembly/Point::y@ + IL_0012: ldloc.0 + IL_0013: ldc.i4.6 + IL_0014: shl + IL_0015: ldloc.0 + IL_0016: ldc.i4.2 + IL_0017: shr + IL_0018: add + IL_0019: add + IL_001a: add + IL_001b: stloc.0 + IL_001c: ldc.i4 0x9e3779b9 + IL_0021: ldarg.1 + IL_0022: stloc.2 + IL_0023: ldarg.0 + IL_0024: ldfld int32 assembly/Point::x@ + IL_0029: ldloc.0 + IL_002a: ldc.i4.6 + IL_002b: shl + IL_002c: ldloc.0 + IL_002d: ldc.i4.2 + IL_002e: shr + IL_002f: add + IL_0030: add + IL_0031: add + IL_0032: stloc.0 + IL_0033: ldloc.0 + IL_0034: ret + + IL_0035: ldc.i4.0 + IL_0036: 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/Point::GetHashCode(class [runtime]System.Collections.IEqualityComparer) + IL_000b: 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 4 + .locals init (class assembly/Point V_0, + class assembly/Point V_1, + class [runtime]System.Collections.IEqualityComparer V_2, + class [runtime]System.Collections.IEqualityComparer V_3) + IL_0000: ldarg.0 + IL_0001: brfalse.s IL_0036 + + IL_0003: ldarg.1 + IL_0004: isinst assembly/Point + IL_0009: stloc.0 + IL_000a: ldloc.0 + IL_000b: brfalse.s IL_0034 + + IL_000d: ldloc.0 + IL_000e: stloc.1 + IL_000f: ldarg.2 + IL_0010: stloc.2 + IL_0011: ldarg.0 + IL_0012: ldfld int32 assembly/Point::x@ + IL_0017: ldloc.1 + IL_0018: ldfld int32 assembly/Point::x@ + IL_001d: ceq + IL_001f: brfalse.s IL_0032 + + IL_0021: ldarg.2 + IL_0022: stloc.3 + IL_0023: ldarg.0 + IL_0024: ldfld int32 assembly/Point::y@ + IL_0029: ldloc.1 + IL_002a: ldfld int32 assembly/Point::y@ + IL_002f: ceq + IL_0031: ret + + IL_0032: ldc.i4.0 + IL_0033: ret + + IL_0034: ldc.i4.0 + IL_0035: ret + + IL_0036: ldarg.1 + IL_0037: ldnull + IL_0038: cgt.un + IL_003a: ldc.i4.0 + IL_003b: ceq + IL_003d: ret + } + + .method public hidebysig virtual final + instance bool Equals(class assembly/Point 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_0027 + + IL_0003: ldarg.1 + IL_0004: brfalse.s IL_0025 + + IL_0006: ldarg.0 + IL_0007: ldfld int32 assembly/Point::x@ + IL_000c: ldarg.1 + IL_000d: ldfld int32 assembly/Point::x@ + IL_0012: bne.un.s IL_0023 + + IL_0014: ldarg.0 + IL_0015: ldfld int32 assembly/Point::y@ + IL_001a: ldarg.1 + IL_001b: ldfld int32 assembly/Point::y@ + IL_0020: ceq + IL_0022: ret + + IL_0023: ldc.i4.0 + IL_0024: ret + + IL_0025: ldc.i4.0 + IL_0026: ret + + IL_0027: ldarg.1 + IL_0028: ldnull + IL_0029: cgt.un + IL_002b: ldc.i4.0 + IL_002c: ceq + IL_002e: 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/Point V_0) + IL_0000: ldarg.1 + IL_0001: isinst assembly/Point + 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/Point::Equals(class assembly/Point) + IL_0011: ret + + IL_0012: ldc.i4.0 + IL_0013: ret + } + + .property instance int32 x() + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags, + int32) = ( 01 00 04 00 00 00 00 00 00 00 00 00 ) + .set instance void assembly/Point::set_x(int32) + .get instance int32 assembly/Point::get_x() + } + .property instance int32 y() + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags, + int32) = ( 01 00 04 00 00 00 01 00 00 00 00 00 ) + .set instance void assembly/Point::set_y(int32) + .get instance int32 assembly/Point::get_y() + } + } + + .method public static int32 pinObject() cil managed + { + + .maxstack 6 + .locals init (class assembly/Point V_0, + native int V_1, + int32& pinned V_2, + native int V_3, + int32 V_4, + native int V_5, + int32 V_6) + IL_0000: ldc.i4.1 + IL_0001: ldc.i4.2 + IL_0002: newobj instance void assembly/Point::.ctor(int32, + int32) + IL_0007: stloc.0 + IL_0008: ldloc.0 + IL_0009: ldflda int32 assembly/Point::x@ + IL_000e: stloc.2 + IL_000f: ldloc.2 + IL_0010: conv.i + IL_0011: stloc.1 + IL_0012: ldloc.1 + IL_0013: stloc.3 + IL_0014: ldc.i4.0 + IL_0015: stloc.s V_4 + IL_0017: ldloc.3 + IL_0018: ldloc.s V_4 + IL_001a: conv.i + IL_001b: sizeof [runtime]System.Int32 + IL_0021: mul + IL_0022: add + IL_0023: ldobj [runtime]System.Int32 + IL_0028: ldloc.1 + IL_0029: stloc.s V_5 + IL_002b: ldc.i4.1 + IL_002c: stloc.s V_6 + IL_002e: ldloc.s V_5 + IL_0030: ldloc.s V_6 + IL_0032: conv.i + IL_0033: sizeof [runtime]System.Int32 + IL_0039: mul + IL_003a: add + IL_003b: ldobj [runtime]System.Int32 + IL_0040: add + IL_0041: ret + } + + .method public static int32 pinRef() cil managed + { + + .maxstack 4 + .locals init (class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 V_0, + native int V_1, + int32& pinned V_2) + IL_0000: ldc.i4.s 17 + IL_0002: call class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 [FSharp.Core]Microsoft.FSharp.Core.Operators::Ref(!!0) + IL_0007: stloc.0 + IL_0008: ldloc.0 + IL_0009: ldflda !0 class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1::contents@ + IL_000e: stloc.2 + IL_000f: ldloc.2 + IL_0010: conv.i + IL_0011: stloc.1 + IL_0012: ldloc.1 + IL_0013: ldobj [runtime]System.Int32 + IL_0018: ldloc.1 + IL_0019: ldobj [runtime]System.Int32 + IL_001e: add + IL_001f: ret + } + + .method public static float64 pinArray1() cil managed + { + + .maxstack 6 + .locals init (float64[] V_0, + native int V_1, + float64[] V_2, + float64& pinned V_3, + native int V_4, + int32 V_5, + native int V_6, + int32 V_7) + IL_0000: ldc.i4.6 + IL_0001: newarr [runtime]System.Double + IL_0006: dup + IL_0007: ldc.i4.0 + IL_0008: ldc.r8 0.0 + IL_0011: stelem [runtime]System.Double + IL_0016: dup + IL_0017: ldc.i4.1 + IL_0018: ldc.r8 1.5 + IL_0021: stelem [runtime]System.Double + IL_0026: dup + IL_0027: ldc.i4.2 + IL_0028: ldc.r8 2.2999999999999998 + IL_0031: stelem [runtime]System.Double + IL_0036: dup + IL_0037: ldc.i4.3 + IL_0038: ldc.r8 3.3999999999999999 + IL_0041: stelem [runtime]System.Double + IL_0046: dup + IL_0047: ldc.i4.4 + IL_0048: ldc.r8 4.0999999999999996 + IL_0051: stelem [runtime]System.Double + IL_0056: dup + IL_0057: ldc.i4.5 + IL_0058: ldc.r8 5.9000000000000004 + IL_0061: stelem [runtime]System.Double + IL_0066: stloc.0 + IL_0067: ldloc.0 + IL_0068: stloc.2 + IL_0069: ldloc.2 + IL_006a: brfalse.s IL_0086 + + IL_006c: ldloc.2 + IL_006d: call int32 [FSharp.Core]Microsoft.FSharp.Collections.ArrayModule::Length(!!0[]) + IL_0072: brfalse.s IL_0081 + + IL_0074: ldloc.2 + IL_0075: ldc.i4.0 + IL_0076: ldelema [runtime]System.Double + IL_007b: stloc.3 + IL_007c: ldloc.3 + IL_007d: conv.i + IL_007e: nop + IL_007f: br.s IL_0089 + + IL_0081: ldc.i4.0 + IL_0082: conv.i + IL_0083: nop + IL_0084: br.s IL_0089 + + IL_0086: ldc.i4.0 + IL_0087: conv.i + IL_0088: nop + IL_0089: stloc.1 + IL_008a: ldloc.1 + IL_008b: stloc.s V_4 + IL_008d: ldc.i4.0 + IL_008e: stloc.s V_5 + IL_0090: ldloc.s V_4 + IL_0092: ldloc.s V_5 + IL_0094: conv.i + IL_0095: sizeof [runtime]System.Double + IL_009b: mul + IL_009c: add + IL_009d: ldobj [runtime]System.Double + IL_00a2: ldloc.1 + IL_00a3: stloc.s V_6 + IL_00a5: ldc.i4.1 + IL_00a6: stloc.s V_7 + IL_00a8: ldloc.s V_6 + IL_00aa: ldloc.s V_7 + IL_00ac: conv.i + IL_00ad: sizeof [runtime]System.Double + IL_00b3: mul + IL_00b4: add + IL_00b5: ldobj [runtime]System.Double + IL_00ba: add + IL_00bb: ret + } + + .method public static float64 pinArray2() cil managed + { + + .maxstack 6 + .locals init (float64[] V_0, + native int V_1, + float64& pinned V_2, + native int V_3, + int32 V_4, + native int V_5, + int32 V_6) + IL_0000: ldc.i4.6 + IL_0001: newarr [runtime]System.Double + IL_0006: dup + IL_0007: ldc.i4.0 + IL_0008: ldc.r8 0.0 + IL_0011: stelem [runtime]System.Double + IL_0016: dup + IL_0017: ldc.i4.1 + IL_0018: ldc.r8 1.5 + IL_0021: stelem [runtime]System.Double + IL_0026: dup + IL_0027: ldc.i4.2 + IL_0028: ldc.r8 2.2999999999999998 + IL_0031: stelem [runtime]System.Double + IL_0036: dup + IL_0037: ldc.i4.3 + IL_0038: ldc.r8 3.3999999999999999 + IL_0041: stelem [runtime]System.Double + IL_0046: dup + IL_0047: ldc.i4.4 + IL_0048: ldc.r8 4.0999999999999996 + IL_0051: stelem [runtime]System.Double + IL_0056: dup + IL_0057: ldc.i4.5 + IL_0058: ldc.r8 5.9000000000000004 + IL_0061: stelem [runtime]System.Double + IL_0066: stloc.0 + IL_0067: ldloc.0 + IL_0068: ldc.i4.0 + IL_0069: ldelema [runtime]System.Double + IL_006e: stloc.2 + IL_006f: ldloc.2 + IL_0070: conv.i + IL_0071: stloc.1 + IL_0072: ldloc.1 + IL_0073: stloc.3 + IL_0074: ldc.i4.0 + IL_0075: stloc.s V_4 + IL_0077: ldloc.3 + IL_0078: ldloc.s V_4 + IL_007a: conv.i + IL_007b: sizeof [runtime]System.Double + IL_0081: mul + IL_0082: add + IL_0083: ldobj [runtime]System.Double + IL_0088: ldloc.1 + IL_0089: stloc.s V_5 + IL_008b: ldc.i4.1 + IL_008c: stloc.s V_6 + IL_008e: ldloc.s V_5 + IL_0090: ldloc.s V_6 + IL_0092: conv.i + IL_0093: sizeof [runtime]System.Double + IL_0099: mul + IL_009a: add + IL_009b: ldobj [runtime]System.Double + IL_00a0: add + IL_00a1: ret + } + + .method public static class [runtime]System.Tuple`2 + pinString() cil managed + { + + .maxstack 6 + .locals init (string V_0, + native int V_1, + string pinned V_2, + native int V_3, + int32 V_4, + native int V_5, + int32 V_6) + IL_0000: ldstr "Hello World" + IL_0005: stloc.0 + IL_0006: ldloc.0 + IL_0007: stloc.2 + IL_0008: ldloc.2 + IL_0009: brfalse.s IL_0016 + + IL_000b: ldloc.2 + IL_000c: conv.i + IL_000d: call int32 [runtime]System.Runtime.CompilerServices.RuntimeHelpers::get_OffsetToStringData() + IL_0012: add + IL_0013: nop + IL_0014: br.s IL_0018 + + IL_0016: ldloc.2 + IL_0017: nop + IL_0018: stloc.1 + IL_0019: ldloc.1 + IL_001a: stloc.3 + IL_001b: ldc.i4.0 + IL_001c: stloc.s V_4 + IL_001e: ldloc.3 + IL_001f: ldloc.s V_4 + IL_0021: conv.i + IL_0022: sizeof [runtime]System.Char + IL_0028: mul + IL_0029: add + IL_002a: ldobj [runtime]System.Char + IL_002f: ldloc.1 + IL_0030: stloc.s V_5 + IL_0032: ldc.i4.1 + IL_0033: stloc.s V_6 + IL_0035: ldloc.s V_5 + IL_0037: ldloc.s V_6 + IL_0039: conv.i + IL_003a: sizeof [runtime]System.Char + IL_0040: mul + IL_0041: add + IL_0042: ldobj [runtime]System.Char + IL_0047: newobj instance void class [runtime]System.Tuple`2::.ctor(!0, + !1) + IL_004c: 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 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__ = int32(0x00000000) + .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 +{ + .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 private hidebysig specialname instance void + set_Type(class [runtime]System.Type 'value') 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: ldarg.1 + IL_0002: stfld class [runtime]System.Type System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::Type@ + IL_0007: 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 + } + + .method private hidebysig specialname instance void + set_MemberType(valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes 'value') 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: ldarg.1 + IL_0002: stfld valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::MemberType@ + IL_0007: 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 ) + .set instance void System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::set_MemberType(valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes) + .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 ) + .set instance void System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::set_Type(class [runtime]System.Type) + .get instance class [runtime]System.Type System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::get_Type() + } +} + + + + + + diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction24.fs.il.debug.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction24.fs.il.netcore.debug.bsl similarity index 98% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction24.fs.il.debug.bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction24.fs.il.netcore.debug.bsl index f907620104a..0d1379d849b 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction24.fs.il.debug.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction24.fs.il.netcore.debug.bsl @@ -112,6 +112,9 @@ instance void .ctor(int32 x, int32 y) cil managed { + .custom instance void [runtime]System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::.ctor(valuetype [runtime]System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes, + class [runtime]System.Type) = ( 01 00 60 06 00 00 14 54 65 73 74 46 75 6E 63 74 + 69 6F 6E 32 34 2B 50 6F 69 6E 74 00 00 ) .maxstack 8 IL_0000: ldarg.0 diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction24.fs.il.release.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction24.fs.il.netcore.release.bsl similarity index 96% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction24.fs.il.release.bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction24.fs.il.netcore.release.bsl index 00c889ed8b9..b020e9a3266 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction24.fs.il.release.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction24.fs.il.netcore.release.bsl @@ -1,827 +1,830 @@ - - - - - -.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 -} -.mresource public FSharpSignatureData.assembly -{ - - -} -.mresource public FSharpOptimizationData.assembly -{ - - -} -.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 auto ansi serializable sealed nested public Point - 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 [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 02 00 00 00 00 00 ) - .field public int32 x@ - .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.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 ) - .field public int32 y@ - .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.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 ) - .method public hidebysig specialname - instance int32 get_x() 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/Point::x@ - IL_0006: ret - } - - .method public hidebysig specialname - instance int32 get_y() 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/Point::y@ - IL_0006: ret - } - - .method public hidebysig specialname - instance void set_x(int32 'value') 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: ldarg.1 - IL_0002: stfld int32 assembly/Point::x@ - IL_0007: ret - } - - .method public hidebysig specialname - instance void set_y(int32 'value') 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: ldarg.1 - IL_0002: stfld int32 assembly/Point::y@ - IL_0007: ret - } - - .method public specialname rtspecialname - instance void .ctor(int32 x, - int32 y) cil managed - { - - .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/Point::x@ - IL_000d: ldarg.0 - IL_000e: ldarg.2 - IL_000f: stfld int32 assembly/Point::y@ - IL_0014: 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/Point>::.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/Point 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, - int32 V_2, - int32 V_3, - class [runtime]System.Collections.IComparer V_4, - int32 V_5, - int32 V_6) - IL_0000: ldarg.0 - IL_0001: brfalse.s IL_0057 - - IL_0003: ldarg.1 - IL_0004: brfalse.s IL_0055 - - IL_0006: call class [runtime]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() - IL_000b: stloc.1 - IL_000c: ldarg.0 - IL_000d: ldfld int32 assembly/Point::x@ - IL_0012: stloc.2 - IL_0013: ldarg.1 - IL_0014: ldfld int32 assembly/Point::x@ - IL_0019: stloc.3 - IL_001a: ldloc.2 - IL_001b: ldloc.3 - IL_001c: cgt - IL_001e: ldloc.2 - IL_001f: ldloc.3 - IL_0020: clt - IL_0022: sub - IL_0023: stloc.0 - IL_0024: ldloc.0 - IL_0025: ldc.i4.0 - IL_0026: bge.s IL_002a - - IL_0028: ldloc.0 - IL_0029: ret - - IL_002a: ldloc.0 - IL_002b: ldc.i4.0 - IL_002c: ble.s IL_0030 - - IL_002e: ldloc.0 - IL_002f: ret - - IL_0030: call class [runtime]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() - IL_0035: stloc.s V_4 - IL_0037: ldarg.0 - IL_0038: ldfld int32 assembly/Point::y@ - IL_003d: stloc.s V_5 - IL_003f: ldarg.1 - IL_0040: ldfld int32 assembly/Point::y@ - IL_0045: stloc.s V_6 - IL_0047: ldloc.s V_5 - IL_0049: ldloc.s V_6 - IL_004b: cgt - IL_004d: ldloc.s V_5 - IL_004f: ldloc.s V_6 - IL_0051: clt - IL_0053: sub - IL_0054: ret - - IL_0055: ldc.i4.1 - IL_0056: ret - - IL_0057: ldarg.1 - IL_0058: brfalse.s IL_005c - - IL_005a: ldc.i4.m1 - IL_005b: ret - - IL_005c: ldc.i4.0 - IL_005d: 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/Point - IL_0007: callvirt instance int32 assembly/Point::CompareTo(class assembly/Point) - 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 assembly/Point V_0, - class assembly/Point V_1, - int32 V_2, - class [runtime]System.Collections.IComparer V_3, - int32 V_4, - int32 V_5, - class [runtime]System.Collections.IComparer V_6, - int32 V_7, - int32 V_8) - IL_0000: ldarg.1 - IL_0001: unbox.any assembly/Point - IL_0006: stloc.0 - IL_0007: ldloc.0 - IL_0008: stloc.1 - IL_0009: ldarg.0 - IL_000a: brfalse.s IL_0063 - - IL_000c: ldarg.1 - IL_000d: unbox.any assembly/Point - IL_0012: brfalse.s IL_0061 - - IL_0014: ldarg.2 - IL_0015: stloc.3 - IL_0016: ldarg.0 - IL_0017: ldfld int32 assembly/Point::x@ - IL_001c: stloc.s V_4 - IL_001e: ldloc.1 - IL_001f: ldfld int32 assembly/Point::x@ - IL_0024: stloc.s V_5 - IL_0026: ldloc.s V_4 - IL_0028: ldloc.s V_5 - IL_002a: cgt - IL_002c: ldloc.s V_4 - IL_002e: ldloc.s V_5 - IL_0030: clt - IL_0032: sub - IL_0033: stloc.2 - IL_0034: ldloc.2 - IL_0035: ldc.i4.0 - IL_0036: bge.s IL_003a - - IL_0038: ldloc.2 - IL_0039: ret - - IL_003a: ldloc.2 - IL_003b: ldc.i4.0 - IL_003c: ble.s IL_0040 - - IL_003e: ldloc.2 - IL_003f: ret - - IL_0040: ldarg.2 - IL_0041: stloc.s V_6 - IL_0043: ldarg.0 - IL_0044: ldfld int32 assembly/Point::y@ - IL_0049: stloc.s V_7 - IL_004b: ldloc.1 - IL_004c: ldfld int32 assembly/Point::y@ - IL_0051: stloc.s V_8 - IL_0053: ldloc.s V_7 - IL_0055: ldloc.s V_8 - IL_0057: cgt - IL_0059: ldloc.s V_7 - IL_005b: ldloc.s V_8 - IL_005d: clt - IL_005f: sub - IL_0060: ret - - IL_0061: ldc.i4.1 - IL_0062: ret - - IL_0063: ldarg.1 - IL_0064: unbox.any assembly/Point - IL_0069: brfalse.s IL_006d - - IL_006b: ldc.i4.m1 - IL_006c: ret - - IL_006d: ldc.i4.0 - IL_006e: 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 [runtime]System.Collections.IEqualityComparer V_1, - class [runtime]System.Collections.IEqualityComparer V_2) - IL_0000: ldarg.0 - IL_0001: brfalse.s IL_0035 - - IL_0003: ldc.i4.0 - IL_0004: stloc.0 - IL_0005: ldc.i4 0x9e3779b9 - IL_000a: ldarg.1 - IL_000b: stloc.1 - IL_000c: ldarg.0 - IL_000d: ldfld int32 assembly/Point::y@ - IL_0012: ldloc.0 - IL_0013: ldc.i4.6 - IL_0014: shl - IL_0015: ldloc.0 - IL_0016: ldc.i4.2 - IL_0017: shr - IL_0018: add - IL_0019: add - IL_001a: add - IL_001b: stloc.0 - IL_001c: ldc.i4 0x9e3779b9 - IL_0021: ldarg.1 - IL_0022: stloc.2 - IL_0023: ldarg.0 - IL_0024: ldfld int32 assembly/Point::x@ - IL_0029: ldloc.0 - IL_002a: ldc.i4.6 - IL_002b: shl - IL_002c: ldloc.0 - IL_002d: ldc.i4.2 - IL_002e: shr - IL_002f: add - IL_0030: add - IL_0031: add - IL_0032: stloc.0 - IL_0033: ldloc.0 - IL_0034: ret - - IL_0035: ldc.i4.0 - IL_0036: 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/Point::GetHashCode(class [runtime]System.Collections.IEqualityComparer) - IL_000b: 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 4 - .locals init (class assembly/Point V_0, - class assembly/Point V_1, - class [runtime]System.Collections.IEqualityComparer V_2, - class [runtime]System.Collections.IEqualityComparer V_3) - IL_0000: ldarg.0 - IL_0001: brfalse.s IL_0036 - - IL_0003: ldarg.1 - IL_0004: isinst assembly/Point - IL_0009: stloc.0 - IL_000a: ldloc.0 - IL_000b: brfalse.s IL_0034 - - IL_000d: ldloc.0 - IL_000e: stloc.1 - IL_000f: ldarg.2 - IL_0010: stloc.2 - IL_0011: ldarg.0 - IL_0012: ldfld int32 assembly/Point::x@ - IL_0017: ldloc.1 - IL_0018: ldfld int32 assembly/Point::x@ - IL_001d: ceq - IL_001f: brfalse.s IL_0032 - - IL_0021: ldarg.2 - IL_0022: stloc.3 - IL_0023: ldarg.0 - IL_0024: ldfld int32 assembly/Point::y@ - IL_0029: ldloc.1 - IL_002a: ldfld int32 assembly/Point::y@ - IL_002f: ceq - IL_0031: ret - - IL_0032: ldc.i4.0 - IL_0033: ret - - IL_0034: ldc.i4.0 - IL_0035: ret - - IL_0036: ldarg.1 - IL_0037: ldnull - IL_0038: cgt.un - IL_003a: ldc.i4.0 - IL_003b: ceq - IL_003d: ret - } - - .method public hidebysig virtual final - instance bool Equals(class assembly/Point 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_0027 - - IL_0003: ldarg.1 - IL_0004: brfalse.s IL_0025 - - IL_0006: ldarg.0 - IL_0007: ldfld int32 assembly/Point::x@ - IL_000c: ldarg.1 - IL_000d: ldfld int32 assembly/Point::x@ - IL_0012: bne.un.s IL_0023 - - IL_0014: ldarg.0 - IL_0015: ldfld int32 assembly/Point::y@ - IL_001a: ldarg.1 - IL_001b: ldfld int32 assembly/Point::y@ - IL_0020: ceq - IL_0022: ret - - IL_0023: ldc.i4.0 - IL_0024: ret - - IL_0025: ldc.i4.0 - IL_0026: ret - - IL_0027: ldarg.1 - IL_0028: ldnull - IL_0029: cgt.un - IL_002b: ldc.i4.0 - IL_002c: ceq - IL_002e: 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/Point V_0) - IL_0000: ldarg.1 - IL_0001: isinst assembly/Point - 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/Point::Equals(class assembly/Point) - IL_0011: ret - - IL_0012: ldc.i4.0 - IL_0013: ret - } - - .property instance int32 x() - { - .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags, - int32) = ( 01 00 04 00 00 00 00 00 00 00 00 00 ) - .set instance void assembly/Point::set_x(int32) - .get instance int32 assembly/Point::get_x() - } - .property instance int32 y() - { - .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags, - int32) = ( 01 00 04 00 00 00 01 00 00 00 00 00 ) - .set instance void assembly/Point::set_y(int32) - .get instance int32 assembly/Point::get_y() - } - } - - .method public static int32 pinObject() cil managed - { - - .maxstack 6 - .locals init (class assembly/Point V_0, - native int V_1, - int32& pinned V_2, - native int V_3, - int32 V_4, - native int V_5, - int32 V_6) - IL_0000: ldc.i4.1 - IL_0001: ldc.i4.2 - IL_0002: newobj instance void assembly/Point::.ctor(int32, - int32) - IL_0007: stloc.0 - IL_0008: ldloc.0 - IL_0009: ldflda int32 assembly/Point::x@ - IL_000e: stloc.2 - IL_000f: ldloc.2 - IL_0010: conv.i - IL_0011: stloc.1 - IL_0012: ldloc.1 - IL_0013: stloc.3 - IL_0014: ldc.i4.0 - IL_0015: stloc.s V_4 - IL_0017: ldloc.3 - IL_0018: ldloc.s V_4 - IL_001a: conv.i - IL_001b: sizeof [runtime]System.Int32 - IL_0021: mul - IL_0022: add - IL_0023: ldobj [runtime]System.Int32 - IL_0028: ldloc.1 - IL_0029: stloc.s V_5 - IL_002b: ldc.i4.1 - IL_002c: stloc.s V_6 - IL_002e: ldloc.s V_5 - IL_0030: ldloc.s V_6 - IL_0032: conv.i - IL_0033: sizeof [runtime]System.Int32 - IL_0039: mul - IL_003a: add - IL_003b: ldobj [runtime]System.Int32 - IL_0040: add - IL_0041: ret - } - - .method public static int32 pinRef() cil managed - { - - .maxstack 4 - .locals init (class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 V_0, - native int V_1, - int32& pinned V_2) - IL_0000: ldc.i4.s 17 - IL_0002: call class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 [FSharp.Core]Microsoft.FSharp.Core.Operators::Ref(!!0) - IL_0007: stloc.0 - IL_0008: ldloc.0 - IL_0009: ldflda !0 class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1::contents@ - IL_000e: stloc.2 - IL_000f: ldloc.2 - IL_0010: conv.i - IL_0011: stloc.1 - IL_0012: ldloc.1 - IL_0013: ldobj [runtime]System.Int32 - IL_0018: ldloc.1 - IL_0019: ldobj [runtime]System.Int32 - IL_001e: add - IL_001f: ret - } - - .method public static float64 pinArray1() cil managed - { - - .maxstack 6 - .locals init (float64[] V_0, - native int V_1, - float64[] V_2, - float64& pinned V_3, - native int V_4, - int32 V_5, - native int V_6, - int32 V_7) - IL_0000: ldc.i4.6 - IL_0001: newarr [runtime]System.Double - IL_0006: dup - IL_0007: ldc.i4.0 - IL_0008: ldc.r8 0.0 - IL_0011: stelem [runtime]System.Double - IL_0016: dup - IL_0017: ldc.i4.1 - IL_0018: ldc.r8 1.5 - IL_0021: stelem [runtime]System.Double - IL_0026: dup - IL_0027: ldc.i4.2 - IL_0028: ldc.r8 2.2999999999999998 - IL_0031: stelem [runtime]System.Double - IL_0036: dup - IL_0037: ldc.i4.3 - IL_0038: ldc.r8 3.3999999999999999 - IL_0041: stelem [runtime]System.Double - IL_0046: dup - IL_0047: ldc.i4.4 - IL_0048: ldc.r8 4.0999999999999996 - IL_0051: stelem [runtime]System.Double - IL_0056: dup - IL_0057: ldc.i4.5 - IL_0058: ldc.r8 5.9000000000000004 - IL_0061: stelem [runtime]System.Double - IL_0066: stloc.0 - IL_0067: ldloc.0 - IL_0068: stloc.2 - IL_0069: ldloc.2 - IL_006a: brfalse.s IL_0086 - - IL_006c: ldloc.2 - IL_006d: call int32 [FSharp.Core]Microsoft.FSharp.Collections.ArrayModule::Length(!!0[]) - IL_0072: brfalse.s IL_0081 - - IL_0074: ldloc.2 - IL_0075: ldc.i4.0 - IL_0076: ldelema [runtime]System.Double - IL_007b: stloc.3 - IL_007c: ldloc.3 - IL_007d: conv.i - IL_007e: nop - IL_007f: br.s IL_0089 - - IL_0081: ldc.i4.0 - IL_0082: conv.i - IL_0083: nop - IL_0084: br.s IL_0089 - - IL_0086: ldc.i4.0 - IL_0087: conv.i - IL_0088: nop - IL_0089: stloc.1 - IL_008a: ldloc.1 - IL_008b: stloc.s V_4 - IL_008d: ldc.i4.0 - IL_008e: stloc.s V_5 - IL_0090: ldloc.s V_4 - IL_0092: ldloc.s V_5 - IL_0094: conv.i - IL_0095: sizeof [runtime]System.Double - IL_009b: mul - IL_009c: add - IL_009d: ldobj [runtime]System.Double - IL_00a2: ldloc.1 - IL_00a3: stloc.s V_6 - IL_00a5: ldc.i4.1 - IL_00a6: stloc.s V_7 - IL_00a8: ldloc.s V_6 - IL_00aa: ldloc.s V_7 - IL_00ac: conv.i - IL_00ad: sizeof [runtime]System.Double - IL_00b3: mul - IL_00b4: add - IL_00b5: ldobj [runtime]System.Double - IL_00ba: add - IL_00bb: ret - } - - .method public static float64 pinArray2() cil managed - { - - .maxstack 6 - .locals init (float64[] V_0, - native int V_1, - float64& pinned V_2, - native int V_3, - int32 V_4, - native int V_5, - int32 V_6) - IL_0000: ldc.i4.6 - IL_0001: newarr [runtime]System.Double - IL_0006: dup - IL_0007: ldc.i4.0 - IL_0008: ldc.r8 0.0 - IL_0011: stelem [runtime]System.Double - IL_0016: dup - IL_0017: ldc.i4.1 - IL_0018: ldc.r8 1.5 - IL_0021: stelem [runtime]System.Double - IL_0026: dup - IL_0027: ldc.i4.2 - IL_0028: ldc.r8 2.2999999999999998 - IL_0031: stelem [runtime]System.Double - IL_0036: dup - IL_0037: ldc.i4.3 - IL_0038: ldc.r8 3.3999999999999999 - IL_0041: stelem [runtime]System.Double - IL_0046: dup - IL_0047: ldc.i4.4 - IL_0048: ldc.r8 4.0999999999999996 - IL_0051: stelem [runtime]System.Double - IL_0056: dup - IL_0057: ldc.i4.5 - IL_0058: ldc.r8 5.9000000000000004 - IL_0061: stelem [runtime]System.Double - IL_0066: stloc.0 - IL_0067: ldloc.0 - IL_0068: ldc.i4.0 - IL_0069: ldelema [runtime]System.Double - IL_006e: stloc.2 - IL_006f: ldloc.2 - IL_0070: conv.i - IL_0071: stloc.1 - IL_0072: ldloc.1 - IL_0073: stloc.3 - IL_0074: ldc.i4.0 - IL_0075: stloc.s V_4 - IL_0077: ldloc.3 - IL_0078: ldloc.s V_4 - IL_007a: conv.i - IL_007b: sizeof [runtime]System.Double - IL_0081: mul - IL_0082: add - IL_0083: ldobj [runtime]System.Double - IL_0088: ldloc.1 - IL_0089: stloc.s V_5 - IL_008b: ldc.i4.1 - IL_008c: stloc.s V_6 - IL_008e: ldloc.s V_5 - IL_0090: ldloc.s V_6 - IL_0092: conv.i - IL_0093: sizeof [runtime]System.Double - IL_0099: mul - IL_009a: add - IL_009b: ldobj [runtime]System.Double - IL_00a0: add - IL_00a1: ret - } - - .method public static class [runtime]System.Tuple`2 - pinString() cil managed - { - - .maxstack 6 - .locals init (string V_0, - native int V_1, - string pinned V_2, - native int V_3, - int32 V_4, - native int V_5, - int32 V_6) - IL_0000: ldstr "Hello World" - IL_0005: stloc.0 - IL_0006: ldloc.0 - IL_0007: stloc.2 - IL_0008: ldloc.2 - IL_0009: brfalse.s IL_0016 - - IL_000b: ldloc.2 - IL_000c: conv.i - IL_000d: call int32 [runtime]System.Runtime.CompilerServices.RuntimeHelpers::get_OffsetToStringData() - IL_0012: add - IL_0013: nop - IL_0014: br.s IL_0018 - - IL_0016: ldloc.2 - IL_0017: nop - IL_0018: stloc.1 - IL_0019: ldloc.1 - IL_001a: stloc.3 - IL_001b: ldc.i4.0 - IL_001c: stloc.s V_4 - IL_001e: ldloc.3 - IL_001f: ldloc.s V_4 - IL_0021: conv.i - IL_0022: sizeof [runtime]System.Char - IL_0028: mul - IL_0029: add - IL_002a: ldobj [runtime]System.Char - IL_002f: ldloc.1 - IL_0030: stloc.s V_5 - IL_0032: ldc.i4.1 - IL_0033: stloc.s V_6 - IL_0035: ldloc.s V_5 - IL_0037: ldloc.s V_6 - IL_0039: conv.i - IL_003a: sizeof [runtime]System.Char - IL_0040: mul - IL_0041: add - IL_0042: ldobj [runtime]System.Char - IL_0047: newobj instance void class [runtime]System.Tuple`2::.ctor(!0, - !1) - IL_004c: 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 - } - -} - - - - - - + + + + + +.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 +} +.mresource public FSharpSignatureData.assembly +{ + + +} +.mresource public FSharpOptimizationData.assembly +{ + + +} +.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 auto ansi serializable sealed nested public Point + 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 [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 02 00 00 00 00 00 ) + .field public int32 x@ + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.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 ) + .field public int32 y@ + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.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 ) + .method public hidebysig specialname + instance int32 get_x() 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/Point::x@ + IL_0006: ret + } + + .method public hidebysig specialname + instance int32 get_y() 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/Point::y@ + IL_0006: ret + } + + .method public hidebysig specialname + instance void set_x(int32 'value') 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: ldarg.1 + IL_0002: stfld int32 assembly/Point::x@ + IL_0007: ret + } + + .method public hidebysig specialname + instance void set_y(int32 'value') 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: ldarg.1 + IL_0002: stfld int32 assembly/Point::y@ + IL_0007: ret + } + + .method public specialname rtspecialname + instance void .ctor(int32 x, + int32 y) cil managed + { + .custom instance void [runtime]System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::.ctor(valuetype [runtime]System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes, + class [runtime]System.Type) = ( 01 00 60 06 00 00 14 54 65 73 74 46 75 6E 63 74 + 69 6F 6E 32 34 2B 50 6F 69 6E 74 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/Point::x@ + IL_000d: ldarg.0 + IL_000e: ldarg.2 + IL_000f: stfld int32 assembly/Point::y@ + IL_0014: 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/Point>::.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/Point 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, + int32 V_2, + int32 V_3, + class [runtime]System.Collections.IComparer V_4, + int32 V_5, + int32 V_6) + IL_0000: ldarg.0 + IL_0001: brfalse.s IL_0057 + + IL_0003: ldarg.1 + IL_0004: brfalse.s IL_0055 + + IL_0006: call class [runtime]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() + IL_000b: stloc.1 + IL_000c: ldarg.0 + IL_000d: ldfld int32 assembly/Point::x@ + IL_0012: stloc.2 + IL_0013: ldarg.1 + IL_0014: ldfld int32 assembly/Point::x@ + IL_0019: stloc.3 + IL_001a: ldloc.2 + IL_001b: ldloc.3 + IL_001c: cgt + IL_001e: ldloc.2 + IL_001f: ldloc.3 + IL_0020: clt + IL_0022: sub + IL_0023: stloc.0 + IL_0024: ldloc.0 + IL_0025: ldc.i4.0 + IL_0026: bge.s IL_002a + + IL_0028: ldloc.0 + IL_0029: ret + + IL_002a: ldloc.0 + IL_002b: ldc.i4.0 + IL_002c: ble.s IL_0030 + + IL_002e: ldloc.0 + IL_002f: ret + + IL_0030: call class [runtime]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() + IL_0035: stloc.s V_4 + IL_0037: ldarg.0 + IL_0038: ldfld int32 assembly/Point::y@ + IL_003d: stloc.s V_5 + IL_003f: ldarg.1 + IL_0040: ldfld int32 assembly/Point::y@ + IL_0045: stloc.s V_6 + IL_0047: ldloc.s V_5 + IL_0049: ldloc.s V_6 + IL_004b: cgt + IL_004d: ldloc.s V_5 + IL_004f: ldloc.s V_6 + IL_0051: clt + IL_0053: sub + IL_0054: ret + + IL_0055: ldc.i4.1 + IL_0056: ret + + IL_0057: ldarg.1 + IL_0058: brfalse.s IL_005c + + IL_005a: ldc.i4.m1 + IL_005b: ret + + IL_005c: ldc.i4.0 + IL_005d: 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/Point + IL_0007: callvirt instance int32 assembly/Point::CompareTo(class assembly/Point) + 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 assembly/Point V_0, + class assembly/Point V_1, + int32 V_2, + class [runtime]System.Collections.IComparer V_3, + int32 V_4, + int32 V_5, + class [runtime]System.Collections.IComparer V_6, + int32 V_7, + int32 V_8) + IL_0000: ldarg.1 + IL_0001: unbox.any assembly/Point + IL_0006: stloc.0 + IL_0007: ldloc.0 + IL_0008: stloc.1 + IL_0009: ldarg.0 + IL_000a: brfalse.s IL_0063 + + IL_000c: ldarg.1 + IL_000d: unbox.any assembly/Point + IL_0012: brfalse.s IL_0061 + + IL_0014: ldarg.2 + IL_0015: stloc.3 + IL_0016: ldarg.0 + IL_0017: ldfld int32 assembly/Point::x@ + IL_001c: stloc.s V_4 + IL_001e: ldloc.1 + IL_001f: ldfld int32 assembly/Point::x@ + IL_0024: stloc.s V_5 + IL_0026: ldloc.s V_4 + IL_0028: ldloc.s V_5 + IL_002a: cgt + IL_002c: ldloc.s V_4 + IL_002e: ldloc.s V_5 + IL_0030: clt + IL_0032: sub + IL_0033: stloc.2 + IL_0034: ldloc.2 + IL_0035: ldc.i4.0 + IL_0036: bge.s IL_003a + + IL_0038: ldloc.2 + IL_0039: ret + + IL_003a: ldloc.2 + IL_003b: ldc.i4.0 + IL_003c: ble.s IL_0040 + + IL_003e: ldloc.2 + IL_003f: ret + + IL_0040: ldarg.2 + IL_0041: stloc.s V_6 + IL_0043: ldarg.0 + IL_0044: ldfld int32 assembly/Point::y@ + IL_0049: stloc.s V_7 + IL_004b: ldloc.1 + IL_004c: ldfld int32 assembly/Point::y@ + IL_0051: stloc.s V_8 + IL_0053: ldloc.s V_7 + IL_0055: ldloc.s V_8 + IL_0057: cgt + IL_0059: ldloc.s V_7 + IL_005b: ldloc.s V_8 + IL_005d: clt + IL_005f: sub + IL_0060: ret + + IL_0061: ldc.i4.1 + IL_0062: ret + + IL_0063: ldarg.1 + IL_0064: unbox.any assembly/Point + IL_0069: brfalse.s IL_006d + + IL_006b: ldc.i4.m1 + IL_006c: ret + + IL_006d: ldc.i4.0 + IL_006e: 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 [runtime]System.Collections.IEqualityComparer V_1, + class [runtime]System.Collections.IEqualityComparer V_2) + IL_0000: ldarg.0 + IL_0001: brfalse.s IL_0035 + + IL_0003: ldc.i4.0 + IL_0004: stloc.0 + IL_0005: ldc.i4 0x9e3779b9 + IL_000a: ldarg.1 + IL_000b: stloc.1 + IL_000c: ldarg.0 + IL_000d: ldfld int32 assembly/Point::y@ + IL_0012: ldloc.0 + IL_0013: ldc.i4.6 + IL_0014: shl + IL_0015: ldloc.0 + IL_0016: ldc.i4.2 + IL_0017: shr + IL_0018: add + IL_0019: add + IL_001a: add + IL_001b: stloc.0 + IL_001c: ldc.i4 0x9e3779b9 + IL_0021: ldarg.1 + IL_0022: stloc.2 + IL_0023: ldarg.0 + IL_0024: ldfld int32 assembly/Point::x@ + IL_0029: ldloc.0 + IL_002a: ldc.i4.6 + IL_002b: shl + IL_002c: ldloc.0 + IL_002d: ldc.i4.2 + IL_002e: shr + IL_002f: add + IL_0030: add + IL_0031: add + IL_0032: stloc.0 + IL_0033: ldloc.0 + IL_0034: ret + + IL_0035: ldc.i4.0 + IL_0036: 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/Point::GetHashCode(class [runtime]System.Collections.IEqualityComparer) + IL_000b: 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 4 + .locals init (class assembly/Point V_0, + class assembly/Point V_1, + class [runtime]System.Collections.IEqualityComparer V_2, + class [runtime]System.Collections.IEqualityComparer V_3) + IL_0000: ldarg.0 + IL_0001: brfalse.s IL_0036 + + IL_0003: ldarg.1 + IL_0004: isinst assembly/Point + IL_0009: stloc.0 + IL_000a: ldloc.0 + IL_000b: brfalse.s IL_0034 + + IL_000d: ldloc.0 + IL_000e: stloc.1 + IL_000f: ldarg.2 + IL_0010: stloc.2 + IL_0011: ldarg.0 + IL_0012: ldfld int32 assembly/Point::x@ + IL_0017: ldloc.1 + IL_0018: ldfld int32 assembly/Point::x@ + IL_001d: ceq + IL_001f: brfalse.s IL_0032 + + IL_0021: ldarg.2 + IL_0022: stloc.3 + IL_0023: ldarg.0 + IL_0024: ldfld int32 assembly/Point::y@ + IL_0029: ldloc.1 + IL_002a: ldfld int32 assembly/Point::y@ + IL_002f: ceq + IL_0031: ret + + IL_0032: ldc.i4.0 + IL_0033: ret + + IL_0034: ldc.i4.0 + IL_0035: ret + + IL_0036: ldarg.1 + IL_0037: ldnull + IL_0038: cgt.un + IL_003a: ldc.i4.0 + IL_003b: ceq + IL_003d: ret + } + + .method public hidebysig virtual final + instance bool Equals(class assembly/Point 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_0027 + + IL_0003: ldarg.1 + IL_0004: brfalse.s IL_0025 + + IL_0006: ldarg.0 + IL_0007: ldfld int32 assembly/Point::x@ + IL_000c: ldarg.1 + IL_000d: ldfld int32 assembly/Point::x@ + IL_0012: bne.un.s IL_0023 + + IL_0014: ldarg.0 + IL_0015: ldfld int32 assembly/Point::y@ + IL_001a: ldarg.1 + IL_001b: ldfld int32 assembly/Point::y@ + IL_0020: ceq + IL_0022: ret + + IL_0023: ldc.i4.0 + IL_0024: ret + + IL_0025: ldc.i4.0 + IL_0026: ret + + IL_0027: ldarg.1 + IL_0028: ldnull + IL_0029: cgt.un + IL_002b: ldc.i4.0 + IL_002c: ceq + IL_002e: 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/Point V_0) + IL_0000: ldarg.1 + IL_0001: isinst assembly/Point + 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/Point::Equals(class assembly/Point) + IL_0011: ret + + IL_0012: ldc.i4.0 + IL_0013: ret + } + + .property instance int32 x() + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags, + int32) = ( 01 00 04 00 00 00 00 00 00 00 00 00 ) + .set instance void assembly/Point::set_x(int32) + .get instance int32 assembly/Point::get_x() + } + .property instance int32 y() + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags, + int32) = ( 01 00 04 00 00 00 01 00 00 00 00 00 ) + .set instance void assembly/Point::set_y(int32) + .get instance int32 assembly/Point::get_y() + } + } + + .method public static int32 pinObject() cil managed + { + + .maxstack 6 + .locals init (class assembly/Point V_0, + native int V_1, + int32& pinned V_2, + native int V_3, + int32 V_4, + native int V_5, + int32 V_6) + IL_0000: ldc.i4.1 + IL_0001: ldc.i4.2 + IL_0002: newobj instance void assembly/Point::.ctor(int32, + int32) + IL_0007: stloc.0 + IL_0008: ldloc.0 + IL_0009: ldflda int32 assembly/Point::x@ + IL_000e: stloc.2 + IL_000f: ldloc.2 + IL_0010: conv.i + IL_0011: stloc.1 + IL_0012: ldloc.1 + IL_0013: stloc.3 + IL_0014: ldc.i4.0 + IL_0015: stloc.s V_4 + IL_0017: ldloc.3 + IL_0018: ldloc.s V_4 + IL_001a: conv.i + IL_001b: sizeof [runtime]System.Int32 + IL_0021: mul + IL_0022: add + IL_0023: ldobj [runtime]System.Int32 + IL_0028: ldloc.1 + IL_0029: stloc.s V_5 + IL_002b: ldc.i4.1 + IL_002c: stloc.s V_6 + IL_002e: ldloc.s V_5 + IL_0030: ldloc.s V_6 + IL_0032: conv.i + IL_0033: sizeof [runtime]System.Int32 + IL_0039: mul + IL_003a: add + IL_003b: ldobj [runtime]System.Int32 + IL_0040: add + IL_0041: ret + } + + .method public static int32 pinRef() cil managed + { + + .maxstack 4 + .locals init (class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 V_0, + native int V_1, + int32& pinned V_2) + IL_0000: ldc.i4.s 17 + IL_0002: call class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 [FSharp.Core]Microsoft.FSharp.Core.Operators::Ref(!!0) + IL_0007: stloc.0 + IL_0008: ldloc.0 + IL_0009: ldflda !0 class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1::contents@ + IL_000e: stloc.2 + IL_000f: ldloc.2 + IL_0010: conv.i + IL_0011: stloc.1 + IL_0012: ldloc.1 + IL_0013: ldobj [runtime]System.Int32 + IL_0018: ldloc.1 + IL_0019: ldobj [runtime]System.Int32 + IL_001e: add + IL_001f: ret + } + + .method public static float64 pinArray1() cil managed + { + + .maxstack 6 + .locals init (float64[] V_0, + native int V_1, + float64[] V_2, + float64& pinned V_3, + native int V_4, + int32 V_5, + native int V_6, + int32 V_7) + IL_0000: ldc.i4.6 + IL_0001: newarr [runtime]System.Double + IL_0006: dup + IL_0007: ldc.i4.0 + IL_0008: ldc.r8 0.0 + IL_0011: stelem [runtime]System.Double + IL_0016: dup + IL_0017: ldc.i4.1 + IL_0018: ldc.r8 1.5 + IL_0021: stelem [runtime]System.Double + IL_0026: dup + IL_0027: ldc.i4.2 + IL_0028: ldc.r8 2.2999999999999998 + IL_0031: stelem [runtime]System.Double + IL_0036: dup + IL_0037: ldc.i4.3 + IL_0038: ldc.r8 3.3999999999999999 + IL_0041: stelem [runtime]System.Double + IL_0046: dup + IL_0047: ldc.i4.4 + IL_0048: ldc.r8 4.0999999999999996 + IL_0051: stelem [runtime]System.Double + IL_0056: dup + IL_0057: ldc.i4.5 + IL_0058: ldc.r8 5.9000000000000004 + IL_0061: stelem [runtime]System.Double + IL_0066: stloc.0 + IL_0067: ldloc.0 + IL_0068: stloc.2 + IL_0069: ldloc.2 + IL_006a: brfalse.s IL_0086 + + IL_006c: ldloc.2 + IL_006d: call int32 [FSharp.Core]Microsoft.FSharp.Collections.ArrayModule::Length(!!0[]) + IL_0072: brfalse.s IL_0081 + + IL_0074: ldloc.2 + IL_0075: ldc.i4.0 + IL_0076: ldelema [runtime]System.Double + IL_007b: stloc.3 + IL_007c: ldloc.3 + IL_007d: conv.i + IL_007e: nop + IL_007f: br.s IL_0089 + + IL_0081: ldc.i4.0 + IL_0082: conv.i + IL_0083: nop + IL_0084: br.s IL_0089 + + IL_0086: ldc.i4.0 + IL_0087: conv.i + IL_0088: nop + IL_0089: stloc.1 + IL_008a: ldloc.1 + IL_008b: stloc.s V_4 + IL_008d: ldc.i4.0 + IL_008e: stloc.s V_5 + IL_0090: ldloc.s V_4 + IL_0092: ldloc.s V_5 + IL_0094: conv.i + IL_0095: sizeof [runtime]System.Double + IL_009b: mul + IL_009c: add + IL_009d: ldobj [runtime]System.Double + IL_00a2: ldloc.1 + IL_00a3: stloc.s V_6 + IL_00a5: ldc.i4.1 + IL_00a6: stloc.s V_7 + IL_00a8: ldloc.s V_6 + IL_00aa: ldloc.s V_7 + IL_00ac: conv.i + IL_00ad: sizeof [runtime]System.Double + IL_00b3: mul + IL_00b4: add + IL_00b5: ldobj [runtime]System.Double + IL_00ba: add + IL_00bb: ret + } + + .method public static float64 pinArray2() cil managed + { + + .maxstack 6 + .locals init (float64[] V_0, + native int V_1, + float64& pinned V_2, + native int V_3, + int32 V_4, + native int V_5, + int32 V_6) + IL_0000: ldc.i4.6 + IL_0001: newarr [runtime]System.Double + IL_0006: dup + IL_0007: ldc.i4.0 + IL_0008: ldc.r8 0.0 + IL_0011: stelem [runtime]System.Double + IL_0016: dup + IL_0017: ldc.i4.1 + IL_0018: ldc.r8 1.5 + IL_0021: stelem [runtime]System.Double + IL_0026: dup + IL_0027: ldc.i4.2 + IL_0028: ldc.r8 2.2999999999999998 + IL_0031: stelem [runtime]System.Double + IL_0036: dup + IL_0037: ldc.i4.3 + IL_0038: ldc.r8 3.3999999999999999 + IL_0041: stelem [runtime]System.Double + IL_0046: dup + IL_0047: ldc.i4.4 + IL_0048: ldc.r8 4.0999999999999996 + IL_0051: stelem [runtime]System.Double + IL_0056: dup + IL_0057: ldc.i4.5 + IL_0058: ldc.r8 5.9000000000000004 + IL_0061: stelem [runtime]System.Double + IL_0066: stloc.0 + IL_0067: ldloc.0 + IL_0068: ldc.i4.0 + IL_0069: ldelema [runtime]System.Double + IL_006e: stloc.2 + IL_006f: ldloc.2 + IL_0070: conv.i + IL_0071: stloc.1 + IL_0072: ldloc.1 + IL_0073: stloc.3 + IL_0074: ldc.i4.0 + IL_0075: stloc.s V_4 + IL_0077: ldloc.3 + IL_0078: ldloc.s V_4 + IL_007a: conv.i + IL_007b: sizeof [runtime]System.Double + IL_0081: mul + IL_0082: add + IL_0083: ldobj [runtime]System.Double + IL_0088: ldloc.1 + IL_0089: stloc.s V_5 + IL_008b: ldc.i4.1 + IL_008c: stloc.s V_6 + IL_008e: ldloc.s V_5 + IL_0090: ldloc.s V_6 + IL_0092: conv.i + IL_0093: sizeof [runtime]System.Double + IL_0099: mul + IL_009a: add + IL_009b: ldobj [runtime]System.Double + IL_00a0: add + IL_00a1: ret + } + + .method public static class [runtime]System.Tuple`2 + pinString() cil managed + { + + .maxstack 6 + .locals init (string V_0, + native int V_1, + string pinned V_2, + native int V_3, + int32 V_4, + native int V_5, + int32 V_6) + IL_0000: ldstr "Hello World" + IL_0005: stloc.0 + IL_0006: ldloc.0 + IL_0007: stloc.2 + IL_0008: ldloc.2 + IL_0009: brfalse.s IL_0016 + + IL_000b: ldloc.2 + IL_000c: conv.i + IL_000d: call int32 [runtime]System.Runtime.CompilerServices.RuntimeHelpers::get_OffsetToStringData() + IL_0012: add + IL_0013: nop + IL_0014: br.s IL_0018 + + IL_0016: ldloc.2 + IL_0017: nop + IL_0018: stloc.1 + IL_0019: ldloc.1 + IL_001a: stloc.3 + IL_001b: ldc.i4.0 + IL_001c: stloc.s V_4 + IL_001e: ldloc.3 + IL_001f: ldloc.s V_4 + IL_0021: conv.i + IL_0022: sizeof [runtime]System.Char + IL_0028: mul + IL_0029: add + IL_002a: ldobj [runtime]System.Char + IL_002f: ldloc.1 + IL_0030: stloc.s V_5 + IL_0032: ldc.i4.1 + IL_0033: stloc.s V_6 + IL_0035: ldloc.s V_5 + IL_0037: ldloc.s V_6 + IL_0039: conv.i + IL_003a: sizeof [runtime]System.Char + IL_0040: mul + IL_0041: add + IL_0042: ldobj [runtime]System.Char + IL_0047: newobj instance void class [runtime]System.Tuple`2::.ctor(!0, + !1) + IL_004c: 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 + } + +} + + + + + + diff --git a/tests/fsharp/Compiler/CodeGen/EmittedIL/ReferenceAssemblyTests.fs b/tests/fsharp/Compiler/CodeGen/EmittedIL/ReferenceAssemblyTests.fs index 85ae70d25ef..6857564db00 100644 --- a/tests/fsharp/Compiler/CodeGen/EmittedIL/ReferenceAssemblyTests.fs +++ b/tests/fsharp/Compiler/CodeGen/EmittedIL/ReferenceAssemblyTests.fs @@ -178,33 +178,185 @@ module Nested = |> shouldSucceed |> verifyIL [ referenceAssemblyAttributeExpectedIL - """.class abstract auto ansi sealed nested public Nested - extends [runtime]System.Object +#if NETCOREAPP + """ .class abstract auto ansi sealed nested public Nested + 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 public Test - 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 + 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 [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 02 00 00 00 00 00 ) .method public hidebysig specialname - instance int32 get_x() cil managed + instance int32 get_x() 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: ldnull + IL_0001: throw + } + + .method public specialname rtspecialname + instance void .ctor(int32 x) cil managed + { + .custom instance void [runtime]System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::.ctor(valuetype [runtime]System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes, + class [runtime]System.Type) = ( 01 00 60 06 00 00 1D 52 65 66 65 72 65 6E 63 65 + 41 73 73 65 6D 62 6C 79 2B 4E 65 73 74 65 64 2B + 54 65 73 74 00 00 ) + + .maxstack 8 + IL_0000: ldnull + IL_0001: throw + } + + .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: ldnull + IL_0001: throw + } + + .method public hidebysig virtual final + instance int32 CompareTo(class ReferenceAssembly/Nested/Test 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 ) + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldnull + IL_0001: throw + } + + .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: ldnull + IL_0001: throw + } + + .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 8 + IL_0000: ldnull + IL_0001: throw + } + + .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 8 + IL_0000: ldnull + IL_0001: throw + } + .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: ldnull + IL_0001: throw + } + + .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 8 + IL_0000: ldnull + IL_0001: throw + } + + .method public hidebysig virtual final + instance bool Equals(class ReferenceAssembly/Nested/Test obj) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldnull + IL_0001: throw + } + + .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: ldnull + IL_0001: throw + } + + .property instance int32 x() + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags, + int32) = ( 01 00 04 00 00 00 00 00 00 00 00 00 ) + .get instance int32 ReferenceAssembly/Nested/Test::get_x() + } + } + + .method public static void test(class ReferenceAssembly/Nested/Test _x) cil managed + { + + .maxstack 8 + IL_0000: ldnull + IL_0001: throw + } + + } """ +#else + """ .class abstract auto ansi sealed nested public Nested + 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 public Test + 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 [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 02 00 00 00 00 00 ) + .method public hidebysig specialname + instance int32 get_x() 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: ldnull IL_0001: throw } .method public specialname rtspecialname - instance void .ctor(int32 x) cil managed + instance void .ctor(int32 x) 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 1D 52 65 66 65 72 65 6E 63 65 + 41 73 73 65 6D 62 6C 79 2B 4E 65 73 74 65 64 2B + 54 65 73 74 00 00 ) .maxstack 8 IL_0000: ldnull @@ -212,7 +364,7 @@ module Nested = } .method public strict virtual instance string - ToString() cil managed + ToString() cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -222,9 +374,9 @@ module Nested = } .method public hidebysig virtual final - instance int32 CompareTo(class ReferenceAssembly/Nested/Test obj) cil managed + instance int32 CompareTo(class ReferenceAssembly/Nested/Test obj) cil managed { - .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) .maxstack 8 IL_0000: ldnull @@ -232,9 +384,9 @@ module Nested = } .method public hidebysig virtual final - instance int32 CompareTo(object obj) cil managed + instance int32 CompareTo(object obj) cil managed { - .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) .maxstack 8 IL_0000: ldnull @@ -242,10 +394,10 @@ module Nested = } .method public hidebysig virtual final - instance int32 CompareTo(object obj, - class [runtime]System.Collections.IComparer comp) cil managed + 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 ) + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) .maxstack 8 IL_0000: ldnull @@ -253,9 +405,9 @@ module Nested = } .method public hidebysig virtual final - instance int32 GetHashCode(class [runtime]System.Collections.IEqualityComparer comp) cil managed + instance int32 GetHashCode(class [runtime]System.Collections.IEqualityComparer comp) cil managed { - .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) .maxstack 8 IL_0000: ldnull @@ -263,9 +415,9 @@ module Nested = } .method public hidebysig virtual final - instance int32 GetHashCode() cil managed + instance int32 GetHashCode() cil managed { - .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) .maxstack 8 IL_0000: ldnull @@ -273,10 +425,10 @@ module Nested = } .method public hidebysig virtual final - instance bool Equals(object obj, - class [runtime]System.Collections.IEqualityComparer comp) cil managed + 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 ) + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) .maxstack 8 IL_0000: ldnull @@ -284,9 +436,9 @@ module Nested = } .method public hidebysig virtual final - instance bool Equals(class ReferenceAssembly/Nested/Test obj) cil managed + instance bool Equals(class ReferenceAssembly/Nested/Test obj) cil managed { - .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) .maxstack 8 IL_0000: ldnull @@ -294,9 +446,9 @@ module Nested = } .method public hidebysig virtual final - instance bool Equals(object obj) cil managed + instance bool Equals(object obj) cil managed { - .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) .maxstack 8 IL_0000: ldnull @@ -306,7 +458,7 @@ module Nested = .property instance int32 x() { .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags, - int32) = ( 01 00 04 00 00 00 00 00 00 00 00 00 ) + int32) = ( 01 00 04 00 00 00 00 00 00 00 00 00 ) .get instance int32 ReferenceAssembly/Nested/Test::get_x() } } @@ -320,8 +472,8 @@ module Nested = } } """ - ] - |> ignore +#endif + ] |> ignore [] let ``--refout should produce both normal and reference assemblies``() = @@ -498,54 +650,130 @@ type [] MySecondRecord = { Name: string } |> withOptions ["--refonly"] |> compile |> shouldSucceed - |> verifyIL [""" .class public auto ansi serializable sealed Net7FSharpSnafu.Library.MyRecord - extends [runtime]System.Object - { - .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CLIMutableAttribute::.ctor() = ( 01 00 00 00 ) - .custom instance void [FSharp.Core]Microsoft.FSharp.Core.NoComparisonAttribute::.ctor() = ( 01 00 00 00 ) - .custom instance void [FSharp.Core]Microsoft.FSharp.Core.NoEqualityAttribute::.ctor() = ( 01 00 00 00 ) - .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 02 00 00 00 00 00 ) - .method public hidebysig specialname instance string - get_Name() 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: ldnull - IL_0001: throw - } + |> verifyIL [ +#if NETCOREAPP + """.class public auto ansi serializable sealed Net7FSharpSnafu.Library.MyRecord + extends [runtime]System.Object +{ + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CLIMutableAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.NoComparisonAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.NoEqualityAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 02 00 00 00 00 00 ) + .method public hidebysig specialname instance string + get_Name() 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 ) - .method public hidebysig specialname instance void - set_Name(string 'value') 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: ldnull - IL_0001: throw - } + .maxstack 8 + IL_0000: ldnull + IL_0001: throw + } + + .method public hidebysig specialname instance void + set_Name(string 'value') 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 ) - .method public specialname rtspecialname - instance void .ctor(string name) cil managed - { - - .maxstack 8 - IL_0000: ldnull - IL_0001: throw - } + .maxstack 8 + IL_0000: ldnull + IL_0001: throw + } + + .method public specialname rtspecialname + instance void .ctor(string name) cil managed + { + .custom instance void [runtime]System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::.ctor(valuetype [runtime]System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes, + class [runtime]System.Type) = ( 01 00 60 06 00 00 20 4E 65 74 37 46 53 68 61 72 + 70 53 6E 61 66 75 2E 4C 69 62 72 61 72 79 2E 4D + 79 52 65 63 6F 72 64 00 00 ) - .method public specialname rtspecialname - instance void .ctor() cil managed - { - - .maxstack 8 - IL_0000: ldnull - IL_0001: throw - } + .maxstack 8 + IL_0000: ldnull + IL_0001: throw + } + + .method public specialname rtspecialname + instance void .ctor() cil managed + { - .method public strict virtual instance string + .maxstack 8 + IL_0000: ldnull + IL_0001: throw + } + + .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: ldnull + IL_0001: throw + } + + .property instance string Name() + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags, + int32) = ( 01 00 04 00 00 00 00 00 00 00 00 00 ) + .set instance void Net7FSharpSnafu.Library.MyRecord::set_Name(string) + .get instance string Net7FSharpSnafu.Library.MyRecord::get_Name() + } +} """ +#else + """.class public auto ansi serializable sealed Net7FSharpSnafu.Library.MyRecord + extends [runtime]System.Object +{ + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CLIMutableAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.NoComparisonAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.NoEqualityAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 02 00 00 00 00 00 ) + .method public hidebysig specialname instance string + get_Name() 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: ldnull + IL_0001: throw + } + + .method public hidebysig specialname instance void + set_Name(string 'value') 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: ldnull + IL_0001: throw + } + + .method public specialname rtspecialname + instance void .ctor(string name) 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 20 4E 65 74 37 46 53 68 61 72 + 70 53 6E 61 66 75 2E 4C 69 62 72 61 72 79 2E 4D + 79 52 65 63 6F 72 64 00 00 ) + + .maxstack 8 + IL_0000: ldnull + IL_0001: throw + } + + .method public specialname rtspecialname + instance void .ctor() cil managed + { + + .maxstack 8 + IL_0000: ldnull + IL_0001: throw + } + + .method public strict virtual instance string ToString() cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -555,14 +783,17 @@ type [] MySecondRecord = { Name: string } IL_0001: throw } - .property instance string Name() + .property instance string Name() { .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags, int32) = ( 01 00 04 00 00 00 00 00 00 00 00 00 ) .set instance void Net7FSharpSnafu.Library.MyRecord::set_Name(string) .get instance string Net7FSharpSnafu.Library.MyRecord::get_Name() } -} """] +} """ +#endif + + ] [] let ``Properties, getters, setters are emitted for internal properties`` () = diff --git a/tests/projects/SelfContained_Trimming_Test/NuGet.Config b/tests/projects/SelfContained_Trimming_Test/NuGet.Config index ed5be2d5fc6..2a97bd3b1ce 100644 --- a/tests/projects/SelfContained_Trimming_Test/NuGet.Config +++ b/tests/projects/SelfContained_Trimming_Test/NuGet.Config @@ -5,7 +5,7 @@ - + diff --git a/tests/projects/SelfContained_Trimming_Test/Program.fs b/tests/projects/SelfContained_Trimming_Test/Program.fs index 7799113a784..bc4e4d54c64 100644 --- a/tests/projects/SelfContained_Trimming_Test/Program.fs +++ b/tests/projects/SelfContained_Trimming_Test/Program.fs @@ -9059,14 +9059,48 @@ let func8000()= test "test8736" (lazy(sprintf "09-00%d09-01%d09-02%d09-03%d09-04%d09-05%d09-06%d09-07%d09-08%d09-09%a19-10%d19-11%d19-12%d19-13%d19-14%d19-15%d19-16%d19-17%d19-18%d19-19%a29-20%d29-21%d29-22%d29-23%d29-24%d29-25%d29-26%d29-27%d29-28%d29-29%a39-30%d39-31%d39-32%d39-33%d39-34%d39-35%d39-36%d39-37%d39-38%d39-39%a49-40%d49-41%d49-42%d49-43%d49-44%d49-45%d49-46%d49-47%d49-48%d49-49%a59-50%d59-51%d59-52%d59-53%d59-54%d59-55%d59-56%d59-57%d59-58%d59-59%a69-60%d69-61%d69-62%d69-63%d69-64%d69-65%d69-66%d69-67%d69-68%d69-69%a79-70%d79-71%d79-72%d79-73%d79-74%d79-75%d79-76%d79-77%d79-78%d79-79%a89-80%d89-81%d89-82%d89-83%d89-84%d89-85%d89-86%d89-87%d89-88%d89-89%a99-90%d99-91%d99-92%d99-93%d99-94%d99-95%d99-96%d99-97%d99-98%d99-99" 0 1 2 3 4 5 6 7 8 (fun _ v -> (string v) + "X") 1 10 11 12 13 14 15 16 17 18 (fun _ v -> (string v) + "X") 2 20 21 22 23 24 25 26 27 28 (fun _ v -> (string v) + "X") 3 30 31 32 33 34 35 36 37 38 (fun _ v -> (string v) + "X") 4 40 41 42 43 44 45 46 47 48 (fun _ v -> (string v) + "X") 5 50 51 52 53 54 55 56 57 58 (fun _ v -> (string v) + "X") 6 60 61 62 63 64 65 66 67 68 (fun _ v -> (string v) + "X") 7 70 71 72 73 74 75 76 77 78 (fun _ v -> (string v) + "X") 8 80 81 82 83 84 85 86 87 88 (fun _ v -> (string v) + "X") 9 90 91 92 93 94 95 96 97 98 )) "09-00009-01109-02209-03309-04409-05509-06609-07709-08809-091X19-101019-111119-121219-131319-141419-151519-161619-171719-181819-192X29-202029-212129-222229-232329-242429-252529-262629-272729-282829-293X39-303039-313139-323239-333339-343439-353539-363639-373739-383839-394X49-404049-414149-424249-434349-444449-454549-464649-474749-484849-495X59-505059-515159-525259-535359-545459-555559-565659-575759-585859-596X69-606069-616169-626269-636369-646469-656569-666669-676769-686869-697X79-707079-717179-727279-737379-747479-757579-767679-777779-787879-798X89-808089-818189-828289-838389-848489-858589-868689-878789-888889-899X99-909099-919199-929299-939399-949499-959599-969699-979799-989899-99" test "test8737" (lazy(sprintf "09-00%d09-01%d09-02%d09-03%d09-04%d09-05%d09-06%d09-07%d09-08%d09-09%a19-10%d19-11%d19-12%d19-13%d19-14%d19-15%d19-16%d19-17%d19-18%d19-19%a29-20%d29-21%d29-22%d29-23%d29-24%d29-25%d29-26%d29-27%d29-28%d29-29%a39-30%d39-31%d39-32%d39-33%d39-34%d39-35%d39-36%d39-37%d39-38%d39-39%a49-40%d49-41%d49-42%d49-43%d49-44%d49-45%d49-46%d49-47%d49-48%d49-49%a59-50%d59-51%d59-52%d59-53%d59-54%d59-55%d59-56%d59-57%d59-58%d59-59%a69-60%d69-61%d69-62%d69-63%d69-64%d69-65%d69-66%d69-67%d69-68%d69-69%a79-70%d79-71%d79-72%d79-73%d79-74%d79-75%d79-76%d79-77%d79-78%d79-79%a89-80%d89-81%d89-82%d89-83%d89-84%d89-85%d89-86%d89-87%d89-88%d89-89%a99-90%d99-91%d99-92%d99-93%d99-94%d99-95%d99-96%d99-97%d99-98%d99-99%a_TAIL" 0 1 2 3 4 5 6 7 8 (fun _ v -> (string v) + "X") 1 10 11 12 13 14 15 16 17 18 (fun _ v -> (string v) + "X") 2 20 21 22 23 24 25 26 27 28 (fun _ v -> (string v) + "X") 3 30 31 32 33 34 35 36 37 38 (fun _ v -> (string v) + "X") 4 40 41 42 43 44 45 46 47 48 (fun _ v -> (string v) + "X") 5 50 51 52 53 54 55 56 57 58 (fun _ v -> (string v) + "X") 6 60 61 62 63 64 65 66 67 68 (fun _ v -> (string v) + "X") 7 70 71 72 73 74 75 76 77 78 (fun _ v -> (string v) + "X") 8 80 81 82 83 84 85 86 87 88 (fun _ v -> (string v) + "X") 9 90 91 92 93 94 95 96 97 98 (fun _ v -> (string v) + "X") System.IO.FileShare.Read )) "09-00009-01109-02209-03309-04409-05509-06609-07709-08809-091X19-101019-111119-121219-131319-141419-151519-161619-171719-181819-192X29-202029-212129-222229-232329-242429-252529-262629-272729-282829-293X39-303039-313139-323239-333339-343439-353539-363639-373739-383839-394X49-404049-414149-424249-434349-444449-454549-464649-474749-484849-495X59-505059-515159-525259-535359-545459-555559-565659-575759-585859-596X69-606069-616169-626269-636369-646469-656569-666669-676769-686869-697X79-707079-717179-727279-737379-747479-757579-767679-777779-787879-798X89-808089-818189-828289-838389-848489-858589-868689-878789-888889-899X99-909099-919199-929299-939399-949499-959599-969699-979799-989899-99ReadX_TAIL" +module PresenceOfReflectionApi = + type MyRecord = { + A: string + B: decimal + } -type MyRecord = { - A: string - B: string -} + let testPresenceOfReflectionApi () = + test "test8800" (lazy(Microsoft.FSharp.Reflection.FSharpValue.PreComputeRecordConstructorInfo typeof |> ignore; "Done")) "Done" -let testPresenceOfReflectionApi () = - test "test8737" (lazy(Microsoft.FSharp.Reflection.FSharpValue.PreComputeRecordConstructorInfo typeof |> ignore; "Done")) "Done" +module PercentaPublicTests = + type MyRecord = + { + A: string + B: decimal + C: int + D: float + } + + let testPercentA () = + let data = { A = "Hello, World!"; B = 1.027m; C = 1028; D = 1.029 } + test "test8900" (lazy (sprintf "%A" data).Replace("\n", ";")) """{ A = "Hello, World!"; B = 1.027M; C = 1028; D = 1.029 }""" + +module PercentaInternalTests = + + type internal MyInternalRecord = + { + A: string + B: decimal + C: int + D: float + } + override this.ToString() = $"Hidden by ToString()" + + let testPercentA () = + + let data = { A = "Hello, World!"; B = 1.027m; C = 1028; D = 1.029 } + test "test9000" (lazy (sprintf "%A" data).Replace("\n", ";")) "Hidden by ToString()" + + let testPercentPlusA () = + + let data = { A = "Hello, World!"; B = 1.027m; C = 1028; D = 1.029 } + test "test9100" (lazy (sprintf "%+A" data).Replace("\n", ";")) """{ A = "Hello, World!"; B = 1.027M; C = 1028; D = 1.029 }""" [] let main _ = @@ -9080,7 +9114,11 @@ let main _ = func6000() func7000() func8000() - testPresenceOfReflectionApi () + PresenceOfReflectionApi.testPresenceOfReflectionApi () + PercentaPublicTests.testPercentA () + PercentaInternalTests.testPercentA () + PercentaInternalTests.testPercentPlusA () + match !failures with | [] -> stdout.WriteLine "All tests passed" diff --git a/tests/projects/SelfContained_Trimming_Test/SelfContained_Trimming_Test.fsproj b/tests/projects/SelfContained_Trimming_Test/SelfContained_Trimming_Test.fsproj index 72feceb7d81..06b29764abb 100644 --- a/tests/projects/SelfContained_Trimming_Test/SelfContained_Trimming_Test.fsproj +++ b/tests/projects/SelfContained_Trimming_Test/SelfContained_Trimming_Test.fsproj @@ -30,7 +30,7 @@ - + diff --git a/tests/projects/SelfContained_Trimming_Test/check.ps1 b/tests/projects/SelfContained_Trimming_Test/check.ps1 index 2f1bb61b162..901aa952c8e 100644 --- a/tests/projects/SelfContained_Trimming_Test/check.ps1 +++ b/tests/projects/SelfContained_Trimming_Test/check.ps1 @@ -14,7 +14,7 @@ if (-not ($output -eq $expected)) } # Checking that FSharp.Core binary is of expected size (needs adjustments if test is updated). -$expected_len = 249344 # In bytes +$expected_len = 251904 # In bytes $file = Get-Item .\bin\Release\net7.0\win-x64\publish\FSharp.Core.dll $file_len = $file.Length if (-not ($file_len -eq $expected_len))