From 69476898183dfe43750cfb2ceb148bd800fec608 Mon Sep 17 00:00:00 2001 From: Scott Hutchinson Date: Sun, 29 Nov 2020 14:17:47 -0800 Subject: [PATCH] Add field names to ILNativeType.Custom (#10567) --- src/fsharp/absil/il.fs | 4 ++-- src/fsharp/absil/il.fsi | 5 +++-- .../SurfaceArea.netstandard.fs | 12 ++++++------ 3 files changed, 11 insertions(+), 10 deletions(-) diff --git a/src/fsharp/absil/il.fs b/src/fsharp/absil/il.fs index b80e07f65ef..c0b353a7229 100644 --- a/src/fsharp/absil/il.fs +++ b/src/fsharp/absil/il.fs @@ -1304,13 +1304,13 @@ type ILFieldInit = // -------------------------------------------------------------------- // Native Types, for marshalling to the native C interface. // These are taken directly from the ILASM syntax, and don't really -// correspond yet to the ECMA Spec (Partition II, 7.4). +// correspond yet to the CLI ECMA-335 Spec (Partition II, 7.4). // -------------------------------------------------------------------- [] type ILNativeType = | Empty - | Custom of ILGuid * string * string * byte[] (* guid, nativeTypeName, custMarshallerName, cookieString *) + | Custom of ILGuid * nativeTypeName: string * custMarshallerName: string * cookieString: byte[] | FixedSysString of int32 | FixedArray of int32 | Currency diff --git a/src/fsharp/absil/il.fsi b/src/fsharp/absil/il.fsi index d5a24d4aaa8..723e8995024 100644 --- a/src/fsharp/absil/il.fsi +++ b/src/fsharp/absil/il.fsi @@ -677,11 +677,12 @@ type ILNativeVariant = | UInt /// Native Types, for marshalling to the native C interface. -/// These are taken directly from the ILASM syntax, see ECMA Spec (Partition II, 7.4). +/// These are taken directly from the ILASM syntax. +/// Most of these are listed in the CLI ECMA-335 Spec (Partition II, 7.4). [] type ILNativeType = | Empty - | Custom of ILGuid * string * string * byte[] (* guid,nativeTypeName,custMarshallerName,cookieString *) + | Custom of ILGuid * nativeTypeName: string * custMarshallerName: string * cookieString: byte[] | FixedSysString of int32 | FixedArray of int32 | Currency diff --git a/tests/FSharp.Compiler.Service.Tests/SurfaceArea.netstandard.fs b/tests/FSharp.Compiler.Service.Tests/SurfaceArea.netstandard.fs index 4157cd44fbe..956664ce86b 100644 --- a/tests/FSharp.Compiler.Service.Tests/SurfaceArea.netstandard.fs +++ b/tests/FSharp.Compiler.Service.Tests/SurfaceArea.netstandard.fs @@ -14771,9 +14771,9 @@ FSharp.Compiler.AbstractIL.IL+ILNativeType+Custom: Boolean get_IsUInt64() FSharp.Compiler.AbstractIL.IL+ILNativeType+Custom: Boolean get_IsVariantBool() FSharp.Compiler.AbstractIL.IL+ILNativeType+Custom: Boolean get_IsVoid() FSharp.Compiler.AbstractIL.IL+ILNativeType+Custom: Byte[] Item1 -FSharp.Compiler.AbstractIL.IL+ILNativeType+Custom: Byte[] Item4 +FSharp.Compiler.AbstractIL.IL+ILNativeType+Custom: Byte[] cookieString FSharp.Compiler.AbstractIL.IL+ILNativeType+Custom: Byte[] get_Item1() -FSharp.Compiler.AbstractIL.IL+ILNativeType+Custom: Byte[] get_Item4() +FSharp.Compiler.AbstractIL.IL+ILNativeType+Custom: Byte[] get_cookieString() FSharp.Compiler.AbstractIL.IL+ILNativeType+Custom: Int32 CompareTo(ILNativeType) FSharp.Compiler.AbstractIL.IL+ILNativeType+Custom: Int32 CompareTo(System.Object) FSharp.Compiler.AbstractIL.IL+ILNativeType+Custom: Int32 CompareTo(System.Object, System.Collections.IComparer) @@ -14781,11 +14781,11 @@ FSharp.Compiler.AbstractIL.IL+ILNativeType+Custom: Int32 GetHashCode() FSharp.Compiler.AbstractIL.IL+ILNativeType+Custom: Int32 GetHashCode(System.Collections.IEqualityComparer) FSharp.Compiler.AbstractIL.IL+ILNativeType+Custom: Int32 Tag FSharp.Compiler.AbstractIL.IL+ILNativeType+Custom: Int32 get_Tag() -FSharp.Compiler.AbstractIL.IL+ILNativeType+Custom: System.String Item2 -FSharp.Compiler.AbstractIL.IL+ILNativeType+Custom: System.String Item3 +FSharp.Compiler.AbstractIL.IL+ILNativeType+Custom: System.String nativeTypeName +FSharp.Compiler.AbstractIL.IL+ILNativeType+Custom: System.String custMarshallerName FSharp.Compiler.AbstractIL.IL+ILNativeType+Custom: System.String ToString() -FSharp.Compiler.AbstractIL.IL+ILNativeType+Custom: System.String get_Item2() -FSharp.Compiler.AbstractIL.IL+ILNativeType+Custom: System.String get_Item3() +FSharp.Compiler.AbstractIL.IL+ILNativeType+Custom: System.String get_nativeTypeName() +FSharp.Compiler.AbstractIL.IL+ILNativeType+Custom: System.String get_custMarshallerName() FSharp.Compiler.AbstractIL.IL+ILNativeType+FixedArray: Boolean Equals(ILNativeType) FSharp.Compiler.AbstractIL.IL+ILNativeType+FixedArray: Boolean Equals(System.Object) FSharp.Compiler.AbstractIL.IL+ILNativeType+FixedArray: Boolean Equals(System.Object, System.Collections.IEqualityComparer)