Skip to content

Commit

Permalink
Add field names to ILNativeType.Custom (dotnet#10567)
Browse files Browse the repository at this point in the history
  • Loading branch information
ScottHutchinson authored and nosami committed Feb 22, 2021
1 parent 272384a commit 7782020
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 10 deletions.
4 changes: 2 additions & 2 deletions src/fsharp/absil/il.fs
Original file line number Diff line number Diff line change
Expand Up @@ -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).
// --------------------------------------------------------------------

[<RequireQualifiedAccess; StructuralEquality; StructuralComparison>]
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
Expand Down
5 changes: 3 additions & 2 deletions src/fsharp/absil/il.fsi
Original file line number Diff line number Diff line change
Expand Up @@ -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).
[<RequireQualifiedAccess; StructuralEquality; StructuralComparison>]
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
Expand Down
12 changes: 6 additions & 6 deletions tests/FSharp.Compiler.Service.Tests/SurfaceArea.netstandard.fs
Original file line number Diff line number Diff line change
Expand Up @@ -14771,21 +14771,21 @@ 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)
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)
Expand Down

0 comments on commit 7782020

Please sign in to comment.