@@ -33,8 +33,6 @@ open System.Reflection
3333
3434#nowarn " 9"
3535
36- let primaryAssemblyILGlobals = mkILGlobals ( ILScopeRef.PrimaryAssembly, [])
37-
3836let checking = false
3937let logging = false
4038let _ = if checking then dprintn " warning: ILBinaryReader.checking is on"
@@ -1717,7 +1715,7 @@ and seekReadTypeDefOrRefAsTypeRef (ctxt: ILMetadataReader) (TaggedIndex(tag, idx
17171715 | tag when tag = tdor_ TypeRef -> seekReadTypeRef ctxt idx
17181716 | tag when tag = tdor_ TypeSpec ->
17191717 dprintn ( " type spec used where a type ref or def is required" )
1720- primaryAssemblyILGlobals .typ_ Object.TypeRef
1718+ PrimaryAssemblyILGlobals .typ_ Object.TypeRef
17211719 | _ -> failwith " seekReadTypeDefOrRefAsTypeRef_readTypeDefOrRefOrSpec"
17221720
17231721and seekReadMethodRefParent ( ctxt : ILMetadataReader ) mdv numtypars ( TaggedIndex ( tag , idx )) =
@@ -1835,22 +1833,22 @@ and sigptrGetTypeDefOrRefOrSpecIdx bytes sigptr =
18351833
18361834and sigptrGetTy ( ctxt : ILMetadataReader ) numtypars bytes sigptr =
18371835 let b0 , sigptr = sigptrGetByte bytes sigptr
1838- if b0 = et_ OBJECT then primaryAssemblyILGlobals .typ_ Object, sigptr
1839- elif b0 = et_ STRING then primaryAssemblyILGlobals .typ_ String, sigptr
1840- elif b0 = et_ I1 then primaryAssemblyILGlobals .typ_ SByte, sigptr
1841- elif b0 = et_ I2 then primaryAssemblyILGlobals .typ_ Int16, sigptr
1842- elif b0 = et_ I4 then primaryAssemblyILGlobals .typ_ Int32, sigptr
1843- elif b0 = et_ I8 then primaryAssemblyILGlobals .typ_ Int64, sigptr
1844- elif b0 = et_ I then primaryAssemblyILGlobals .typ_ IntPtr, sigptr
1845- elif b0 = et_ U1 then primaryAssemblyILGlobals .typ_ Byte, sigptr
1846- elif b0 = et_ U2 then primaryAssemblyILGlobals .typ_ UInt16, sigptr
1847- elif b0 = et_ U4 then primaryAssemblyILGlobals .typ_ UInt32, sigptr
1848- elif b0 = et_ U8 then primaryAssemblyILGlobals .typ_ UInt64, sigptr
1849- elif b0 = et_ U then primaryAssemblyILGlobals .typ_ UIntPtr, sigptr
1850- elif b0 = et_ R4 then primaryAssemblyILGlobals .typ_ Single, sigptr
1851- elif b0 = et_ R8 then primaryAssemblyILGlobals .typ_ Double, sigptr
1852- elif b0 = et_ CHAR then primaryAssemblyILGlobals .typ_ Char, sigptr
1853- elif b0 = et_ BOOLEAN then primaryAssemblyILGlobals .typ_ Bool, sigptr
1836+ if b0 = et_ OBJECT then PrimaryAssemblyILGlobals .typ_ Object, sigptr
1837+ elif b0 = et_ STRING then PrimaryAssemblyILGlobals .typ_ String, sigptr
1838+ elif b0 = et_ I1 then PrimaryAssemblyILGlobals .typ_ SByte, sigptr
1839+ elif b0 = et_ I2 then PrimaryAssemblyILGlobals .typ_ Int16, sigptr
1840+ elif b0 = et_ I4 then PrimaryAssemblyILGlobals .typ_ Int32, sigptr
1841+ elif b0 = et_ I8 then PrimaryAssemblyILGlobals .typ_ Int64, sigptr
1842+ elif b0 = et_ I then PrimaryAssemblyILGlobals .typ_ IntPtr, sigptr
1843+ elif b0 = et_ U1 then PrimaryAssemblyILGlobals .typ_ Byte, sigptr
1844+ elif b0 = et_ U2 then PrimaryAssemblyILGlobals .typ_ UInt16, sigptr
1845+ elif b0 = et_ U4 then PrimaryAssemblyILGlobals .typ_ UInt32, sigptr
1846+ elif b0 = et_ U8 then PrimaryAssemblyILGlobals .typ_ UInt64, sigptr
1847+ elif b0 = et_ U then PrimaryAssemblyILGlobals .typ_ UIntPtr, sigptr
1848+ elif b0 = et_ R4 then PrimaryAssemblyILGlobals .typ_ Single, sigptr
1849+ elif b0 = et_ R8 then PrimaryAssemblyILGlobals .typ_ Double, sigptr
1850+ elif b0 = et_ CHAR then PrimaryAssemblyILGlobals .typ_ Char, sigptr
1851+ elif b0 = et_ BOOLEAN then PrimaryAssemblyILGlobals .typ_ Bool, sigptr
18541852 elif b0 = et_ WITH then
18551853 let b0 , sigptr = sigptrGetByte bytes sigptr
18561854 let tdorIdx , sigptr = sigptrGetTypeDefOrRefOrSpecIdx bytes sigptr
@@ -1896,7 +1894,7 @@ and sigptrGetTy (ctxt: ILMetadataReader) numtypars bytes sigptr =
18961894
18971895 elif b0 = et_ VOID then ILType.Void, sigptr
18981896 elif b0 = et_ TYPEDBYREF then
1899- primaryAssemblyILGlobals .typ_ TypedReference, sigptr
1897+ PrimaryAssemblyILGlobals .typ_ TypedReference, sigptr
19001898 elif b0 = et_ CMOD_ REQD || b0 = et_ CMOD_ OPT then
19011899 let tdorIdx , sigptr = sigptrGetTypeDefOrRefOrSpecIdx bytes sigptr
19021900 let ty , sigptr = sigptrGetTy ctxt numtypars bytes sigptr
0 commit comments