From e3e7b27e198616d630c65650152d3efe559b8168 Mon Sep 17 00:00:00 2001 From: Vlad Zarytovskii Date: Mon, 6 Feb 2023 13:08:31 +0100 Subject: [PATCH 1/4] Revert generating isreadonly --- src/Compiler/CodeGen/IlxGen.fs | 10 +- .../EmittedIL/Misc/Structs02.fs.il.debug.bsl | 3 +- .../Misc/Structs02.fs.il.release.bsl | 21 +- .../FloatsAndDoubles.fs.il.debug.bsl | 2 - .../FloatsAndDoubles.fs.il.release.bsl | 294 +++++++++--------- .../FSharp.Compiler.ComponentTests.fsproj | 2 +- 6 files changed, 164 insertions(+), 168 deletions(-) diff --git a/src/Compiler/CodeGen/IlxGen.fs b/src/Compiler/CodeGen/IlxGen.fs index 3a9be64b136..7a7178ddf79 100644 --- a/src/Compiler/CodeGen/IlxGen.fs +++ b/src/Compiler/CodeGen/IlxGen.fs @@ -613,8 +613,9 @@ let GenReadOnlyAttribute (g: TcGlobals) = mkILCustomAttribute (g.attrib_IsReadOnlyAttribute.TypeRef, [], [], []) let GenReadOnlyAttributeIfNecessary (g: TcGlobals) ty = - let add = - g.isSystem_Runtime_CompilerServices_IsReadOnlyAttributeAvailable + let add = + false + && g.isSystem_Runtime_CompilerServices_IsReadOnlyAttributeAvailable && isInByrefTy g ty && g.attrib_IsReadOnlyAttribute.TyconRef.CanDeref @@ -2088,7 +2089,7 @@ type AnonTypeGenerationTable() = [ for propName, fldName, fldTy in flds -> let attrs = - if g.isSystem_Runtime_CompilerServices_IsReadOnlyAttributeAvailable && isStruct then + if false && g.isSystem_Runtime_CompilerServices_IsReadOnlyAttributeAvailable && isStruct then [ GenReadOnlyAttribute g ] else [] @@ -10893,7 +10894,8 @@ and GenTypeDef cenv mgbuf lazyInitInfo eenv m (tycon: Tycon) = let attrs = if - g.isSystem_Runtime_CompilerServices_IsReadOnlyAttributeAvailable + false + && g.isSystem_Runtime_CompilerServices_IsReadOnlyAttributeAvailable && isStruct && not isStatic then diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/Structs02.fs.il.debug.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/Structs02.fs.il.debug.bsl index 61f2dd9be84..d9ea241fa63 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/Structs02.fs.il.debug.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/Structs02.fs.il.debug.bsl @@ -64,9 +64,8 @@ .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 03 00 00 00 00 00 ) .field assembly int32 hash@ .method public hidebysig specialname - instance int32 get_hash() cil managed + instance int32 get_hash() cil manage { - .custom instance void [runtime]System.Runtime.CompilerServices.IsReadOnlyAttribute::.ctor() = ( 01 00 00 00 ) .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) // Code size 7 (0x7) diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/Structs02.fs.il.release.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/Structs02.fs.il.release.bsl index db022e1a5da..58df8fea491 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/Structs02.fs.il.release.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/Structs02.fs.il.release.bsl @@ -7,12 +7,12 @@ .assembly extern System.Runtime { .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) // .?_....: - .ver 7:0:0:0 + .ver 7:0:0:0 } .assembly extern FSharp.Core { .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) // .?_....: - .ver 7:0:0:0 + .ver 7:0:0:0 } .assembly Structs02 { @@ -21,29 +21,29 @@ int32) = ( 01 00 02 00 00 00 00 00 00 00 00 00 00 00 00 00 ) // --- The following custom attribute is added automatically, do not uncomment ------- - // .custom instance void [System.Runtime]System.Diagnostics.DebuggableAttribute::.ctor(valuetype [System.Runtime]System.Diagnostics.DebuggableAttribute/DebuggingModes) = ( 01 00 01 01 00 00 00 00 ) + // .custom instance void [System.Runtime]System.Diagnostics.DebuggableAttribute::.ctor(valuetype [System.Runtime]System.Diagnostics.DebuggableAttribute/DebuggingModes) = ( 01 00 01 01 00 00 00 00 ) .hash algorithm 0x00008004 .ver 0:0:0:0 } .mresource public FSharpSignatureData.Structs02 { - // Offset: 0x00000000 Length: 0x000007B3 + // Offset: 0x00000000 Length: 0x000007B3 // WARNING: managed resource file FSharpSignatureData.Structs02 created } .mresource public FSharpOptimizationData.Structs02 { - // Offset: 0x000007B8 Length: 0x0000023D + // Offset: 0x000007B8 Length: 0x0000023D // WARNING: managed resource file FSharpOptimizationData.Structs02 created } .module Structs02.exe -// MVID: {63DBF1DE-9F75-7AA4-A745-0383DEF1DB63} +// MVID: {63DBF1DE-9F75-7AA4-A745-0383DEF1DB63} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x0000024203AB0000 +// Image base: 0x0000024203AB0000 // =============== CLASS MEMBERS DECLARATION =================== @@ -66,9 +66,8 @@ .method public hidebysig specialname instance int32 get_hash() cil managed { - .custom instance void [System.Runtime]System.Runtime.CompilerServices.IsReadOnlyAttribute::.ctor() = ( 01 00 00 00 ) - .custom instance void [System.Runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .custom instance void [System.Runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [System.Runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [System.Runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) // Code size 7 (0x7) .maxstack 8 IL_0000: ldarg.0 @@ -360,4 +359,4 @@ // ============================================================= // *********** DISASSEMBLY COMPLETE *********************** -// WARNING: Created Win32 resource file D:\code\FS\fsharp\artifacts\bin\FSharp.Compiler.ComponentTests\Release\net7.0\tests\EmittedIL\Misc\Structs02_fs\Structs02.res +// WARNING: Created Win32 resource file D:\code\FS\fsharp\artifacts\bin\FSharp.Compiler.ComponentTests\Release\net7.0\tests\EmittedIL\Misc\Structs02_fs\Structs02.res diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Structure/FloatsAndDoubles.fs.il.debug.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Structure/FloatsAndDoubles.fs.il.debug.bsl index 47a70fee5bc..905f7083fb4 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Structure/FloatsAndDoubles.fs.il.debug.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Structure/FloatsAndDoubles.fs.il.debug.bsl @@ -65,7 +65,6 @@ .method public hidebysig specialname instance float64 get_F() cil managed { - .custom instance void [runtime]System.Runtime.CompilerServices.IsReadOnlyAttribute::.ctor() = ( 01 00 00 00 ) .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) // Code size 7 (0x7) @@ -420,7 +419,6 @@ .method public hidebysig specialname instance float64 get_D() cil managed { - .custom instance void [runtime]System.Runtime.CompilerServices.IsReadOnlyAttribute::.ctor() = ( 01 00 00 00 ) .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) // Code size 7 (0x7) diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Structure/FloatsAndDoubles.fs.il.release.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Structure/FloatsAndDoubles.fs.il.release.bsl index 66c47660629..078664438a9 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Structure/FloatsAndDoubles.fs.il.release.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Structure/FloatsAndDoubles.fs.il.release.bsl @@ -4,15 +4,15 @@ // Metadata version: v4.0.30319 -.assembly extern System.Runtime +.assembly extern System.Runtime { - .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) // .?_....: - .ver 7:0:0:0 + .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) // .?_....: + .ver 7:0:0:0 } .assembly extern FSharp.Core { .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) // .?_....: - .ver 7:0:0:0 + .ver 7:0:0:0 } .assembly FloatsAndDoubles { @@ -21,53 +21,52 @@ int32) = ( 01 00 02 00 00 00 00 00 00 00 00 00 00 00 00 00 ) // --- The following custom attribute is added automatically, do not uncomment ------- - // .custom instance void [System.Runtime]System.Diagnostics.DebuggableAttribute::.ctor(valuetype [System.Runtime]System.Diagnostics.DebuggableAttribute/DebuggingModes) = ( 01 00 01 01 00 00 00 00 ) + // .custom instance void [System.Runtime]System.Diagnostics.DebuggableAttribute::.ctor(valuetype [System.Runtime]System.Diagnostics.DebuggableAttribute/DebuggingModes) = ( 01 00 01 01 00 00 00 00 ) .hash algorithm 0x00008004 .ver 0:0:0:0 } .mresource public FSharpSignatureData.FloatsAndDoubles { - // Offset: 0x00000000 Length: 0x00000C66 + // Offset: 0x00000000 Length: 0x00000C66 // WARNING: managed resource file FSharpSignatureData.FloatsAndDoubles created } .mresource public FSharpOptimizationData.FloatsAndDoubles { - // Offset: 0x00000C70 Length: 0x0000034E + // Offset: 0x00000C70 Length: 0x0000034E // WARNING: managed resource file FSharpOptimizationData.FloatsAndDoubles created } .module FloatsAndDoubles.exe -// MVID: {63DBF1DE-5559-9AC8-A745-0383DEF1DB63} +// MVID: {63DBF1DE-5559-9AC8-A745-0383DEF1DB63} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x000001AD44060000 +// Image base: 0x000001AD44060000 // =============== CLASS MEMBERS DECLARATION =================== .class public abstract auto ansi sealed floatsanddoubles - extends [System.Runtime]System.Object + extends [System.Runtime]System.Object { .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 07 00 00 00 00 00 ) .class sequential ansi serializable sealed nested public Float - extends [System.Runtime]System.ValueType - implements class [System.Runtime]System.IEquatable`1, - [System.Runtime]System.Collections.IStructuralEquatable, - class [System.Runtime]System.IComparable`1, - [System.Runtime]System.IComparable, - [System.Runtime]System.Collections.IStructuralComparable + extends [System.Runtime]System.ValueType + implements class [System.Runtime]System.IEquatable`1, + [System.Runtime]System.Collections.IStructuralEquatable, + class [System.Runtime]System.IComparable`1, + [System.Runtime]System.IComparable, + [System.Runtime]System.Collections.IStructuralComparable { .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 03 00 00 00 00 00 ) .field assembly float64 F@ .method public hidebysig specialname instance float64 get_F() cil managed { - .custom instance void [System.Runtime]System.Runtime.CompilerServices.IsReadOnlyAttribute::.ctor() = ( 01 00 00 00 ) - .custom instance void [System.Runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .custom instance void [System.Runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [System.Runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [System.Runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) // Code size 7 (0x7) .maxstack 8 IL_0000: ldarg.0 @@ -78,16 +77,16 @@ .method public hidebysig virtual final instance int32 CompareTo(valuetype floatsanddoubles/Float obj) cil managed { - .custom instance void [System.Runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [System.Runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) // Code size 58 (0x3a) .maxstack 5 .locals init (valuetype floatsanddoubles/Float& V_0, - class [System.Runtime]System.Collections.IComparer V_1, + class [System.Runtime]System.Collections.IComparer V_1, float64 V_2, float64 V_3) IL_0000: ldarga.s obj IL_0002: stloc.0 - IL_0003: call class [System.Runtime]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() + IL_0003: call class [System.Runtime]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() IL_0008: stloc.1 IL_0009: ldarg.0 IL_000a: ldfld float64 floatsanddoubles/Float::F@ @@ -123,7 +122,7 @@ IL_0030: ldloc.2 IL_0031: ldloc.3 IL_0032: tail. - IL_0034: call int32 [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/HashCompare::GenericComparisonWithComparerIntrinsic(class [System.Runtime]System.Collections.IComparer, + IL_0034: call int32 [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/HashCompare::GenericComparisonWithComparerIntrinsic(class [System.Runtime]System.Collections.IComparer, !!0, !!0) IL_0039: ret @@ -132,7 +131,7 @@ .method public hidebysig virtual final instance int32 CompareTo(object obj) cil managed { - .custom instance void [System.Runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [System.Runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) // Code size 13 (0xd) .maxstack 8 IL_0000: ldarg.0 @@ -144,14 +143,14 @@ .method public hidebysig virtual final instance int32 CompareTo(object obj, - class [System.Runtime]System.Collections.IComparer comp) cil managed + class [System.Runtime]System.Collections.IComparer comp) cil managed { - .custom instance void [System.Runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [System.Runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) // Code size 66 (0x42) .maxstack 5 .locals init (valuetype floatsanddoubles/Float V_0, valuetype floatsanddoubles/Float& V_1, - class [System.Runtime]System.Collections.IComparer V_2, + class [System.Runtime]System.Collections.IComparer V_2, float64 V_3, float64 V_4) IL_0000: ldarg.1 @@ -195,16 +194,16 @@ IL_0037: ldloc.3 IL_0038: ldloc.s V_4 IL_003a: tail. - IL_003c: call int32 [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/HashCompare::GenericComparisonWithComparerIntrinsic(class [System.Runtime]System.Collections.IComparer, + IL_003c: call int32 [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/HashCompare::GenericComparisonWithComparerIntrinsic(class [System.Runtime]System.Collections.IComparer, !!0, !!0) IL_0041: ret } // end of method Float::CompareTo .method public hidebysig virtual final - instance int32 GetHashCode(class [System.Runtime]System.Collections.IEqualityComparer comp) cil managed + instance int32 GetHashCode(class [System.Runtime]System.Collections.IEqualityComparer comp) cil managed { - .custom instance void [System.Runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [System.Runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) // Code size 31 (0x1f) .maxstack 7 .locals init (int32 V_0) @@ -214,7 +213,7 @@ IL_0007: ldarg.1 IL_0008: ldarg.0 IL_0009: ldfld float64 floatsanddoubles/Float::F@ - IL_000e: call int32 [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/HashCompare::GenericHashWithComparerIntrinsic(class [System.Runtime]System.Collections.IEqualityComparer, + IL_000e: call int32 [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/HashCompare::GenericHashWithComparerIntrinsic(class [System.Runtime]System.Collections.IEqualityComparer, !!0) IL_0013: ldloc.0 IL_0014: ldc.i4.6 @@ -233,26 +232,26 @@ .method public hidebysig virtual final instance int32 GetHashCode() cil managed { - .custom instance void [System.Runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [System.Runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) // Code size 12 (0xc) .maxstack 8 IL_0000: ldarg.0 - IL_0001: call class [System.Runtime]System.Collections.IEqualityComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericEqualityComparer() - IL_0006: call instance int32 floatsanddoubles/Float::GetHashCode(class [System.Runtime]System.Collections.IEqualityComparer) + IL_0001: call class [System.Runtime]System.Collections.IEqualityComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericEqualityComparer() + IL_0006: call instance int32 floatsanddoubles/Float::GetHashCode(class [System.Runtime]System.Collections.IEqualityComparer) IL_000b: ret } // end of method Float::GetHashCode .method public hidebysig virtual final instance bool Equals(object obj, - class [System.Runtime]System.Collections.IEqualityComparer comp) cil managed + class [System.Runtime]System.Collections.IEqualityComparer comp) cil managed { - .custom instance void [System.Runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [System.Runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) // Code size 42 (0x2a) .maxstack 4 .locals init (object V_0, valuetype floatsanddoubles/Float V_1, valuetype floatsanddoubles/Float& V_2, - class [System.Runtime]System.Collections.IEqualityComparer V_3) + class [System.Runtime]System.Collections.IEqualityComparer V_3) IL_0000: ldarg.1 IL_0001: stloc.0 IL_0002: ldloc.0 @@ -293,7 +292,7 @@ .method public hidebysig virtual final instance bool Equals(valuetype floatsanddoubles/Float obj) cil managed { - .custom instance void [System.Runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [System.Runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) // Code size 39 (0x27) .maxstack 4 .locals init (valuetype floatsanddoubles/Float& V_0, @@ -333,7 +332,7 @@ .method public hidebysig virtual final instance bool Equals(object obj) cil managed { - .custom instance void [System.Runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [System.Runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) // Code size 30 (0x1e) .maxstack 4 .locals init (object V_0, @@ -367,21 +366,20 @@ } // end of class Float .class sequential ansi serializable sealed nested public Double - extends [System.Runtime]System.ValueType - implements class [System.Runtime]System.IEquatable`1, - [System.Runtime]System.Collections.IStructuralEquatable, - class [System.Runtime]System.IComparable`1, - [System.Runtime]System.IComparable, - [System.Runtime]System.Collections.IStructuralComparable + extends [System.Runtime]System.ValueType + implements class [System.Runtime]System.IEquatable`1, + [System.Runtime]System.Collections.IStructuralEquatable, + class [System.Runtime]System.IComparable`1, + [System.Runtime]System.IComparable, + [System.Runtime]System.Collections.IStructuralComparable { .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 03 00 00 00 00 00 ) .field assembly float64 D@ .method public hidebysig specialname instance float64 get_D() cil managed { - .custom instance void [System.Runtime]System.Runtime.CompilerServices.IsReadOnlyAttribute::.ctor() = ( 01 00 00 00 ) - .custom instance void [System.Runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .custom instance void [System.Runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [System.Runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [System.Runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) // Code size 7 (0x7) .maxstack 8 IL_0000: ldarg.0 @@ -392,16 +390,16 @@ .method public hidebysig virtual final instance int32 CompareTo(valuetype floatsanddoubles/Double obj) cil managed { - .custom instance void [System.Runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [System.Runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) // Code size 58 (0x3a) .maxstack 5 .locals init (valuetype floatsanddoubles/Double& V_0, - class [System.Runtime]System.Collections.IComparer V_1, + class [System.Runtime]System.Collections.IComparer V_1, float64 V_2, float64 V_3) IL_0000: ldarga.s obj IL_0002: stloc.0 - IL_0003: call class [System.Runtime]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() + IL_0003: call class [System.Runtime]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() IL_0008: stloc.1 IL_0009: ldarg.0 IL_000a: ldfld float64 floatsanddoubles/Double::D@ @@ -437,7 +435,7 @@ IL_0030: ldloc.2 IL_0031: ldloc.3 IL_0032: tail. - IL_0034: call int32 [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/HashCompare::GenericComparisonWithComparerIntrinsic(class [System.Runtime]System.Collections.IComparer, + IL_0034: call int32 [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/HashCompare::GenericComparisonWithComparerIntrinsic(class [System.Runtime]System.Collections.IComparer, !!0, !!0) IL_0039: ret @@ -446,7 +444,7 @@ .method public hidebysig virtual final instance int32 CompareTo(object obj) cil managed { - .custom instance void [System.Runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [System.Runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) // Code size 13 (0xd) .maxstack 8 IL_0000: ldarg.0 @@ -458,14 +456,14 @@ .method public hidebysig virtual final instance int32 CompareTo(object obj, - class [System.Runtime]System.Collections.IComparer comp) cil managed + class [System.Runtime]System.Collections.IComparer comp) cil managed { - .custom instance void [System.Runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [System.Runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) // Code size 66 (0x42) .maxstack 5 .locals init (valuetype floatsanddoubles/Double V_0, valuetype floatsanddoubles/Double& V_1, - class [System.Runtime]System.Collections.IComparer V_2, + class [System.Runtime]System.Collections.IComparer V_2, float64 V_3, float64 V_4) IL_0000: ldarg.1 @@ -509,16 +507,16 @@ IL_0037: ldloc.3 IL_0038: ldloc.s V_4 IL_003a: tail. - IL_003c: call int32 [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/HashCompare::GenericComparisonWithComparerIntrinsic(class [System.Runtime]System.Collections.IComparer, + IL_003c: call int32 [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/HashCompare::GenericComparisonWithComparerIntrinsic(class [System.Runtime]System.Collections.IComparer, !!0, !!0) IL_0041: ret } // end of method Double::CompareTo .method public hidebysig virtual final - instance int32 GetHashCode(class [System.Runtime]System.Collections.IEqualityComparer comp) cil managed + instance int32 GetHashCode(class [System.Runtime]System.Collections.IEqualityComparer comp) cil managed { - .custom instance void [System.Runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [System.Runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) // Code size 31 (0x1f) .maxstack 7 .locals init (int32 V_0) @@ -528,7 +526,7 @@ IL_0007: ldarg.1 IL_0008: ldarg.0 IL_0009: ldfld float64 floatsanddoubles/Double::D@ - IL_000e: call int32 [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/HashCompare::GenericHashWithComparerIntrinsic(class [System.Runtime]System.Collections.IEqualityComparer, + IL_000e: call int32 [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/HashCompare::GenericHashWithComparerIntrinsic(class [System.Runtime]System.Collections.IEqualityComparer, !!0) IL_0013: ldloc.0 IL_0014: ldc.i4.6 @@ -547,26 +545,26 @@ .method public hidebysig virtual final instance int32 GetHashCode() cil managed { - .custom instance void [System.Runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [System.Runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) // Code size 12 (0xc) .maxstack 8 IL_0000: ldarg.0 - IL_0001: call class [System.Runtime]System.Collections.IEqualityComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericEqualityComparer() - IL_0006: call instance int32 floatsanddoubles/Double::GetHashCode(class [System.Runtime]System.Collections.IEqualityComparer) + IL_0001: call class [System.Runtime]System.Collections.IEqualityComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericEqualityComparer() + IL_0006: call instance int32 floatsanddoubles/Double::GetHashCode(class [System.Runtime]System.Collections.IEqualityComparer) IL_000b: ret } // end of method Double::GetHashCode .method public hidebysig virtual final instance bool Equals(object obj, - class [System.Runtime]System.Collections.IEqualityComparer comp) cil managed + class [System.Runtime]System.Collections.IEqualityComparer comp) cil managed { - .custom instance void [System.Runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [System.Runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) // Code size 42 (0x2a) .maxstack 4 .locals init (object V_0, valuetype floatsanddoubles/Double V_1, valuetype floatsanddoubles/Double& V_2, - class [System.Runtime]System.Collections.IEqualityComparer V_3) + class [System.Runtime]System.Collections.IEqualityComparer V_3) IL_0000: ldarg.1 IL_0001: stloc.0 IL_0002: ldloc.0 @@ -607,7 +605,7 @@ .method public hidebysig virtual final instance bool Equals(valuetype floatsanddoubles/Double obj) cil managed { - .custom instance void [System.Runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [System.Runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) // Code size 39 (0x27) .maxstack 4 .locals init (valuetype floatsanddoubles/Double& V_0, @@ -647,7 +645,7 @@ .method public hidebysig virtual final instance bool Equals(object obj) cil managed { - .custom instance void [System.Runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [System.Runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) // Code size 30 (0x1e) .maxstack 4 .locals init (object V_0, @@ -684,14 +682,14 @@ extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 { .field public class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 clo5 - .custom instance void [System.Runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [System.Runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) - .custom instance void [System.Runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .custom instance void [System.Runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [System.Runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [System.Runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .custom instance void [System.Runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [System.Runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) .method assembly specialname rtspecialname instance void .ctor(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 clo5) cil managed { - .custom instance void [System.Runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .custom instance void [System.Runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [System.Runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [System.Runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) // Code size 14 (0xe) .maxstack 8 IL_0000: ldarg.0 @@ -721,14 +719,14 @@ extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> { .field public class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> clo4 - .custom instance void [System.Runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [System.Runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) - .custom instance void [System.Runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .custom instance void [System.Runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [System.Runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [System.Runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .custom instance void [System.Runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [System.Runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) .method assembly specialname rtspecialname instance void .ctor(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> clo4) cil managed { - .custom instance void [System.Runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .custom instance void [System.Runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [System.Runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [System.Runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) // Code size 14 (0xe) .maxstack 8 IL_0000: ldarg.0 @@ -761,14 +759,14 @@ extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>> { .field public class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>> clo3 - .custom instance void [System.Runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [System.Runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) - .custom instance void [System.Runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .custom instance void [System.Runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [System.Runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [System.Runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .custom instance void [System.Runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [System.Runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) .method assembly specialname rtspecialname instance void .ctor(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>> clo3) cil managed { - .custom instance void [System.Runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .custom instance void [System.Runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [System.Runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [System.Runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) // Code size 14 (0xe) .maxstack 8 IL_0000: ldarg.0 @@ -801,14 +799,14 @@ extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>>> { .field public class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>>> clo2 - .custom instance void [System.Runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [System.Runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) - .custom instance void [System.Runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .custom instance void [System.Runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [System.Runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [System.Runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .custom instance void [System.Runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [System.Runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) .method assembly specialname rtspecialname instance void .ctor(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>>> clo2) cil managed { - .custom instance void [System.Runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .custom instance void [System.Runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [System.Runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [System.Runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) // Code size 14 (0xe) .maxstack 8 IL_0000: ldarg.0 @@ -841,14 +839,14 @@ extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>>>> { .field public class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>>>> clo1 - .custom instance void [System.Runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [System.Runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) - .custom instance void [System.Runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .custom instance void [System.Runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [System.Runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [System.Runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .custom instance void [System.Runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [System.Runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) .method assembly specialname rtspecialname instance void .ctor(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>>>> clo1) cil managed { - .custom instance void [System.Runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .custom instance void [System.Runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [System.Runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [System.Runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) // Code size 14 (0xe) .maxstack 8 IL_0000: ldarg.0 @@ -881,14 +879,14 @@ extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 { .field public class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 clo5 - .custom instance void [System.Runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [System.Runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) - .custom instance void [System.Runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .custom instance void [System.Runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [System.Runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [System.Runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .custom instance void [System.Runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [System.Runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) .method assembly specialname rtspecialname instance void .ctor(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 clo5) cil managed { - .custom instance void [System.Runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .custom instance void [System.Runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [System.Runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [System.Runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) // Code size 14 (0xe) .maxstack 8 IL_0000: ldarg.0 @@ -918,14 +916,14 @@ extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> { .field public class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> clo4 - .custom instance void [System.Runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [System.Runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) - .custom instance void [System.Runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .custom instance void [System.Runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [System.Runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [System.Runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .custom instance void [System.Runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [System.Runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) .method assembly specialname rtspecialname instance void .ctor(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> clo4) cil managed { - .custom instance void [System.Runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .custom instance void [System.Runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [System.Runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [System.Runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) // Code size 14 (0xe) .maxstack 8 IL_0000: ldarg.0 @@ -958,14 +956,14 @@ extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>> { .field public class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>> clo3 - .custom instance void [System.Runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [System.Runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) - .custom instance void [System.Runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .custom instance void [System.Runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [System.Runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [System.Runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .custom instance void [System.Runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [System.Runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) .method assembly specialname rtspecialname instance void .ctor(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>> clo3) cil managed { - .custom instance void [System.Runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .custom instance void [System.Runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [System.Runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [System.Runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) // Code size 14 (0xe) .maxstack 8 IL_0000: ldarg.0 @@ -998,14 +996,14 @@ extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>>> { .field public class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>>> clo2 - .custom instance void [System.Runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [System.Runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) - .custom instance void [System.Runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .custom instance void [System.Runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [System.Runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [System.Runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .custom instance void [System.Runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [System.Runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) .method assembly specialname rtspecialname instance void .ctor(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>>> clo2) cil managed { - .custom instance void [System.Runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .custom instance void [System.Runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [System.Runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [System.Runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) // Code size 14 (0xe) .maxstack 8 IL_0000: ldarg.0 @@ -1038,14 +1036,14 @@ extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>>>> { .field public class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>>>> clo1 - .custom instance void [System.Runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [System.Runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) - .custom instance void [System.Runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .custom instance void [System.Runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [System.Runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [System.Runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .custom instance void [System.Runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [System.Runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) .method assembly specialname rtspecialname instance void .ctor(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>>>> clo1) cil managed { - .custom instance void [System.Runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .custom instance void [System.Runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [System.Runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [System.Runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) // Code size 14 (0xe) .maxstack 8 IL_0000: ldarg.0 @@ -1126,17 +1124,17 @@ IL_0015: br.s IL_0093 IL_0017: ldstr "Doubles: %-17s = %-17s is: %-5b Values %f = %f" - IL_001c: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5>>>>,class [System.Runtime]System.IO.TextWriter,class [FSharp.Core]Microsoft.FSharp.Core.Unit,class [FSharp.Core]Microsoft.FSharp.Core.Unit,class [System.Runtime]System.Tuple`5>::.ctor(string) - IL_0021: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatLine>>>>>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_001c: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5>>>>,class [System.Runtime]System.IO.TextWriter,class [FSharp.Core]Microsoft.FSharp.Core.Unit,class [FSharp.Core]Microsoft.FSharp.Core.Unit,class [System.Runtime]System.Tuple`5>::.ctor(string) + IL_0021: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatLine>>>>>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) IL_0026: stloc.2 IL_0027: ldloc.2 IL_0028: newobj instance void floatsanddoubles/main@31::.ctor(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>>>>) IL_002d: call string[] floatsanddoubles::get_names() IL_0032: ldloc.0 - IL_0033: ldelem [System.Runtime]System.String + IL_0033: ldelem [System.Runtime]System.String IL_0038: call string[] floatsanddoubles::get_names() IL_003d: ldloc.1 - IL_003e: ldelem [System.Runtime]System.String + IL_003e: ldelem [System.Runtime]System.String IL_0043: call valuetype floatsanddoubles/Double[] floatsanddoubles::get_doubles() IL_0048: ldloc.0 IL_0049: ldelema floatsanddoubles/Double @@ -1145,7 +1143,7 @@ IL_0054: ldelem floatsanddoubles/Double IL_0059: box floatsanddoubles/Double IL_005e: constrained. floatsanddoubles/Double - IL_0064: callvirt instance bool [System.Runtime]System.Object::Equals(object) + IL_0064: callvirt instance bool [System.Runtime]System.Object::Equals(object) IL_0069: call valuetype floatsanddoubles/Double[] floatsanddoubles::get_doubles() IL_006e: ldloc.0 IL_006f: ldelema floatsanddoubles/Double @@ -1172,8 +1170,8 @@ IL_009b: blt IL_0017 IL_00a0: ldstr "" - IL_00a5: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5::.ctor(string) - IL_00aa: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatLine(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_00a5: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5::.ctor(string) + IL_00aa: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatLine(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) IL_00af: pop IL_00b0: ldloc.0 IL_00b1: ldc.i4.1 @@ -1194,17 +1192,17 @@ IL_00cb: br IL_0153 IL_00d0: ldstr "Floats: %-17s = %-17s is: %-5b Values %f = %f" - IL_00d5: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5>>>>,class [System.Runtime]System.IO.TextWriter,class [FSharp.Core]Microsoft.FSharp.Core.Unit,class [FSharp.Core]Microsoft.FSharp.Core.Unit,class [System.Runtime]System.Tuple`5>::.ctor(string) - IL_00da: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatLine>>>>>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_00d5: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5>>>>,class [System.Runtime]System.IO.TextWriter,class [FSharp.Core]Microsoft.FSharp.Core.Unit,class [FSharp.Core]Microsoft.FSharp.Core.Unit,class [System.Runtime]System.Tuple`5>::.ctor(string) + IL_00da: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatLine>>>>>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) IL_00df: stloc.s V_5 IL_00e1: ldloc.s V_5 IL_00e3: newobj instance void floatsanddoubles/'main@36-5'::.ctor(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>>>>) IL_00e8: call string[] floatsanddoubles::get_names() IL_00ed: ldloc.3 - IL_00ee: ldelem [System.Runtime]System.String + IL_00ee: ldelem [System.Runtime]System.String IL_00f3: call string[] floatsanddoubles::get_names() IL_00f8: ldloc.s V_4 - IL_00fa: ldelem [System.Runtime]System.String + IL_00fa: ldelem [System.Runtime]System.String IL_00ff: call valuetype floatsanddoubles/Float[] floatsanddoubles::get_floats() IL_0104: ldloc.3 IL_0105: ldelema floatsanddoubles/Float @@ -1213,7 +1211,7 @@ IL_0111: ldelem floatsanddoubles/Float IL_0116: box floatsanddoubles/Float IL_011b: constrained. floatsanddoubles/Float - IL_0121: callvirt instance bool [System.Runtime]System.Object::Equals(object) + IL_0121: callvirt instance bool [System.Runtime]System.Object::Equals(object) IL_0126: call valuetype floatsanddoubles/Float[] floatsanddoubles::get_floats() IL_012b: ldloc.3 IL_012c: ldelema floatsanddoubles/Float @@ -1240,8 +1238,8 @@ IL_015c: blt IL_00d0 IL_0161: ldstr "" - IL_0166: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5::.ctor(string) - IL_016b: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatLine(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_0166: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5::.ctor(string) + IL_016b: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatLine(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) IL_0170: pop IL_0171: ldloc.3 IL_0172: ldc.i4.1 @@ -1277,18 +1275,18 @@ } // end of class floatsanddoubles .class private abstract auto ansi sealed ''.$floatsanddoubles - extends [System.Runtime]System.Object + extends [System.Runtime]System.Object { .field static assembly initonly valuetype floatsanddoubles/Float[] floats@22 - .custom instance void [System.Runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [System.Runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .custom instance void [System.Runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [System.Runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) .field static assembly initonly valuetype floatsanddoubles/Double[] doubles@23 - .custom instance void [System.Runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [System.Runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .custom instance void [System.Runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [System.Runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) .field static assembly initonly string[] names@24 - .custom instance void [System.Runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [System.Runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .custom instance void [System.Runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [System.Runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) .field static assembly int32 init@ - .custom instance void [System.Runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [System.Runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) - .custom instance void [System.Runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .custom instance void [System.Runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [System.Runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [System.Runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .custom instance void [System.Runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [System.Runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) .method private specialname rtspecialname static void .cctor() cil managed { @@ -1378,35 +1376,35 @@ IL_013a: stsfld valuetype floatsanddoubles/Double[] ''.$floatsanddoubles::doubles@23 IL_013f: stloc.1 IL_0140: ldc.i4.7 - IL_0141: newarr [System.Runtime]System.String + IL_0141: newarr [System.Runtime]System.String IL_0146: dup IL_0147: ldc.i4.0 IL_0148: ldstr "Epsilon" - IL_014d: stelem [System.Runtime]System.String + IL_014d: stelem [System.Runtime]System.String IL_0152: dup IL_0153: ldc.i4.1 IL_0154: ldstr "MinValue" - IL_0159: stelem [System.Runtime]System.String + IL_0159: stelem [System.Runtime]System.String IL_015e: dup IL_015f: ldc.i4.2 IL_0160: ldstr "MaxValue" - IL_0165: stelem [System.Runtime]System.String + IL_0165: stelem [System.Runtime]System.String IL_016a: dup IL_016b: ldc.i4.3 IL_016c: ldstr "NegativeInfinity" - IL_0171: stelem [System.Runtime]System.String + IL_0171: stelem [System.Runtime]System.String IL_0176: dup IL_0177: ldc.i4.4 IL_0178: ldstr "PositiveInfinity" - IL_017d: stelem [System.Runtime]System.String + IL_017d: stelem [System.Runtime]System.String IL_0182: dup IL_0183: ldc.i4.5 IL_0184: ldstr "NaN" - IL_0189: stelem [System.Runtime]System.String + IL_0189: stelem [System.Runtime]System.String IL_018e: dup IL_018f: ldc.i4.6 IL_0190: ldstr "Number" - IL_0195: stelem [System.Runtime]System.String + IL_0195: stelem [System.Runtime]System.String IL_019a: dup IL_019b: stsfld string[] ''.$floatsanddoubles::names@24 IL_01a0: stloc.2 @@ -1419,4 +1417,4 @@ // ============================================================= // *********** DISASSEMBLY COMPLETE *********************** -// WARNING: Created Win32 resource file D:\code\FS\fsharp\artifacts\bin\FSharp.Compiler.ComponentTests\Release\net7.0\tests\EmittedIL\Structure\FloatsAndDoubles_fs\FloatsAndDoubles.res +// WARNING: Created Win32 resource file D:\code\FS\fsharp\artifacts\bin\FSharp.Compiler.ComponentTests\Release\net7.0\tests\EmittedIL\Structure\FloatsAndDoubles_fs\FloatsAndDoubles.res diff --git a/tests/FSharp.Compiler.ComponentTests/FSharp.Compiler.ComponentTests.fsproj b/tests/FSharp.Compiler.ComponentTests/FSharp.Compiler.ComponentTests.fsproj index 756dbbce130..bef4e15e21f 100644 --- a/tests/FSharp.Compiler.ComponentTests/FSharp.Compiler.ComponentTests.fsproj +++ b/tests/FSharp.Compiler.ComponentTests/FSharp.Compiler.ComponentTests.fsproj @@ -107,7 +107,7 @@ - + From 9c030eb790beb47110866ecc42914f17259638da Mon Sep 17 00:00:00 2001 From: Vlad Zarytovskii Date: Mon, 6 Feb 2023 13:12:19 +0100 Subject: [PATCH 2/4] Update tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/Structs02.fs.il.debug.bsl --- .../EmittedIL/Misc/Structs02.fs.il.debug.bsl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/Structs02.fs.il.debug.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/Structs02.fs.il.debug.bsl index d9ea241fa63..8dd72e916a6 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/Structs02.fs.il.debug.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/Structs02.fs.il.debug.bsl @@ -64,7 +64,7 @@ .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 03 00 00 00 00 00 ) .field assembly int32 hash@ .method public hidebysig specialname - instance int32 get_hash() cil manage + instance int32 get_hash() cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) From bde5ee294f059c5a4963e043bee7aaa535b04567 Mon Sep 17 00:00:00 2001 From: Vlad Zarytovskii Date: Mon, 6 Feb 2023 13:13:23 +0100 Subject: [PATCH 3/4] fantomas --- src/Compiler/CodeGen/IlxGen.fs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/Compiler/CodeGen/IlxGen.fs b/src/Compiler/CodeGen/IlxGen.fs index 7a7178ddf79..f130a63fa67 100644 --- a/src/Compiler/CodeGen/IlxGen.fs +++ b/src/Compiler/CodeGen/IlxGen.fs @@ -613,7 +613,7 @@ let GenReadOnlyAttribute (g: TcGlobals) = mkILCustomAttribute (g.attrib_IsReadOnlyAttribute.TypeRef, [], [], []) let GenReadOnlyAttributeIfNecessary (g: TcGlobals) ty = - let add = + let add = false && g.isSystem_Runtime_CompilerServices_IsReadOnlyAttributeAvailable && isInByrefTy g ty @@ -2089,7 +2089,11 @@ type AnonTypeGenerationTable() = [ for propName, fldName, fldTy in flds -> let attrs = - if false && g.isSystem_Runtime_CompilerServices_IsReadOnlyAttributeAvailable && isStruct then + if + false + && g.isSystem_Runtime_CompilerServices_IsReadOnlyAttributeAvailable + && isStruct + then [ GenReadOnlyAttribute g ] else [] From 4818605c4c07604e1961986be29a553f426fb170 Mon Sep 17 00:00:00 2001 From: Vlad Zarytovskii Date: Mon, 6 Feb 2023 13:41:19 +0100 Subject: [PATCH 4/4] fix tests --- .../FSharp.Compiler.ComponentTests.fsproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/FSharp.Compiler.ComponentTests/FSharp.Compiler.ComponentTests.fsproj b/tests/FSharp.Compiler.ComponentTests/FSharp.Compiler.ComponentTests.fsproj index bef4e15e21f..133f5eae03e 100644 --- a/tests/FSharp.Compiler.ComponentTests/FSharp.Compiler.ComponentTests.fsproj +++ b/tests/FSharp.Compiler.ComponentTests/FSharp.Compiler.ComponentTests.fsproj @@ -138,7 +138,7 @@ - +