diff --git a/docs/release-notes/.FSharp.Compiler.Service/8.0.400.md b/docs/release-notes/.FSharp.Compiler.Service/8.0.400.md index 8f2038ba3f6..42c2e4fc3a8 100644 --- a/docs/release-notes/.FSharp.Compiler.Service/8.0.400.md +++ b/docs/release-notes/.FSharp.Compiler.Service/8.0.400.md @@ -34,3 +34,4 @@ * Reduce allocations in compiler checking via `ValueOption` usage ([PR #16822](https://github.com/dotnet/fsharp/pull/16822)) * Use AsyncLocal instead of ThreadStatic to hold Cancellable.Token ([PR #17156](https://github.com/dotnet/fsharp/pull/17156)) * Showing and inserting correct name of entities from unopened namespace/module ([Issue #14375](https://github.com/dotnet/fsharp/issues/14375), [PR #17261](https://github.com/dotnet/fsharp/pull/17261)) +* Support lazy custom attributes calculation for `ILTypeDef` public API, improve `ExtensionAttribute` presence detecting perf. ([PR #16168](https://github.com/dotnet/fsharp/pull/16168)) diff --git a/src/Compiler/AbstractIL/il.fs b/src/Compiler/AbstractIL/il.fs index 48cee265fdc..66b736f87c3 100644 --- a/src/Compiler/AbstractIL/il.fs +++ b/src/Compiler/AbstractIL/il.fs @@ -1258,6 +1258,9 @@ let storeILCustomAttrs (attrs: ILAttributes) = else ILAttributesStored.Given attrs +let mkILCustomAttrsComputed f = + ILAttributesStored.Reader(fun _ -> f ()) + let mkILCustomAttrsReader f = ILAttributesStored.Reader f type ILCodeLabel = int @@ -2611,6 +2614,14 @@ let convertInitSemantics (init: ILTypeInit) = | ILTypeInit.BeforeField -> TypeAttributes.BeforeFieldInit | ILTypeInit.OnAny -> enum 0 +[] +type ILTypeDefAdditionalFlags = + | None = 0 + | IsKnownToBeAttribute = 1 + /// The type can contain extension methods, + /// or this information may not be available at the time the ILTypeDef is created + | CanContainExtensionMethods = 2 + [] type ILTypeDef ( @@ -2626,7 +2637,7 @@ type ILTypeDef methodImpls: ILMethodImplDefs, events: ILEventDefs, properties: ILPropertyDefs, - isKnownToBeAttribute: bool, + additionalFlags: ILTypeDefAdditionalFlags, securityDeclsStored: ILSecurityDeclsStored, customAttrsStored: ILAttributesStored, metadataIndex: int32 @@ -2634,6 +2645,8 @@ type ILTypeDef let mutable customAttrsStored = customAttrsStored + let hasFlag flag = additionalFlags &&& flag = flag + new(name, attributes, layout, @@ -2646,7 +2659,7 @@ type ILTypeDef methodImpls, events, properties, - isKnownToBeAttribute, + additionalFlags, securityDecls, customAttrs) = ILTypeDef( @@ -2662,9 +2675,9 @@ type ILTypeDef methodImpls, events, properties, - isKnownToBeAttribute, + additionalFlags, storeILSecurityDecls securityDecls, - storeILCustomAttrs customAttrs, + customAttrs, NoMetadataIdx ) @@ -2694,7 +2707,10 @@ type ILTypeDef member _.Properties = properties - member _.IsKnownToBeAttribute = isKnownToBeAttribute + member _.IsKnownToBeAttribute = hasFlag ILTypeDefAdditionalFlags.IsKnownToBeAttribute + + member _.CanContainExtensionMethods = + hasFlag ILTypeDefAdditionalFlags.CanContainExtensionMethods member _.CustomAttrsStored = customAttrsStored @@ -2714,7 +2730,7 @@ type ILTypeDef ?methodImpls, ?events, ?properties, - ?isKnownToBeAttribute, + ?newAdditionalFlags, ?customAttrs, ?securityDecls ) = @@ -2732,11 +2748,11 @@ type ILTypeDef methodImpls = defaultArg methodImpls x.MethodImpls, events = defaultArg events x.Events, properties = defaultArg properties x.Properties, - isKnownToBeAttribute = defaultArg isKnownToBeAttribute x.IsKnownToBeAttribute, - customAttrs = defaultArg customAttrs x.CustomAttrs + additionalFlags = defaultArg newAdditionalFlags additionalFlags, + customAttrs = defaultArg customAttrs (storeILCustomAttrs x.CustomAttrs) ) - member x.CustomAttrs = + member x.CustomAttrs: ILAttributes = match customAttrsStored with | ILAttributesStored.Reader f -> let res = ILAttributes(f x.MetadataIndex) @@ -4220,11 +4236,11 @@ let mkILGenericClass (nm, access, genparams, extends, impl, methods, fields, nes methods = methods, fields = fields, nestedTypes = nestedTypes, - customAttrs = attrs, + customAttrs = storeILCustomAttrs attrs, methodImpls = emptyILMethodImpls, properties = props, events = events, - isKnownToBeAttribute = false, + additionalFlags = ILTypeDefAdditionalFlags.None, securityDecls = emptyILSecurityDecls ) @@ -4244,11 +4260,11 @@ let mkRawDataValueTypeDef (iltyp_ValueType: ILType) (nm, size, pack) = methods = emptyILMethods, fields = emptyILFields, nestedTypes = emptyILTypeDefs, - customAttrs = emptyILCustomAttrs, + customAttrs = emptyILCustomAttrsStored, methodImpls = emptyILMethodImpls, properties = emptyILProperties, events = emptyILEvents, - isKnownToBeAttribute = false, + additionalFlags = ILTypeDefAdditionalFlags.None, securityDecls = emptyILSecurityDecls ) diff --git a/src/Compiler/AbstractIL/il.fsi b/src/Compiler/AbstractIL/il.fsi index 5e02f4c0c1e..d6673131060 100644 --- a/src/Compiler/AbstractIL/il.fsi +++ b/src/Compiler/AbstractIL/il.fsi @@ -4,6 +4,7 @@ module rec FSharp.Compiler.AbstractIL.IL +open System open FSharp.Compiler.IO open System.Collections.Generic open System.Reflection @@ -1481,6 +1482,12 @@ type ILTypeDefs = /// Calls to ExistsByName will result in all the ILPreTypeDefs being read. member internal ExistsByName: string -> bool +[] +type ILTypeDefAdditionalFlags = + | None = 0 + | IsKnownToBeAttribute = 1 + | CanContainExtensionMethods = 2 + /// Represents IL Type Definitions. [] type ILTypeDef = @@ -1499,7 +1506,7 @@ type ILTypeDef = methodImpls: ILMethodImplDefs * events: ILEventDefs * properties: ILPropertyDefs * - isKnownToBeAttribute: bool * + additionalFlags: ILTypeDefAdditionalFlags * securityDeclsStored: ILSecurityDeclsStored * customAttrsStored: ILAttributesStored * metadataIndex: int32 -> @@ -1519,9 +1526,9 @@ type ILTypeDef = methodImpls: ILMethodImplDefs * events: ILEventDefs * properties: ILPropertyDefs * - isKnownToBeAttribute: bool * + additionalFlags: ILTypeDefAdditionalFlags * securityDecls: ILSecurityDecls * - customAttrs: ILAttributes -> + customAttrs: ILAttributesStored -> ILTypeDef member Name: string @@ -1556,6 +1563,7 @@ type ILTypeDef = member HasSecurity: bool member Encoding: ILDefaultPInvokeEncoding member IsKnownToBeAttribute: bool + member CanContainExtensionMethods: bool member internal WithAccess: ILTypeDefAccess -> ILTypeDef member internal WithNestedAccess: ILMemberAccess -> ILTypeDef @@ -1584,8 +1592,8 @@ type ILTypeDef = ?methodImpls: ILMethodImplDefs * ?events: ILEventDefs * ?properties: ILPropertyDefs * - ?isKnownToBeAttribute: bool * - ?customAttrs: ILAttributes * + ?newAdditionalFlags: ILTypeDefAdditionalFlags * + ?customAttrs: ILAttributesStored * ?securityDecls: ILSecurityDecls -> ILTypeDef @@ -2212,8 +2220,10 @@ val internal mkILTypeForGlobalFunctions: ILScopeRef -> ILType val mkILCustomAttrs: ILAttribute list -> ILAttributes val mkILCustomAttrsFromArray: ILAttribute[] -> ILAttributes val storeILCustomAttrs: ILAttributes -> ILAttributesStored +val mkILCustomAttrsComputed: (unit -> ILAttribute[]) -> ILAttributesStored val internal mkILCustomAttrsReader: (int32 -> ILAttribute[]) -> ILAttributesStored val emptyILCustomAttrs: ILAttributes +val emptyILCustomAttrsStored: ILAttributesStored val mkILSecurityDecls: ILSecurityDecl list -> ILSecurityDecls val emptyILSecurityDecls: ILSecurityDecls diff --git a/src/Compiler/AbstractIL/ilmorph.fs b/src/Compiler/AbstractIL/ilmorph.fs index b4305791076..334ed93d212 100644 --- a/src/Compiler/AbstractIL/ilmorph.fs +++ b/src/Compiler/AbstractIL/ilmorph.fs @@ -378,7 +378,7 @@ let rec tdef_ty2ty_ilmbody2ilmbody_mdefs2mdefs isInKnownSet enc fs (tdef: ILType methodImpls = mimpls_ty2ty fTyInCtxtR tdef.MethodImpls, events = edefs_ty2ty fTyInCtxtR tdef.Events, properties = pdefs_ty2ty fTyInCtxtR tdef.Properties, - customAttrs = cattrs_ty2ty fTyInCtxtR tdef.CustomAttrs + customAttrs = storeILCustomAttrs (cattrs_ty2ty fTyInCtxtR tdef.CustomAttrs) ) and tdefs_ty2ty_ilmbody2ilmbody_mdefs2mdefs isInKnownSet enc fs tdefs = diff --git a/src/Compiler/AbstractIL/ilread.fs b/src/Compiler/AbstractIL/ilread.fs index 61c04f8e4ba..1535078bfe0 100644 --- a/src/Compiler/AbstractIL/ilread.fs +++ b/src/Compiler/AbstractIL/ilread.fs @@ -858,10 +858,10 @@ let hsCompare (TaggedIndex(t1: HasSemanticsTag, idx1: int)) (TaggedIndex(t2: Has elif idx1 > idx2 then 1 else compare t1.Tag t2.Tag -let hcaCompare (TaggedIndex(t1: HasCustomAttributeTag, idx1: int)) (TaggedIndex(t2: HasCustomAttributeTag, idx2)) = - if idx1 < idx2 then -1 - elif idx1 > idx2 then 1 - else compare t1.Tag t2.Tag +let inline hcaCompare (t1: TaggedIndex) (t2: TaggedIndex) = + if t1.index < t2.index then -1 + elif t1.index > t2.index then 1 + else compare t1.tag t2.tag let mfCompare (TaggedIndex(t1: MemberForwardedTag, idx1: int)) (TaggedIndex(t2: MemberForwardedTag, idx2)) = if idx1 < idx2 then -1 @@ -2112,9 +2112,82 @@ and typeDefReader ctxtH : ILTypeDefStored = let layout = typeLayoutOfFlags ctxt mdv flags idx let hasLayout = - (match layout with - | ILTypeDefLayout.Explicit _ -> true - | _ -> false) + match layout with + | ILTypeDefLayout.Explicit _ -> true + | _ -> false + + let containsExtensionMethods = + let mutable containsExtensionMethods = false + let searchedKey = TaggedIndex(hca_TypeDef, idx) + + let attributesSearcher = + { new ISeekReadIndexedRowReader with + member _.GetRow(i, rowIndex) = rowIndex <- i + member _.GetKey(rowIndex) = rowIndex + + member _.CompareKey(rowIndex) = + let mutable addr = ctxt.rowAddr TableNames.CustomAttribute rowIndex + // read parentIndex + let key = seekReadHasCustomAttributeIdx ctxt mdv &addr + hcaCompare searchedKey key + + member _.ConvertRow(i) = i + } + + let attrsStartIdx, attrsEndIdx = + seekReadIndexedRowsRange + (ctxt.getNumRows TableNames.CustomAttribute) + (isSorted ctxt TableNames.CustomAttribute) + attributesSearcher + + if attrsStartIdx <= 0 || attrsEndIdx < attrsStartIdx then + false + else + let mutable attrIdx = attrsStartIdx + + let looksLikeSystemAssembly = + ctxt.fileName.EndsWith("System.Runtime.dll") + || ctxt.fileName.EndsWith("mscorlib.dll") + || ctxt.fileName.EndsWith("netstandard.dll") + + while attrIdx <= attrsEndIdx && not containsExtensionMethods do + let mutable addr = ctxt.rowAddr TableNames.CustomAttribute attrIdx + // skip parentIndex to read typeIndex + seekReadHasCustomAttributeIdx ctxt mdv &addr |> ignore + let attrTypeIndex = seekReadCustomAttributeTypeIdx ctxt mdv &addr + let attrCtorIdx = attrTypeIndex.index + + let name = + if attrTypeIndex.tag = cat_MethodDef then + // the ExtensionAttribute constructor can be cat_MethodDef if the metadata is read from the assembly + // in which the corresponding attribute is defined -- from the system library + if not looksLikeSystemAssembly then + "" + else + let _, (_, nameIdx, namespaceIdx, _, _, _) = seekMethodDefParent ctxt attrCtorIdx + readBlobHeapAsTypeName ctxt (nameIdx, namespaceIdx) + else + let mutable addr = ctxt.rowAddr TableNames.MemberRef attrCtorIdx + let mrpTag = seekReadMemberRefParentIdx ctxt mdv &addr + + if mrpTag.tag <> mrp_TypeRef then + "" + else + let _, nameIdx, namespaceIdx = seekReadTypeRefRow ctxt mdv mrpTag.index + readBlobHeapAsTypeName ctxt (nameIdx, namespaceIdx) + + if name = "System.Runtime.CompilerServices.ExtensionAttribute" then + containsExtensionMethods <- true + + attrIdx <- attrIdx + 1 + + containsExtensionMethods + + let additionalFlags = + if containsExtensionMethods then + ILTypeDefAdditionalFlags.CanContainExtensionMethods + else + ILTypeDefAdditionalFlags.None let mdefs = seekReadMethods ctxt numTypars methodsIdx endMethodsIdx let fdefs = seekReadFields ctxt (numTypars, hasLayout) fieldsIdx endFieldsIdx @@ -2138,7 +2211,7 @@ and typeDefReader ctxtH : ILTypeDefStored = methodImpls = mimpls, events = events, properties = props, - isKnownToBeAttribute = false, + additionalFlags = additionalFlags, customAttrsStored = ctxt.customAttrsReader_TypeDef, metadataIndex = idx )) @@ -2797,22 +2870,26 @@ and seekReadMemberRefAsFieldSpecUncached ctxtH (MemberRefAsFspecIdx(numTypars, i // method-range and field-range start/finish indexes and seekReadMethodDefAsMethodData ctxt idx = ctxt.seekReadMethodDefAsMethodData idx +and seekMethodDefParent (ctxt: ILMetadataReader) methodIdx = + seekReadIndexedRow ( + ctxt.getNumRows TableNames.TypeDef, + (fun i -> i, seekReadTypeDefRow ctxt i), + id, + (fun (i, (_, _, _, _, _, methodsIdx as info)) -> + if methodsIdx > methodIdx then + -1 + else + let struct (_, endMethodsIdx) = seekReadTypeDefRowExtents ctxt info i + if endMethodsIdx <= methodIdx then 1 else 0), + true, + id + ) + and seekReadMethodDefAsMethodDataUncached ctxtH idx = let (ctxt: ILMetadataReader) = getHole ctxtH let mdv = ctxt.mdfile.GetView() // Look for the method def parent. - let tidx = - seekReadIndexedRow ( - ctxt.getNumRows TableNames.TypeDef, - (fun i -> i, seekReadTypeDefRowWithExtents ctxt i), - id, - (fun (_, ((_, _, _, _, _, methodsIdx), (_, endMethodsIdx))) -> - if endMethodsIdx <= idx then 1 - elif methodsIdx <= idx && idx < endMethodsIdx then 0 - else -1), - true, - fst - ) + let tidx, _ = seekMethodDefParent ctxt idx // Create a formal instantiation if needed let typeGenericArgs = seekReadGenericParams ctxt 0 (tomd_TypeDef, tidx) let typeGenericArgsCount = typeGenericArgs.Length diff --git a/src/Compiler/Checking/NameResolution.fs b/src/Compiler/Checking/NameResolution.fs index 780824e3ead..6605ae861f2 100644 --- a/src/Compiler/Checking/NameResolution.fs +++ b/src/Compiler/Checking/NameResolution.fs @@ -524,7 +524,10 @@ let NextExtensionMethodPriority() = uint64 (newStamp()) /// Checks if the type is used for C# style extension members. let IsTyconRefUsedForCSharpStyleExtensionMembers g m (tcref: TyconRef) = // Type must be non-generic and have 'Extension' attribute - isNil(tcref.Typars m) && TyconRefHasAttribute g m g.attrib_ExtensionAttribute tcref + match metadataOfTycon tcref.Deref with + | ILTypeMetadata(TILObjectReprData(_, _, tdef)) -> tdef.CanContainExtensionMethods + | _ -> true + && isNil(tcref.Typars m) && TyconRefHasAttribute g m g.attrib_ExtensionAttribute tcref /// Checks if the type is used for C# style extension members. let IsTypeUsedForCSharpStyleExtensionMembers g m ty = diff --git a/src/Compiler/CodeGen/EraseClosures.fs b/src/Compiler/CodeGen/EraseClosures.fs index cf1499f0c30..7eddfd9b820 100644 --- a/src/Compiler/CodeGen/EraseClosures.fs +++ b/src/Compiler/CodeGen/EraseClosures.fs @@ -578,11 +578,11 @@ let rec convIlxClosureDef cenv encl (td: ILTypeDef) clo = extends = Some cenv.mkILTyFuncTy, methods = mkILMethods (ctorMethodDef :: nowApplyMethDef :: nowMethods), fields = mkILFields (mkILCloFldDefs cenv nowFields @ td.Fields.AsList()), - customAttrs = emptyILCustomAttrs, + customAttrs = emptyILCustomAttrsStored, methodImpls = emptyILMethodImpls, properties = emptyILProperties, events = emptyILEvents, - isKnownToBeAttribute = false, + additionalFlags = ILTypeDefAdditionalFlags.None, securityDecls = emptyILSecurityDecls ) .WithSpecialName(false) @@ -712,11 +712,11 @@ let rec convIlxClosureDef cenv encl (td: ILTypeDef) clo = extends = Some nowEnvParentClass, methods = mkILMethods (ctorMethodDef :: nowApplyMethDef :: nowMethods), fields = mkILFields (mkILCloFldDefs cenv nowFields @ td.Fields.AsList()), - customAttrs = emptyILCustomAttrs, + customAttrs = emptyILCustomAttrsStored, methodImpls = emptyILMethodImpls, properties = emptyILProperties, events = emptyILEvents, - isKnownToBeAttribute = false, + additionalFlags = ILTypeDefAdditionalFlags.None, securityDecls = emptyILSecurityDecls ) .WithHasSecurity(false) diff --git a/src/Compiler/CodeGen/EraseUnions.fs b/src/Compiler/CodeGen/EraseUnions.fs index e21f76b3071..d5670ed3fdf 100644 --- a/src/Compiler/CodeGen/EraseUnions.fs +++ b/src/Compiler/CodeGen/EraseUnions.fs @@ -1452,8 +1452,8 @@ let mkClassUnionDef methodImpls = emptyILMethodImpls, events = emptyILEvents, properties = emptyILProperties, - isKnownToBeAttribute = false, - customAttrs = emptyILCustomAttrs + additionalFlags = ILTypeDefAdditionalFlags.None, + customAttrs = emptyILCustomAttrsStored ) .WithNestedAccess(cud.UnionCasesAccessibility) .WithAbstract(true) diff --git a/src/Compiler/CodeGen/IlxGen.fs b/src/Compiler/CodeGen/IlxGen.fs index 9be96f680b7..c152a0f239a 100644 --- a/src/Compiler/CodeGen/IlxGen.fs +++ b/src/Compiler/CodeGen/IlxGen.fs @@ -6202,19 +6202,21 @@ and GenStructStateMachine cenv cgbuf eenvouter (res: LoweredStateMachine) sequel yield fdef ] + let customAttrs = + [ + g.CompilerGeneratedAttribute + mkCompilationMappingAttr g (int SourceConstructFlags.Closure) + ] + |> mkILCustomAttrs + |> storeILCustomAttrs + let cloTypeDef = ILTypeDef( name = ilCloTypeRef.Name, layout = ILTypeDefLayout.Auto, attributes = enum 0, genericParams = ilCloGenericFormals, - customAttrs = - mkILCustomAttrs ( - [ - g.CompilerGeneratedAttribute - mkCompilationMappingAttr g (int SourceConstructFlags.Closure) - ] - ), + customAttrs = customAttrs, fields = mkILFields fdefs, events = emptyILEvents, properties = emptyILProperties, @@ -6223,7 +6225,7 @@ and GenStructStateMachine cenv cgbuf eenvouter (res: LoweredStateMachine) sequel nestedTypes = emptyILTypeDefs, implements = ilInterfaceTys, extends = Some super, - isKnownToBeAttribute = false, + additionalFlags = ILTypeDefAdditionalFlags.None, securityDecls = emptyILSecurityDecls ) .WithSealed(true) @@ -6636,13 +6638,18 @@ and GenClosureTypeDefs else mdefs, [] + let customAttrs = + attrs @ [ mkCompilationMappingAttr g (int SourceConstructFlags.Closure) ] + |> mkILCustomAttrs + |> storeILCustomAttrs + let tdef = ILTypeDef( name = tref.Name, layout = ILTypeDefLayout.Auto, attributes = enum 0, genericParams = ilGenParams, - customAttrs = mkILCustomAttrs (attrs @ [ mkCompilationMappingAttr g (int SourceConstructFlags.Closure) ]), + customAttrs = customAttrs, fields = mkILFields fdefs, events = emptyILEvents, properties = emptyILProperties, @@ -6651,7 +6658,7 @@ and GenClosureTypeDefs nestedTypes = emptyILTypeDefs, implements = ilIntfTys, extends = Some ext, - isKnownToBeAttribute = false, + additionalFlags = ILTypeDefAdditionalFlags.None, securityDecls = emptyILSecurityDecls ) .WithSealed(true) @@ -11327,8 +11334,9 @@ and GenTypeDef cenv mgbuf lazyInitInfo eenv m (tycon: Tycon) : ILTypeRef option | TILObjectRepr _ -> let tdef = tycon.ILTyconRawMetadata.WithAccess tyconAccess - let tdef = - tdef.With(customAttrs = mkILCustomAttrs ilCustomAttrs, genericParams = ilGenParams) + let customAttrs = ilCustomAttrs |> mkILCustomAttrs |> storeILCustomAttrs + + let tdef = tdef.With(customAttrs = customAttrs, genericParams = ilGenParams) tdef, None @@ -11364,6 +11372,12 @@ and GenTypeDef cenv mgbuf lazyInitInfo eenv m (tycon: Tycon) : ILTypeRef option let isKnownToBeAttribute = ExistsSameHeadTypeInHierarchy g cenv.amap m super g.mk_Attribute_ty + let additionalFlags = + if isKnownToBeAttribute then + ILTypeDefAdditionalFlags.IsKnownToBeAttribute + else + ILTypeDefAdditionalFlags.None + let tdef = mkILGenericClass ( ilTypeName, @@ -11389,7 +11403,7 @@ and GenTypeDef cenv mgbuf lazyInitInfo eenv m (tycon: Tycon) : ILTypeRef option .WithSerializable(isSerializable) .WithAbstract(isAbstract) .WithImport(isComInteropTy g thisTy) - .With(methodImpls = mkILMethodImpls methodImpls, isKnownToBeAttribute = isKnownToBeAttribute) + .With(methodImpls = mkILMethodImpls methodImpls, newAdditionalFlags = additionalFlags) let tdLayout, tdEncoding = match TryFindFSharpAttribute g g.attrib_StructLayoutAttribute tycon.Attribs with @@ -11524,19 +11538,19 @@ and GenTypeDef cenv mgbuf lazyInitInfo eenv m (tycon: Tycon) : ILTypeRef option ILTypeDefLayout.Auto let cattrs = - mkILCustomAttrs ( - ilCustomAttrs - @ [ - mkCompilationMappingAttr - g - (int ( - if hiddenRepr then - SourceConstructFlags.SumType ||| SourceConstructFlags.NonPublicRepresentation - else - SourceConstructFlags.SumType - )) - ] - ) + ilCustomAttrs + @ [ + mkCompilationMappingAttr + g + (int ( + if hiddenRepr then + SourceConstructFlags.SumType ||| SourceConstructFlags.NonPublicRepresentation + else + SourceConstructFlags.SumType + )) + ] + |> mkILCustomAttrs + |> storeILCustomAttrs let tdef = ILTypeDef( @@ -11559,7 +11573,7 @@ and GenTypeDef cenv mgbuf lazyInitInfo eenv m (tycon: Tycon) : ILTypeRef option else g.ilg.typ_Object ), - isKnownToBeAttribute = false, + additionalFlags = ILTypeDefAdditionalFlags.None, securityDecls = emptyILSecurityDecls ) .WithLayout(layout) diff --git a/tests/FSharp.Compiler.Service.Tests/FSharp.Compiler.Service.SurfaceArea.netstandard20.debug.bsl b/tests/FSharp.Compiler.Service.Tests/FSharp.Compiler.Service.SurfaceArea.netstandard20.debug.bsl index 447ebd82026..63a16671bca 100644 --- a/tests/FSharp.Compiler.Service.Tests/FSharp.Compiler.Service.SurfaceArea.netstandard20.debug.bsl +++ b/tests/FSharp.Compiler.Service.Tests/FSharp.Compiler.Service.SurfaceArea.netstandard20.debug.bsl @@ -1483,6 +1483,7 @@ FSharp.Compiler.AbstractIL.IL+ILType: System.String QualifiedName FSharp.Compiler.AbstractIL.IL+ILType: System.String ToString() FSharp.Compiler.AbstractIL.IL+ILType: System.String get_BasicQualifiedName() FSharp.Compiler.AbstractIL.IL+ILType: System.String get_QualifiedName() +FSharp.Compiler.AbstractIL.IL+ILTypeDef: Boolean CanContainExtensionMethods FSharp.Compiler.AbstractIL.IL+ILTypeDef: Boolean HasSecurity FSharp.Compiler.AbstractIL.IL+ILTypeDef: Boolean IsAbstract FSharp.Compiler.AbstractIL.IL+ILTypeDef: Boolean IsClass @@ -1496,6 +1497,7 @@ FSharp.Compiler.AbstractIL.IL+ILTypeDef: Boolean IsSerializable FSharp.Compiler.AbstractIL.IL+ILTypeDef: Boolean IsSpecialName FSharp.Compiler.AbstractIL.IL+ILTypeDef: Boolean IsStruct FSharp.Compiler.AbstractIL.IL+ILTypeDef: Boolean IsStructOrEnum +FSharp.Compiler.AbstractIL.IL+ILTypeDef: Boolean get_CanContainExtensionMethods() FSharp.Compiler.AbstractIL.IL+ILTypeDef: Boolean get_HasSecurity() FSharp.Compiler.AbstractIL.IL+ILTypeDef: Boolean get_IsAbstract() FSharp.Compiler.AbstractIL.IL+ILTypeDef: Boolean get_IsClass() @@ -1525,7 +1527,7 @@ FSharp.Compiler.AbstractIL.IL+ILTypeDef: ILPropertyDefs Properties FSharp.Compiler.AbstractIL.IL+ILTypeDef: ILPropertyDefs get_Properties() FSharp.Compiler.AbstractIL.IL+ILTypeDef: ILSecurityDecls SecurityDecls FSharp.Compiler.AbstractIL.IL+ILTypeDef: ILSecurityDecls get_SecurityDecls() -FSharp.Compiler.AbstractIL.IL+ILTypeDef: ILTypeDef With(Microsoft.FSharp.Core.FSharpOption`1[System.String], Microsoft.FSharp.Core.FSharpOption`1[System.Reflection.TypeAttributes], Microsoft.FSharp.Core.FSharpOption`1[FSharp.Compiler.AbstractIL.IL+ILTypeDefLayout], Microsoft.FSharp.Core.FSharpOption`1[Microsoft.FSharp.Collections.FSharpList`1[FSharp.Compiler.AbstractIL.IL+ILType]], Microsoft.FSharp.Core.FSharpOption`1[Microsoft.FSharp.Collections.FSharpList`1[FSharp.Compiler.AbstractIL.IL+ILGenericParameterDef]], Microsoft.FSharp.Core.FSharpOption`1[Microsoft.FSharp.Core.FSharpOption`1[FSharp.Compiler.AbstractIL.IL+ILType]], Microsoft.FSharp.Core.FSharpOption`1[FSharp.Compiler.AbstractIL.IL+ILMethodDefs], Microsoft.FSharp.Core.FSharpOption`1[FSharp.Compiler.AbstractIL.IL+ILTypeDefs], Microsoft.FSharp.Core.FSharpOption`1[FSharp.Compiler.AbstractIL.IL+ILFieldDefs], Microsoft.FSharp.Core.FSharpOption`1[FSharp.Compiler.AbstractIL.IL+ILMethodImplDefs], Microsoft.FSharp.Core.FSharpOption`1[FSharp.Compiler.AbstractIL.IL+ILEventDefs], Microsoft.FSharp.Core.FSharpOption`1[FSharp.Compiler.AbstractIL.IL+ILPropertyDefs], Microsoft.FSharp.Core.FSharpOption`1[System.Boolean], Microsoft.FSharp.Core.FSharpOption`1[FSharp.Compiler.AbstractIL.IL+ILAttributes], Microsoft.FSharp.Core.FSharpOption`1[FSharp.Compiler.AbstractIL.IL+ILSecurityDecls]) +FSharp.Compiler.AbstractIL.IL+ILTypeDef: ILTypeDef With(Microsoft.FSharp.Core.FSharpOption`1[System.String], Microsoft.FSharp.Core.FSharpOption`1[System.Reflection.TypeAttributes], Microsoft.FSharp.Core.FSharpOption`1[FSharp.Compiler.AbstractIL.IL+ILTypeDefLayout], Microsoft.FSharp.Core.FSharpOption`1[Microsoft.FSharp.Collections.FSharpList`1[FSharp.Compiler.AbstractIL.IL+ILType]], Microsoft.FSharp.Core.FSharpOption`1[Microsoft.FSharp.Collections.FSharpList`1[FSharp.Compiler.AbstractIL.IL+ILGenericParameterDef]], Microsoft.FSharp.Core.FSharpOption`1[Microsoft.FSharp.Core.FSharpOption`1[FSharp.Compiler.AbstractIL.IL+ILType]], Microsoft.FSharp.Core.FSharpOption`1[FSharp.Compiler.AbstractIL.IL+ILMethodDefs], Microsoft.FSharp.Core.FSharpOption`1[FSharp.Compiler.AbstractIL.IL+ILTypeDefs], Microsoft.FSharp.Core.FSharpOption`1[FSharp.Compiler.AbstractIL.IL+ILFieldDefs], Microsoft.FSharp.Core.FSharpOption`1[FSharp.Compiler.AbstractIL.IL+ILMethodImplDefs], Microsoft.FSharp.Core.FSharpOption`1[FSharp.Compiler.AbstractIL.IL+ILEventDefs], Microsoft.FSharp.Core.FSharpOption`1[FSharp.Compiler.AbstractIL.IL+ILPropertyDefs], Microsoft.FSharp.Core.FSharpOption`1[FSharp.Compiler.AbstractIL.IL+ILTypeDefAdditionalFlags], Microsoft.FSharp.Core.FSharpOption`1[FSharp.Compiler.AbstractIL.IL+ILAttributesStored], Microsoft.FSharp.Core.FSharpOption`1[FSharp.Compiler.AbstractIL.IL+ILSecurityDecls]) FSharp.Compiler.AbstractIL.IL+ILTypeDef: ILTypeDefAccess Access FSharp.Compiler.AbstractIL.IL+ILTypeDef: ILTypeDefAccess get_Access() FSharp.Compiler.AbstractIL.IL+ILTypeDef: ILTypeDefLayout Layout @@ -1543,7 +1545,7 @@ FSharp.Compiler.AbstractIL.IL+ILTypeDef: System.Reflection.TypeAttributes get_At FSharp.Compiler.AbstractIL.IL+ILTypeDef: System.String Name FSharp.Compiler.AbstractIL.IL+ILTypeDef: System.String ToString() FSharp.Compiler.AbstractIL.IL+ILTypeDef: System.String get_Name() -FSharp.Compiler.AbstractIL.IL+ILTypeDef: Void .ctor(System.String, System.Reflection.TypeAttributes, ILTypeDefLayout, Microsoft.FSharp.Collections.FSharpList`1[FSharp.Compiler.AbstractIL.IL+ILType], Microsoft.FSharp.Collections.FSharpList`1[FSharp.Compiler.AbstractIL.IL+ILGenericParameterDef], Microsoft.FSharp.Core.FSharpOption`1[FSharp.Compiler.AbstractIL.IL+ILType], ILMethodDefs, ILTypeDefs, ILFieldDefs, ILMethodImplDefs, ILEventDefs, ILPropertyDefs, Boolean, ILSecurityDecls, ILAttributes) +FSharp.Compiler.AbstractIL.IL+ILTypeDef: Void .ctor(System.String, System.Reflection.TypeAttributes, ILTypeDefLayout, Microsoft.FSharp.Collections.FSharpList`1[FSharp.Compiler.AbstractIL.IL+ILType], Microsoft.FSharp.Collections.FSharpList`1[FSharp.Compiler.AbstractIL.IL+ILGenericParameterDef], Microsoft.FSharp.Core.FSharpOption`1[FSharp.Compiler.AbstractIL.IL+ILType], ILMethodDefs, ILTypeDefs, ILFieldDefs, ILMethodImplDefs, ILEventDefs, ILPropertyDefs, ILTypeDefAdditionalFlags, ILSecurityDecls, ILAttributesStored) FSharp.Compiler.AbstractIL.IL+ILTypeDefAccess+Nested: ILMemberAccess Item FSharp.Compiler.AbstractIL.IL+ILTypeDefAccess+Nested: ILMemberAccess get_Item() FSharp.Compiler.AbstractIL.IL+ILTypeDefAccess+Tags: Int32 Nested @@ -1574,6 +1576,10 @@ FSharp.Compiler.AbstractIL.IL+ILTypeDefAccess: Int32 GetHashCode(System.Collecti FSharp.Compiler.AbstractIL.IL+ILTypeDefAccess: Int32 Tag FSharp.Compiler.AbstractIL.IL+ILTypeDefAccess: Int32 get_Tag() FSharp.Compiler.AbstractIL.IL+ILTypeDefAccess: System.String ToString() +FSharp.Compiler.AbstractIL.IL+ILTypeDefAdditionalFlags: ILTypeDefAdditionalFlags CanContainExtensionMethods +FSharp.Compiler.AbstractIL.IL+ILTypeDefAdditionalFlags: ILTypeDefAdditionalFlags IsKnownToBeAttribute +FSharp.Compiler.AbstractIL.IL+ILTypeDefAdditionalFlags: ILTypeDefAdditionalFlags None +FSharp.Compiler.AbstractIL.IL+ILTypeDefAdditionalFlags: Int32 value__ FSharp.Compiler.AbstractIL.IL+ILTypeDefKind+Tags: Int32 Class FSharp.Compiler.AbstractIL.IL+ILTypeDefKind+Tags: Int32 Delegate FSharp.Compiler.AbstractIL.IL+ILTypeDefKind+Tags: Int32 Enum @@ -1853,6 +1859,7 @@ FSharp.Compiler.AbstractIL.IL: FSharp.Compiler.AbstractIL.IL+ILThisConvention FSharp.Compiler.AbstractIL.IL: FSharp.Compiler.AbstractIL.IL+ILType FSharp.Compiler.AbstractIL.IL: FSharp.Compiler.AbstractIL.IL+ILTypeDef FSharp.Compiler.AbstractIL.IL: FSharp.Compiler.AbstractIL.IL+ILTypeDefAccess +FSharp.Compiler.AbstractIL.IL: FSharp.Compiler.AbstractIL.IL+ILTypeDefAdditionalFlags FSharp.Compiler.AbstractIL.IL: FSharp.Compiler.AbstractIL.IL+ILTypeDefKind FSharp.Compiler.AbstractIL.IL: FSharp.Compiler.AbstractIL.IL+ILTypeDefLayout FSharp.Compiler.AbstractIL.IL: FSharp.Compiler.AbstractIL.IL+ILTypeDefs @@ -1866,6 +1873,9 @@ FSharp.Compiler.AbstractIL.IL: ILAttributes emptyILCustomAttrs FSharp.Compiler.AbstractIL.IL: ILAttributes get_emptyILCustomAttrs() FSharp.Compiler.AbstractIL.IL: ILAttributes mkILCustomAttrs(Microsoft.FSharp.Collections.FSharpList`1[FSharp.Compiler.AbstractIL.IL+ILAttribute]) FSharp.Compiler.AbstractIL.IL: ILAttributes mkILCustomAttrsFromArray(ILAttribute[]) +FSharp.Compiler.AbstractIL.IL: ILAttributesStored emptyILCustomAttrsStored +FSharp.Compiler.AbstractIL.IL: ILAttributesStored get_emptyILCustomAttrsStored() +FSharp.Compiler.AbstractIL.IL: ILAttributesStored mkILCustomAttrsComputed(Microsoft.FSharp.Core.FSharpFunc`2[Microsoft.FSharp.Core.Unit,FSharp.Compiler.AbstractIL.IL+ILAttribute[]]) FSharp.Compiler.AbstractIL.IL: ILAttributesStored storeILCustomAttrs(ILAttributes) FSharp.Compiler.AbstractIL.IL: ILEventDefs emptyILEvents FSharp.Compiler.AbstractIL.IL: ILEventDefs get_emptyILEvents() diff --git a/tests/FSharp.Compiler.Service.Tests/FSharp.Compiler.Service.SurfaceArea.netstandard20.release.bsl b/tests/FSharp.Compiler.Service.Tests/FSharp.Compiler.Service.SurfaceArea.netstandard20.release.bsl index 4dc729720c0..646e067251e 100644 --- a/tests/FSharp.Compiler.Service.Tests/FSharp.Compiler.Service.SurfaceArea.netstandard20.release.bsl +++ b/tests/FSharp.Compiler.Service.Tests/FSharp.Compiler.Service.SurfaceArea.netstandard20.release.bsl @@ -1483,6 +1483,7 @@ FSharp.Compiler.AbstractIL.IL+ILType: System.String QualifiedName FSharp.Compiler.AbstractIL.IL+ILType: System.String ToString() FSharp.Compiler.AbstractIL.IL+ILType: System.String get_BasicQualifiedName() FSharp.Compiler.AbstractIL.IL+ILType: System.String get_QualifiedName() +FSharp.Compiler.AbstractIL.IL+ILTypeDef: Boolean CanContainExtensionMethods FSharp.Compiler.AbstractIL.IL+ILTypeDef: Boolean HasSecurity FSharp.Compiler.AbstractIL.IL+ILTypeDef: Boolean IsAbstract FSharp.Compiler.AbstractIL.IL+ILTypeDef: Boolean IsClass @@ -1496,6 +1497,7 @@ FSharp.Compiler.AbstractIL.IL+ILTypeDef: Boolean IsSerializable FSharp.Compiler.AbstractIL.IL+ILTypeDef: Boolean IsSpecialName FSharp.Compiler.AbstractIL.IL+ILTypeDef: Boolean IsStruct FSharp.Compiler.AbstractIL.IL+ILTypeDef: Boolean IsStructOrEnum +FSharp.Compiler.AbstractIL.IL+ILTypeDef: Boolean get_CanContainExtensionMethods() FSharp.Compiler.AbstractIL.IL+ILTypeDef: Boolean get_HasSecurity() FSharp.Compiler.AbstractIL.IL+ILTypeDef: Boolean get_IsAbstract() FSharp.Compiler.AbstractIL.IL+ILTypeDef: Boolean get_IsClass() @@ -1525,7 +1527,7 @@ FSharp.Compiler.AbstractIL.IL+ILTypeDef: ILPropertyDefs Properties FSharp.Compiler.AbstractIL.IL+ILTypeDef: ILPropertyDefs get_Properties() FSharp.Compiler.AbstractIL.IL+ILTypeDef: ILSecurityDecls SecurityDecls FSharp.Compiler.AbstractIL.IL+ILTypeDef: ILSecurityDecls get_SecurityDecls() -FSharp.Compiler.AbstractIL.IL+ILTypeDef: ILTypeDef With(Microsoft.FSharp.Core.FSharpOption`1[System.String], Microsoft.FSharp.Core.FSharpOption`1[System.Reflection.TypeAttributes], Microsoft.FSharp.Core.FSharpOption`1[FSharp.Compiler.AbstractIL.IL+ILTypeDefLayout], Microsoft.FSharp.Core.FSharpOption`1[Microsoft.FSharp.Collections.FSharpList`1[FSharp.Compiler.AbstractIL.IL+ILType]], Microsoft.FSharp.Core.FSharpOption`1[Microsoft.FSharp.Collections.FSharpList`1[FSharp.Compiler.AbstractIL.IL+ILGenericParameterDef]], Microsoft.FSharp.Core.FSharpOption`1[Microsoft.FSharp.Core.FSharpOption`1[FSharp.Compiler.AbstractIL.IL+ILType]], Microsoft.FSharp.Core.FSharpOption`1[FSharp.Compiler.AbstractIL.IL+ILMethodDefs], Microsoft.FSharp.Core.FSharpOption`1[FSharp.Compiler.AbstractIL.IL+ILTypeDefs], Microsoft.FSharp.Core.FSharpOption`1[FSharp.Compiler.AbstractIL.IL+ILFieldDefs], Microsoft.FSharp.Core.FSharpOption`1[FSharp.Compiler.AbstractIL.IL+ILMethodImplDefs], Microsoft.FSharp.Core.FSharpOption`1[FSharp.Compiler.AbstractIL.IL+ILEventDefs], Microsoft.FSharp.Core.FSharpOption`1[FSharp.Compiler.AbstractIL.IL+ILPropertyDefs], Microsoft.FSharp.Core.FSharpOption`1[System.Boolean], Microsoft.FSharp.Core.FSharpOption`1[FSharp.Compiler.AbstractIL.IL+ILAttributes], Microsoft.FSharp.Core.FSharpOption`1[FSharp.Compiler.AbstractIL.IL+ILSecurityDecls]) +FSharp.Compiler.AbstractIL.IL+ILTypeDef: ILTypeDef With(Microsoft.FSharp.Core.FSharpOption`1[System.String], Microsoft.FSharp.Core.FSharpOption`1[System.Reflection.TypeAttributes], Microsoft.FSharp.Core.FSharpOption`1[FSharp.Compiler.AbstractIL.IL+ILTypeDefLayout], Microsoft.FSharp.Core.FSharpOption`1[Microsoft.FSharp.Collections.FSharpList`1[FSharp.Compiler.AbstractIL.IL+ILType]], Microsoft.FSharp.Core.FSharpOption`1[Microsoft.FSharp.Collections.FSharpList`1[FSharp.Compiler.AbstractIL.IL+ILGenericParameterDef]], Microsoft.FSharp.Core.FSharpOption`1[Microsoft.FSharp.Core.FSharpOption`1[FSharp.Compiler.AbstractIL.IL+ILType]], Microsoft.FSharp.Core.FSharpOption`1[FSharp.Compiler.AbstractIL.IL+ILMethodDefs], Microsoft.FSharp.Core.FSharpOption`1[FSharp.Compiler.AbstractIL.IL+ILTypeDefs], Microsoft.FSharp.Core.FSharpOption`1[FSharp.Compiler.AbstractIL.IL+ILFieldDefs], Microsoft.FSharp.Core.FSharpOption`1[FSharp.Compiler.AbstractIL.IL+ILMethodImplDefs], Microsoft.FSharp.Core.FSharpOption`1[FSharp.Compiler.AbstractIL.IL+ILEventDefs], Microsoft.FSharp.Core.FSharpOption`1[FSharp.Compiler.AbstractIL.IL+ILPropertyDefs], Microsoft.FSharp.Core.FSharpOption`1[FSharp.Compiler.AbstractIL.IL+ILTypeDefAdditionalFlags], Microsoft.FSharp.Core.FSharpOption`1[FSharp.Compiler.AbstractIL.IL+ILAttributesStored], Microsoft.FSharp.Core.FSharpOption`1[FSharp.Compiler.AbstractIL.IL+ILSecurityDecls]) FSharp.Compiler.AbstractIL.IL+ILTypeDef: ILTypeDefAccess Access FSharp.Compiler.AbstractIL.IL+ILTypeDef: ILTypeDefAccess get_Access() FSharp.Compiler.AbstractIL.IL+ILTypeDef: ILTypeDefLayout Layout @@ -1543,7 +1545,7 @@ FSharp.Compiler.AbstractIL.IL+ILTypeDef: System.Reflection.TypeAttributes get_At FSharp.Compiler.AbstractIL.IL+ILTypeDef: System.String Name FSharp.Compiler.AbstractIL.IL+ILTypeDef: System.String ToString() FSharp.Compiler.AbstractIL.IL+ILTypeDef: System.String get_Name() -FSharp.Compiler.AbstractIL.IL+ILTypeDef: Void .ctor(System.String, System.Reflection.TypeAttributes, ILTypeDefLayout, Microsoft.FSharp.Collections.FSharpList`1[FSharp.Compiler.AbstractIL.IL+ILType], Microsoft.FSharp.Collections.FSharpList`1[FSharp.Compiler.AbstractIL.IL+ILGenericParameterDef], Microsoft.FSharp.Core.FSharpOption`1[FSharp.Compiler.AbstractIL.IL+ILType], ILMethodDefs, ILTypeDefs, ILFieldDefs, ILMethodImplDefs, ILEventDefs, ILPropertyDefs, Boolean, ILSecurityDecls, ILAttributes) +FSharp.Compiler.AbstractIL.IL+ILTypeDef: Void .ctor(System.String, System.Reflection.TypeAttributes, ILTypeDefLayout, Microsoft.FSharp.Collections.FSharpList`1[FSharp.Compiler.AbstractIL.IL+ILType], Microsoft.FSharp.Collections.FSharpList`1[FSharp.Compiler.AbstractIL.IL+ILGenericParameterDef], Microsoft.FSharp.Core.FSharpOption`1[FSharp.Compiler.AbstractIL.IL+ILType], ILMethodDefs, ILTypeDefs, ILFieldDefs, ILMethodImplDefs, ILEventDefs, ILPropertyDefs, ILTypeDefAdditionalFlags, ILSecurityDecls, ILAttributesStored) FSharp.Compiler.AbstractIL.IL+ILTypeDefAccess+Nested: ILMemberAccess Item FSharp.Compiler.AbstractIL.IL+ILTypeDefAccess+Nested: ILMemberAccess get_Item() FSharp.Compiler.AbstractIL.IL+ILTypeDefAccess+Tags: Int32 Nested @@ -1574,6 +1576,10 @@ FSharp.Compiler.AbstractIL.IL+ILTypeDefAccess: Int32 GetHashCode(System.Collecti FSharp.Compiler.AbstractIL.IL+ILTypeDefAccess: Int32 Tag FSharp.Compiler.AbstractIL.IL+ILTypeDefAccess: Int32 get_Tag() FSharp.Compiler.AbstractIL.IL+ILTypeDefAccess: System.String ToString() +FSharp.Compiler.AbstractIL.IL+ILTypeDefAdditionalFlags: ILTypeDefAdditionalFlags CanContainExtensionMethods +FSharp.Compiler.AbstractIL.IL+ILTypeDefAdditionalFlags: ILTypeDefAdditionalFlags IsKnownToBeAttribute +FSharp.Compiler.AbstractIL.IL+ILTypeDefAdditionalFlags: ILTypeDefAdditionalFlags None +FSharp.Compiler.AbstractIL.IL+ILTypeDefAdditionalFlags: Int32 value__ FSharp.Compiler.AbstractIL.IL+ILTypeDefKind+Tags: Int32 Class FSharp.Compiler.AbstractIL.IL+ILTypeDefKind+Tags: Int32 Delegate FSharp.Compiler.AbstractIL.IL+ILTypeDefKind+Tags: Int32 Enum @@ -1853,6 +1859,7 @@ FSharp.Compiler.AbstractIL.IL: FSharp.Compiler.AbstractIL.IL+ILThisConvention FSharp.Compiler.AbstractIL.IL: FSharp.Compiler.AbstractIL.IL+ILType FSharp.Compiler.AbstractIL.IL: FSharp.Compiler.AbstractIL.IL+ILTypeDef FSharp.Compiler.AbstractIL.IL: FSharp.Compiler.AbstractIL.IL+ILTypeDefAccess +FSharp.Compiler.AbstractIL.IL: FSharp.Compiler.AbstractIL.IL+ILTypeDefAdditionalFlags FSharp.Compiler.AbstractIL.IL: FSharp.Compiler.AbstractIL.IL+ILTypeDefKind FSharp.Compiler.AbstractIL.IL: FSharp.Compiler.AbstractIL.IL+ILTypeDefLayout FSharp.Compiler.AbstractIL.IL: FSharp.Compiler.AbstractIL.IL+ILTypeDefs @@ -1866,6 +1873,9 @@ FSharp.Compiler.AbstractIL.IL: ILAttributes emptyILCustomAttrs FSharp.Compiler.AbstractIL.IL: ILAttributes get_emptyILCustomAttrs() FSharp.Compiler.AbstractIL.IL: ILAttributes mkILCustomAttrs(Microsoft.FSharp.Collections.FSharpList`1[FSharp.Compiler.AbstractIL.IL+ILAttribute]) FSharp.Compiler.AbstractIL.IL: ILAttributes mkILCustomAttrsFromArray(ILAttribute[]) +FSharp.Compiler.AbstractIL.IL: ILAttributesStored emptyILCustomAttrsStored +FSharp.Compiler.AbstractIL.IL: ILAttributesStored get_emptyILCustomAttrsStored() +FSharp.Compiler.AbstractIL.IL: ILAttributesStored mkILCustomAttrsComputed(Microsoft.FSharp.Core.FSharpFunc`2[Microsoft.FSharp.Core.Unit,FSharp.Compiler.AbstractIL.IL+ILAttribute[]]) FSharp.Compiler.AbstractIL.IL: ILAttributesStored storeILCustomAttrs(ILAttributes) FSharp.Compiler.AbstractIL.IL: ILEventDefs emptyILEvents FSharp.Compiler.AbstractIL.IL: ILEventDefs get_emptyILEvents() diff --git a/tests/FSharp.Compiler.Service.Tests/ModuleReaderCancellationTests.fs b/tests/FSharp.Compiler.Service.Tests/ModuleReaderCancellationTests.fs index 560dbceeb66..8038cb8ad38 100644 --- a/tests/FSharp.Compiler.Service.Tests/ModuleReaderCancellationTests.fs +++ b/tests/FSharp.Compiler.Service.Tests/ModuleReaderCancellationTests.fs @@ -115,10 +115,10 @@ type PreTypeDefData = mkILMethods [] let typeAttributes = TypeAttributes.Public - let customAttrs = mkILCustomAttrs [] + ILTypeDef(this.Name, typeAttributes, ILTypeDefLayout.Auto, [], [], - None, methodsDefs, mkILTypeDefs [], mkILFields [], emptyILMethodImpls, mkILEvents [], mkILProperties [], false, - emptyILSecurityDecls, customAttrs) + None, methodsDefs, mkILTypeDefs [], mkILFields [], emptyILMethodImpls, mkILEvents [], mkILProperties [], + ILTypeDefAdditionalFlags.None, emptyILSecurityDecls, emptyILCustomAttrsStored) type PreTypeDef(data: PreTypeDefData) = let typeDef = data.TypeDef