@@ -7,20 +7,6 @@ module internal Microsoft.FSharp.Compiler.AbstractIL.IL
77open Internal.Utilities
88open System.Collections .Generic
99
10- /// The type used to store relatively small lists in the Abstract IL data structures, i.e. for ILTypes, ILGenericArgs, ILParameters and ILLocals.
11- /// See comments in il.fs for why we've isolated this representation and the possible future choices we might use here.
12- #if ABSIL_ USES_ ARRAY_ FOR_ ILLIST
13- type ILList < 'T > = 'T []
14- #endif
15-
16- #if ABSIL_ USES_ THREELIST_ FOR_ ILLIST
17- type ILList < 'T > = ThreeList< 'T>
18- #endif
19-
20- //#if ABSIL_USES_LIST_FOR_ILLIST
21- type ILList < 'T > = 'T list
22- //#endif
23-
2410type PrimaryAssembly =
2511 | Mscorlib
2612 | DotNetCore
@@ -361,28 +347,8 @@ and [<StructuralEquality; StructuralComparison>]
361347/// Actual generic parameters are always types.
362348
363349
364- and ILGenericArgs = ILList< ILType>
365- and ILTypes = ILList< ILType>
366-
367-
368- [<CompilationRepresentation( CompilationRepresentationFlags.ModuleSuffix) >]
369- module ILList =
370- val inline map : ( 'T -> 'U ) -> ILList < 'T > -> ILList < 'U >
371- val inline mapi : ( int -> 'T -> 'U ) -> ILList < 'T > -> ILList < 'U >
372- val inline isEmpty : ILList < 'T > -> bool
373- val inline toList : ILList < 'T > -> 'T list
374- val inline ofList : 'T list -> ILList < 'T >
375- val inline lengthsEqAndForall2 : ( 'T -> 'U -> bool ) -> ILList < 'T > -> ILList < 'U > -> bool
376- val inline init : int -> ( int -> 'T ) -> ILList < 'T >
377- val inline empty < 'T > : ILList < 'T >
378- val inline toArray : ILList < 'T > -> 'T []
379- val inline ofArray : 'T [] -> ILList < 'T >
380- val inline nth : ILList < 'T > -> int -> 'T
381- val inline iter : ( 'T -> unit ) -> ILList < 'T > -> unit
382- val inline iteri : ( int -> 'T -> unit ) -> ILList < 'T > -> unit
383- val inline foldBack : ( 'T -> 'State -> 'State ) -> ILList < 'T > -> 'State -> 'State
384- val inline exists : ( 'T -> bool ) -> ILList < 'T > -> bool
385-
350+ and ILGenericArgs = list< ILType>
351+ and ILTypes = list< ILType>
386352
387353/// Formal identities of methods. Method refs refer to methods on
388354/// named types. In general you should work with ILMethodSpec objects
@@ -817,8 +783,7 @@ type ILLocal =
817783 IsPinned: bool ;
818784 DebugInfo: ( string * int * int ) option }
819785
820-
821- type ILLocals = ILList< ILLocal>
786+ type ILLocals = list< ILLocal>
822787
823788/// IL method bodies
824789[<RequireQualifiedAccess; NoComparison; NoEquality>]
@@ -891,10 +856,9 @@ type ILParameter =
891856 IsOptional: bool ;
892857 CustomAttrs: ILAttributes }
893858
894- type ILParameters = ILList < ILParameter>
859+ type ILParameters = list < ILParameter>
895860
896- val typesOfILParamsRaw : ILParameters -> ILTypes
897- val typesOfILParamsList : ILParameter list -> ILType list
861+ val typesOfILParams : ILParameters -> ILType list
898862
899863/// Method return values.
900864[<RequireQualifiedAccess; NoEquality; NoComparison>]
@@ -1658,7 +1622,6 @@ val decodeILAttribData:
16581622val mkSimpleAssRef : string -> ILAssemblyRef
16591623val mkSimpleModRef : string -> ILModuleRef
16601624
1661- val emptyILGenericArgs : ILGenericArgs
16621625val mkILTyvarTy : uint16 -> ILType
16631626
16641627/// Make type refs.
@@ -1667,18 +1630,15 @@ val mkILTyRef: ILScopeRef * string -> ILTypeRef
16671630val mkILTyRefInTyRef : ILTypeRef * string -> ILTypeRef
16681631
16691632type ILGenericArgsList = ILType list
1670- val mkILGenericArgs : ILGenericArgsList -> ILGenericArgs
1633+
16711634/// Make type specs.
16721635val mkILNonGenericTySpec : ILTypeRef -> ILTypeSpec
16731636val mkILTySpec : ILTypeRef * ILGenericArgsList -> ILTypeSpec
1674- val mkILTySpecRaw : ILTypeRef * ILGenericArgs -> ILTypeSpec
16751637
16761638/// Make types.
16771639val mkILTy : ILBoxity -> ILTypeSpec -> ILType
16781640val mkILNamedTy : ILBoxity -> ILTypeRef -> ILGenericArgsList -> ILType
1679- val mkILNamedTyRaw : ILBoxity -> ILTypeRef -> ILGenericArgs -> ILType
16801641val mkILBoxedTy : ILTypeRef -> ILGenericArgsList -> ILType
1681- val mkILBoxedTyRaw : ILTypeRef -> ILGenericArgs -> ILType
16821642val mkILValueTy : ILTypeRef -> ILGenericArgsList -> ILType
16831643val mkILNonGenericBoxedTy : ILTypeRef -> ILType
16841644val mkILNonGenericValueTy : ILTypeRef -> ILType
@@ -1688,16 +1648,11 @@ val isILArrTy: ILType -> bool
16881648val destILArrTy : ILType -> ILArrayShape * ILType
16891649val mkILBoxedType : ILTypeSpec -> ILType
16901650
1691- val mkILTypes : ILType list -> ILTypes
1692-
16931651/// Make method references and specs.
1694- val mkILMethRefRaw : ILTypeRef * ILCallingConv * string * int * ILTypes * ILType -> ILMethodRef
16951652val mkILMethRef : ILTypeRef * ILCallingConv * string * int * ILType list * ILType -> ILMethodRef
16961653val mkILMethSpec : ILMethodRef * ILBoxity * ILGenericArgsList * ILGenericArgsList -> ILMethodSpec
1697- val mkILMethSpecForMethRefInTyRaw : ILMethodRef * ILType * ILGenericArgs -> ILMethodSpec
16981654val mkILMethSpecForMethRefInTy : ILMethodRef * ILType * ILGenericArgsList -> ILMethodSpec
16991655val mkILMethSpecInTy : ILType * ILCallingConv * string * ILType list * ILType * ILGenericArgsList -> ILMethodSpec
1700- val mkILMethSpecInTyRaw : ILType * ILCallingConv * string * ILTypes * ILType * ILGenericArgs -> ILMethodSpec
17011656
17021657/// Construct references to methods on a given type .
17031658val mkILNonGenericMethSpecInTy : ILType * ILCallingConv * string * ILType list * ILType -> ILMethodSpec
@@ -1722,17 +1677,14 @@ val mkILFieldRef: ILTypeRef * string * ILType -> ILFieldRef
17221677val mkILFieldSpec : ILFieldRef * ILType -> ILFieldSpec
17231678val mkILFieldSpecInTy : ILType * string * ILType -> ILFieldSpec
17241679
1725- val mkILCallSigRaw : ILCallingConv * ILTypes * ILType -> ILCallingSignature
17261680val mkILCallSig : ILCallingConv * ILType list * ILType -> ILCallingSignature
17271681
17281682/// Make generalized verions of possibly - generic types ,
17291683/// e.g. Given the ILTypeDef for List , return the type "List < T > ".
17301684val mkILFormalBoxedTy : ILTypeRef -> ILGenericParameterDef list -> ILType
17311685val mkILFormalNamedTy : ILBoxity -> ILTypeRef -> ILGenericParameterDef list -> ILType
17321686
1733- val mkILFormalTyparsRaw : ILTypes -> ILGenericParameterDefs
17341687val mkILFormalTypars : ILType list -> ILGenericParameterDefs
1735- val mkILFormalGenericArgsRaw : ILGenericParameterDefs -> ILGenericArgs
17361688val mkILFormalGenericArgs : ILGenericParameterDefs -> ILGenericArgsList
17371689val mkILSimpleTypar : string -> ILGenericParameterDef
17381690/// Make custom attributes.
@@ -1794,8 +1746,6 @@ val mkILParamAnon: ILType -> ILParameter
17941746val mkILParamNamed : string * ILType -> ILParameter
17951747val mkILReturn : ILType -> ILReturn
17961748val mkILLocal : ILType -> ( string * int * int ) option -> ILLocal
1797- val mkILLocals : ILLocal list -> ILLocals
1798- val emptyILLocals : ILLocals
17991749
18001750/// Make a formal generic parameters.
18011751val mkILEmptyGenericParams : ILGenericParameterDefs
0 commit comments