@@ -21,7 +21,6 @@ open System.Text
2121open System.Threading
2222
2323open FSharp.Compiler .AbstractIL .Diagnostics
24- open Internal.Utilities .Library
2524open Internal.Utilities
2625
2726let logging = false
@@ -83,7 +82,7 @@ let splitNameAt (nm: string) idx =
8382 if idx > last then
8483 failwith " splitNameAt: idx > last"
8584
86- ( nm.Substring( 0 , idx) ), ( if idx < last then nm.Substring( idx + 1 , last - idx) else " " )
85+ nm.Substring( 0 , idx), ( if idx < last then nm.Substring( idx + 1 , last - idx) else " " )
8786
8887let rec splitNamespaceAux ( nm : string ) =
8988 match nm.IndexOf '.' with
@@ -771,13 +770,13 @@ type ILTypeRef =
771770 let isPrimaryY = isPrimary y
772771
773772 let xApproxId =
774- if isPrimaryX && not ( isPrimaryY) then
773+ if isPrimaryX && not isPrimaryY then
775774 ILTypeRef.ComputeHash( primaryScopeRef, x.Enclosing, x.Name)
776775 else
777776 x.ApproxId
778777
779778 let yApproxId =
780- if isPrimaryY && not ( isPrimaryX) then
779+ if isPrimaryY && not isPrimaryX then
781780 ILTypeRef.ComputeHash( primaryScopeRef, y.Enclosing, y.Name)
782781 else
783782 y.ApproxId
@@ -2284,10 +2283,10 @@ type ILEventDef
22842283 | Some attrs -> attrs)
22852284 )
22862285
2287- member x.IsSpecialName = ( x.Attributes &&& EventAttributes.SpecialName) <> enum <_> ( 0 )
2286+ member x.IsSpecialName = ( x.Attributes &&& EventAttributes.SpecialName) <> enum <_> 0
22882287
22892288 member x.IsRTSpecialName =
2290- ( x.Attributes &&& EventAttributes.RTSpecialName) <> enum <_> ( 0 )
2289+ ( x.Attributes &&& EventAttributes.RTSpecialName) <> enum <_> 0
22912290
22922291 /// For debugging
22932292 [<DebuggerBrowsable( DebuggerBrowsableState.Never) >]
@@ -2362,11 +2361,10 @@ type ILPropertyDef
23622361 | Some attrs -> attrs)
23632362 )
23642363
2365- member x.IsSpecialName =
2366- ( x.Attributes &&& PropertyAttributes.SpecialName) <> enum <_> ( 0 )
2364+ member x.IsSpecialName = ( x.Attributes &&& PropertyAttributes.SpecialName) <> enum <_> 0
23672365
23682366 member x.IsRTSpecialName =
2369- ( x.Attributes &&& PropertyAttributes.RTSpecialName) <> enum <_> ( 0 )
2367+ ( x.Attributes &&& PropertyAttributes.RTSpecialName) <> enum <_> 0
23702368
23712369 /// For debugging
23722370 [<DebuggerBrowsable( DebuggerBrowsableState.Never) >]
@@ -2388,7 +2386,7 @@ type ILPropertyDefs =
23882386let convertFieldAccess ( ilMemberAccess : ILMemberAccess ) =
23892387 match ilMemberAccess with
23902388 | ILMemberAccess.Assembly -> FieldAttributes.Assembly
2391- | ILMemberAccess.CompilerControlled -> enum < FieldAttributes> ( 0 )
2389+ | ILMemberAccess.CompilerControlled -> enum < FieldAttributes> 0
23922390 | ILMemberAccess.FamilyAndAssembly -> FieldAttributes.FamANDAssem
23932391 | ILMemberAccess.FamilyOrAssembly -> FieldAttributes.FamORAssem
23942392 | ILMemberAccess.Family -> FieldAttributes.Family
@@ -2828,7 +2826,7 @@ type ILTypeDef
28282826 events = defaultArg events x.Events,
28292827 properties = defaultArg properties x.Properties,
28302828 additionalFlags = defaultArg newAdditionalFlags additionalFlags,
2831- customAttrs = defaultArg customAttrs ( x.CustomAttrsStored)
2829+ customAttrs = defaultArg customAttrs x.CustomAttrsStored
28322830 )
28332831
28342832 member x.CustomAttrs : ILAttributes =
@@ -3017,7 +3015,7 @@ and [<NoComparison; NoEquality>] ILExportedTypeOrForwarder =
30173015
30183016 member x.Access = typeAccessOfFlags ( int x.Attributes)
30193017
3020- member x.IsForwarder = x.Attributes &&& enum < TypeAttributes> ( 0x00200000 ) <> enum 0
3018+ member x.IsForwarder = x.Attributes &&& enum < TypeAttributes> 0x00200000 <> enum 0
30213019
30223020 member x.CustomAttrs = x.CustomAttrsStored.GetCustomAttrs x.MetadataIndex
30233021
@@ -4256,7 +4254,7 @@ let mkTypeForwarder scopeRef name nested customAttrs access =
42564254 {
42574255 ScopeRef = scopeRef
42584256 Name = name
4259- Attributes = enum < TypeAttributes> ( 0x00200000 ) ||| convertTypeAccessFlags access
4257+ Attributes = enum < TypeAttributes> 0x00200000 ||| convertTypeAccessFlags access
42604258 Nested = nested
42614259 CustomAttrsStored = storeILCustomAttrs customAttrs
42624260 MetadataIndex = NoMetadataIdx
@@ -4293,7 +4291,7 @@ let mkILStorageCtorWithParamNames (preblock: ILInstr list, ty, extraParams, flds
42934291 | Some x -> I_ seqpoint x
42944292 | None -> ()
42954293 yield ! preblock
4296- for ( n, (_ pnm, nm, fieldTy, _ attrs) ) in List.indexed flds do
4294+ for n, (_ pnm, nm, fieldTy, _ attrs) in List.indexed flds do
42974295 mkLdarg0
42984296 mkLdarg ( uint16 ( n + 1 ))
42994297 mkNormalStfld ( mkILFieldSpecInTy ( ty, nm, fieldTy))
@@ -4303,7 +4301,7 @@ let mkILStorageCtorWithParamNames (preblock: ILInstr list, ty, extraParams, flds
43034301
43044302 let fieldParams =
43054303 [
4306- for ( pnm, _, ty, attrs) in flds do
4304+ for pnm, _, ty, attrs in flds do
43074305 let ilParam = mkILParamNamed ( pnm, ty)
43084306
43094307 let ilParam =
@@ -5130,17 +5128,17 @@ type ILTypeSigParser(tstring: string) =
51305128 drop () // step to the number
51315129 // fetch the arity
51325130 let arity =
5133- while ( int ( here ()) >= ( int ( '0' ) ))
5134- && ( int ( here ()) <= ( int ( '9' ) ))
5135- && ( int ( peek ()) >= ( int ( '0' ) ))
5136- && ( int ( peek ()) <= ( int ( '9' ) )) do
5131+ while ( int ( here ()) >= ( int '0' ))
5132+ && ( int ( here ()) <= ( int '9' ))
5133+ && ( int ( peek ()) >= ( int '0' ))
5134+ && ( int ( peek ()) <= ( int '9' )) do
51375135 step ()
51385136
51395137 Int32.Parse( take ())
51405138 // skip the '['
51415139 drop ()
51425140 // get the specializations
5143- typeName + " `" + ( arity.ToString() ),
5141+ typeName + " `" + arity.ToString(),
51445142 Some
51455143 [
51465144 for _ i in 0 .. arity - 1 do
0 commit comments