Skip to content

Commit 0219a1b

Browse files
Update ECMA-335 for function pointer changes (#84962)
#81006 changes the meaning of function pointer types.
1 parent 0693424 commit 0219a1b

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

docs/design/specs/Ecma-335-Augments.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ This is a list of additions and edits to be made in ECMA-335 specifications. It
1212
- [Default Interface Methods](#default-interface-methods)
1313
- [Static Interface Methods](#static-interface-methods)
1414
- [Covariant Return Types](#covariant-return-types)
15+
- [Function Pointer Type Identity](#function-pointer-type-identity)
1516
- [Unsigned data conversion with overflow detection](#unsigned-data-conversion-with-overflow-detection)
1617
- [Ref field support](#ref-fields)
1718
- [Rules for IL rewriters](#rules-for-il-rewriters)
@@ -925,6 +926,16 @@ For this example, the behavior of calls on objects of various types is presented
925926
### II.22.27
926927
Edit rule 12 to specify that "The method signature defined by *MethodBody* shall match those defined by *MethodDeclaration* exactly if *MethodDeclaration* defines a method on an interface or be *covariant-return-compatible-with* (§I.8.7.1) if *MethodDeclaration* represents a method on a class."
927928

929+
## Function Pointer Type Identity
930+
931+
The unmanaged calling convention of the function pointer type no longer contributes to the type identity. For the purposes of type identity, the only important bit is whether the calling convention is managed or unmanaged.
932+
933+
### I.8.7 Assignment compatibility
934+
935+
For the purpose of type compatibility when determining a type from a signature:
936+
937+
iv) ~~Any calling convention~~ _Whether the calling convention is managed or unmanaged_ is considered part of the type.
938+
928939
## Unsigned data conversion with overflow detection
929940

930941
`conv.ovf.<to type>.un` opcode is purposed for converting a value on the stack to an integral value while treating the stack source as unsigned. Ecma does not distinguish signed and unsigned values on the stack so such opcode is needed as a complement for `conv.ovf.<to type>`.

0 commit comments

Comments
 (0)