@@ -29,8 +29,6 @@ let _ =
2929 if logging then
3030 dprintn " * warning: Il.logging is on"
3131
32- let int_order = LanguagePrimitives.FastGenericComparer< int>
33-
3432let notlazy v = Lazy<_>. CreateFromValue v
3533
3634/// A little ugly, but the idea is that if a data structure does not
@@ -99,8 +97,6 @@ let rec splitNamespaceAux (nm: string) =
9997let splitNamespace nm =
10098 memoizeNamespaceTable.GetOrAdd( nm, splitNamespaceAux)
10199
102- let splitNamespaceMemoized nm = splitNamespace nm
103-
104100// ++GLOBAL MUTABLE STATE (concurrency-safe)
105101let memoizeNamespaceArrayTable = ConcurrentDictionary< string, string[]>()
106102
@@ -152,11 +148,6 @@ splitILTypeNameWithPossibleStaticArguments "Foo.Bar,\"1.0\"" = ([| "Foo" |], "Ba
152148splitILTypeNameWithPossibleStaticArguments "Foo.Bar.Bar,\"1.0\"" = ([| "Foo"; "Bar" |], "Bar,\"1.0\"")
153149*)
154150
155- let unsplitTypeName ( ns , n ) =
156- match ns with
157- | [] -> String.concat " ." ns + " ." + n
158- | _ -> n
159-
160151let splitTypeNameRightAux ( nm : string ) =
161152 let idx = nm.LastIndexOf '.'
162153
@@ -434,8 +425,6 @@ type AssemblyRefData =
434425/// Global state: table of all assembly references keyed by AssemblyRefData.
435426let AssemblyRefUniqueStampGenerator = UniqueStampGenerator< AssemblyRefData>()
436427
437- let isMscorlib data = data.assemRefName = " mscorlib"
438-
439428[<Sealed>]
440429type ILAssemblyRef ( data ) =
441430 let pkToken key =
@@ -3249,9 +3238,6 @@ let mkILMethods xs =
32493238let mkILMethodsComputed f = ILMethodDefs f
32503239let emptyILMethods = mkILMethodsFromArray [||]
32513240
3252- let filterILMethodDefs f ( mdefs : ILMethodDefs ) =
3253- ILMethodDefs( fun () -> mdefs.AsArray() |> Array.filter f)
3254-
32553241// --------------------------------------------------------------------
32563242// Operations and defaults for modules, assemblies etc.
32573243// --------------------------------------------------------------------
@@ -3460,11 +3446,6 @@ let mkLdcInt32 i =
34603446 else
34613447 AI_ ldc( DT_ I4, ILConst.I4 i)
34623448
3463- let tname_CompilerGeneratedAttribute =
3464- " System.Runtime.CompilerServices.CompilerGeneratedAttribute"
3465-
3466- let tname_DebuggableAttribute = " System.Diagnostics.DebuggableAttribute"
3467-
34683449(* NOTE: ecma_ prefix refers to the standard "mscorlib" *)
34693450let ecmaPublicKey =
34703451 PublicKeyToken( Bytes.ofInt32Array [| 0xde ; 0xad ; 0xbe ; 0xef ; 0xca ; 0xfe ; 0xfa ; 0xce |])
@@ -3819,14 +3800,6 @@ let mkILClassCtor impl =
38193800 body = notlazy impl
38203801 )
38213802
3822- // --------------------------------------------------------------------
3823- // Make a virtual method, where the overriding is simply the default
3824- // (i.e. overrides by name/signature)
3825- // --------------------------------------------------------------------
3826-
3827- let mk_ospec ( ty : ILType , callconv , nm , genparams , formal_args , formal_ret ) =
3828- OverridesSpec( mkILMethRef ( ty.TypeRef, callconv, nm, genparams, formal_ args, formal_ ret), ty)
3829-
38303803let mkILGenericVirtualMethod ( nm , callconv : ILCallingConv , access , genparams , actual_args , actual_ret , impl ) =
38313804 let attributes =
38323805 convertMemberAccess access
@@ -3953,11 +3926,6 @@ let cdef_cctorCode2CodeOrCreate tag imports f (cd: ILTypeDef) =
39533926
39543927 cd.With( methods = methods)
39553928
3956- let codeOfMethodDef ( md : ILMethodDef ) =
3957- match md.Code with
3958- | Some x -> x
3959- | None -> failwith " codeOfmdef: not IL"
3960-
39613929let mkRefToILMethod ( tref , md : ILMethodDef ) =
39623930 mkILMethRef ( tref, md.CallingConv, md.Name, md.GenericParams.Length, md.ParameterTypes, md.Return.Type)
39633931
@@ -4363,10 +4331,6 @@ let computeILEnumInfo (mdName, mdFields: ILFieldDefs) =
43634331
43644332let sigptr_get_byte bytes sigptr = Bytes.get bytes sigptr, sigptr + 1
43654333
4366- let sigptr_get_bool bytes sigptr =
4367- let b0 , sigptr = sigptr_ get_ byte bytes sigptr
4368- ( b0 = 0x01 ), sigptr
4369-
43704334let sigptr_get_u8 bytes sigptr =
43714335 let b0 , sigptr = sigptr_ get_ byte bytes sigptr
43724336 byte b0, sigptr
@@ -4490,11 +4454,6 @@ let mkRefToILAssembly (m: ILAssemblyManifest) =
44904454 m.Locale
44914455 )
44924456
4493- let z_unsigned_int_size n =
4494- if n <= 0x7F then 1
4495- elif n <= 0x3FFF then 2
4496- else 3
4497-
44984457let z_unsigned_int n =
44994458 if n >= 0 && n <= 0x7F then
45004459 [| byte n |]
@@ -4555,8 +4514,6 @@ let ieee32AsBytes i = i32AsBytes (bitsOfSingle i)
45554514
45564515let ieee64AsBytes i = i64AsBytes ( bitsOfDouble i)
45574516
4558- let et_END = 0x00 uy
4559- let et_VOID = 0x01 uy
45604517let et_BOOLEAN = 0x02 uy
45614518let et_CHAR = 0x03 uy
45624519let et_I1 = 0x04 uy
@@ -4570,22 +4527,8 @@ let et_U8 = 0x0Buy
45704527let et_R4 = 0x0C uy
45714528let et_R8 = 0x0D uy
45724529let et_STRING = 0x0E uy
4573- let et_PTR = 0x0F uy
4574- let et_BYREF = 0x10 uy
4575- let et_VALUETYPE = 0x11 uy
4576- let et_CLASS = 0x12 uy
4577- let et_VAR = 0x13 uy
4578- let et_ARRAY = 0x14 uy
4579- let et_WITH = 0x15 uy
4580- let et_TYPEDBYREF = 0x16 uy
4581- let et_I = 0x18 uy
4582- let et_U = 0x19 uy
4583- let et_FNPTR = 0x1B uy
45844530let et_OBJECT = 0x1C uy
45854531let et_SZARRAY = 0x1D uy
4586- let et_MVAR = 0x1E uy
4587- let et_CMOD_REQD = 0x1F uy
4588- let et_CMOD_OPT = 0x20 uy
45894532
45904533let formatILVersion ( version : ILVersionInfo ) =
45914534 sprintf " %d .%d .%d .%d " ( int version.Major) ( int version.Minor) ( int version.Build) ( int version.Revision)
0 commit comments