@@ -170,11 +170,8 @@ let splitTypeNameRight nm =
170170// --------------------------------------------------------------------
171171
172172/// This is used to store event, property and field maps.
173- type LazyOrderedMultiMap < 'Key , 'Data when 'Key: equality
174- #if ! NO_CHECKNULLS
175- and 'Key:not null
176- #endif
177- >( keyf : 'Data -> 'Key , lazyItems : InterruptibleLazy < 'Data list >) =
173+ type LazyOrderedMultiMap < 'Key , 'Data when 'Key: equality and 'Key: not null >( keyf : 'Data -> 'Key , lazyItems : InterruptibleLazy < 'Data list >)
174+ =
178175
179176 let quickMap =
180177 lazyItems
@@ -519,7 +516,11 @@ type ILAssemblyRef(data) =
519516
520517 let retargetable = aname.Flags = AssemblyNameFlags.Retargetable
521518
522- let name = match aname.Name with | null -> aname.FullName | name -> name
519+ let name =
520+ match aname.Name with
521+ | null -> aname.FullName
522+ | name -> name
523+
523524 ILAssemblyRef.Create( name, None, publicKey, retargetable, version, locale)
524525
525526 member aref.QualifiedName =
@@ -1862,7 +1863,7 @@ type ILGenericParameterDef =
18621863 Name: string
18631864 Constraints: ILTypes
18641865 Variance: ILGenericVariance
1865- HasReferenceTypeConstraint: bool
1866+ HasReferenceTypeConstraint: bool
18661867 HasNotNullableValueTypeConstraint: bool
18671868 HasDefaultConstructorConstraint: bool
18681869 HasAllowsRefStruct: bool
@@ -1910,7 +1911,11 @@ let inline conditionalAdd condition flagToAdd source =
19101911let NoMetadataIdx = - 1
19111912
19121913type InterfaceImpl =
1913- { Idx: int ; Type: ILType ; mutable CustomAttrsStored: ILAttributesStored }
1914+ {
1915+ Idx: int
1916+ Type: ILType
1917+ mutable CustomAttrsStored: ILAttributesStored
1918+ }
19141919
19151920 member x.CustomAttrs =
19161921 match x.CustomAttrsStored with
@@ -1919,12 +1924,16 @@ type InterfaceImpl =
19191924 x.CustomAttrsStored <- ILAttributesStored.Given res
19201925 res
19211926 | ILAttributesStored.Given attrs -> attrs
1922-
1923- static member Create ( ilType : ILType , customAttrsStored : ILAttributesStored ) =
1924- { Idx = NoMetadataIdx; Type = ilType; CustomAttrsStored = customAttrsStored }
19251927
1926- static member Create ( ilType : ILType ) = InterfaceImpl.Create( ilType, emptyILCustomAttrsStored)
1928+ static member Create ( ilType : ILType , customAttrsStored : ILAttributesStored ) =
1929+ {
1930+ Idx = NoMetadataIdx
1931+ Type = ilType
1932+ CustomAttrsStored = customAttrsStored
1933+ }
19271934
1935+ static member Create ( ilType : ILType ) =
1936+ InterfaceImpl.Create( ilType, emptyILCustomAttrsStored)
19281937
19291938[<NoComparison; NoEquality; StructuredFormatDisplay( " {DebugText}" ) >]
19301939type ILMethodDef
@@ -2575,17 +2584,15 @@ type ILTypeDefAdditionalFlags =
25752584 | CanContainExtensionMethods = 1024
25762585
25772586let internal typeKindFlags =
2578- ILTypeDefAdditionalFlags.Class |||
2579- ILTypeDefAdditionalFlags.ValueType |||
2580- ILTypeDefAdditionalFlags.Interface |||
2581- ILTypeDefAdditionalFlags.Enum |||
2582- ILTypeDefAdditionalFlags.Delegate
2587+ ILTypeDefAdditionalFlags.Class
2588+ ||| ILTypeDefAdditionalFlags.ValueType
2589+ ||| ILTypeDefAdditionalFlags.Interface
2590+ ||| ILTypeDefAdditionalFlags.Enum
2591+ ||| ILTypeDefAdditionalFlags.Delegate
25832592
2584- let inline internal resetTypeKind flags =
2585- flags &&& ~~~ typeKindFlags
2593+ let inline internal resetTypeKind flags = flags &&& ~~~ typeKindFlags
25862594
2587- let (| HasFlag | _ |) ( flag : ILTypeDefAdditionalFlags ) flags =
2588- flags &&& flag = flag
2595+ let (| HasFlag | _ |) ( flag : ILTypeDefAdditionalFlags ) flags = flags &&& flag = flag
25892596
25902597let inline typeKindByNames extendsName typeName =
25912598 match extendsName with
@@ -2676,21 +2683,24 @@ type ILTypeDef
26762683
26772684 let hasFlag flag = additionalFlags &&& flag = flag
26782685
2679- new ( name,
2680- attributes,
2681- layout,
2682- implements,
2683- genericParams,
2684- extends,
2685- methods,
2686- nestedTypes,
2687- fields,
2688- methodImpls,
2689- events,
2690- properties,
2691- additionalFlags,
2692- securityDecls,
2693- customAttrs) =
2686+ new
2687+ (
2688+ name,
2689+ attributes,
2690+ layout,
2691+ implements,
2692+ genericParams,
2693+ extends,
2694+ methods,
2695+ nestedTypes,
2696+ fields,
2697+ methodImpls,
2698+ events,
2699+ properties,
2700+ additionalFlags,
2701+ securityDecls,
2702+ customAttrs
2703+ ) =
26942704 ILTypeDef(
26952705 name,
26962706 attributes,
@@ -2710,23 +2720,27 @@ type ILTypeDef
27102720 NoMetadataIdx
27112721 )
27122722
2713- new ( name,
2714- attributes,
2715- layout,
2716- implements,
2717- genericParams,
2718- extends,
2719- methods,
2720- nestedTypes,
2721- fields,
2722- methodImpls,
2723- events,
2724- properties,
2725- securityDecls,
2726- customAttrs) =
2723+ new
2724+ (
2725+ name,
2726+ attributes,
2727+ layout,
2728+ implements,
2729+ genericParams,
2730+ extends,
2731+ methods,
2732+ nestedTypes,
2733+ fields,
2734+ methodImpls,
2735+ events,
2736+ properties,
2737+ securityDecls,
2738+ customAttrs
2739+ ) =
27272740 let additionalFlags =
2728- ILTypeDefAdditionalFlags.CanContainExtensionMethods |||
2729- typeKindOfFlags name extends ( int attributes)
2741+ ILTypeDefAdditionalFlags.CanContainExtensionMethods
2742+ ||| typeKindOfFlags name extends ( int attributes)
2743+
27302744 ILTypeDef(
27312745 name,
27322746 attributes,
@@ -2955,10 +2969,10 @@ and [<NoEquality; NoComparison>] ILPreTypeDef =
29552969and [<Sealed>] ILPreTypeDefImpl ( nameSpace : string list , name : string , metadataIndex : int32 , storage : ILTypeDefStored ) =
29562970 let stored =
29572971 lazy
2958- match storage with
2959- | ILTypeDefStored.Given td -> td
2960- | ILTypeDefStored.Computed f -> f ()
2961- | ILTypeDefStored.Reader f -> f metadataIndex
2972+ match storage with
2973+ | ILTypeDefStored.Given td -> td
2974+ | ILTypeDefStored.Computed f -> f ()
2975+ | ILTypeDefStored.Reader f -> f metadataIndex
29622976
29632977 interface ILPreTypeDef with
29642978 member _.Namespace = nameSpace
@@ -4248,25 +4262,31 @@ let mkILStorageCtorWithParamNames (preblock: ILInstr list, ty, extraParams, flds
42484262 | Some x -> I_ seqpoint x
42494263 | None -> ()
42504264 yield ! preblock
4251- for ( n, (_ pnm, nm, fieldTy,_ attrs)) in List.indexed flds do
4265+ for ( n, (_ pnm, nm, fieldTy, _ attrs)) in List.indexed flds do
42524266 mkLdarg0
42534267 mkLdarg ( uint16 ( n + 1 ))
42544268 mkNormalStfld ( mkILFieldSpecInTy ( ty, nm, fieldTy))
42554269 ]
42564270
42574271 let body = mkMethodBody ( false , [], 2 , nonBranchingInstrsToCode code, tag, imports)
4258- let fieldParams =
4272+
4273+ let fieldParams =
42594274 [
4260- for ( pnm,_, ty, attrs) in flds do
4275+ for ( pnm, _, ty, attrs) in flds do
42614276 let ilParam = mkILParamNamed ( pnm, ty)
4277+
42624278 let ilParam =
42634279 match attrs with
42644280 | [] -> ilParam
4265- | attrs -> { ilParam with CustomAttrsStored = storeILCustomAttrs ( mkILCustomAttrs attrs ) }
4281+ | attrs ->
4282+ { ilParam with
4283+ CustomAttrsStored = storeILCustomAttrs ( mkILCustomAttrs attrs)
4284+ }
4285+
42664286 yield ilParam
4267- ]
4287+ ]
42684288
4269- mkILCtor ( access, fieldParams @ extraParams , body)
4289+ mkILCtor ( access, fieldParams @ extraParams, body)
42704290
42714291let mkILSimpleStorageCtorWithParamNames ( baseTySpec , ty , extraParams , flds , access , tag , imports ) =
42724292 let preblock =
0 commit comments