mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
SIL: Introduce a 'closure' convention for unapplied invocation functions.
We don't want the machine calling conventions for closure invocation functions to necessarily be tied to the convention for normal thin functions or methods. NFC yet; for now, 'closure' follows the same behavior as the 'method' convention, but as part of partial_apply simplification it will be a requirement that partial_apply takes a @convention(closure) function and a box and produces a @convention(thick) function from them.
This commit is contained in:
@@ -54,7 +54,7 @@ const uint16_t VERSION_MAJOR = 0;
|
||||
/// in source control, you should also update the comment to briefly
|
||||
/// describe what change you made. The content of this comment isn't important;
|
||||
/// it just ensures a conflict if two people change the module format.
|
||||
const uint16_t VERSION_MINOR = 276; // Last change: add load inst, store inst
|
||||
const uint16_t VERSION_MINOR = 277; // Last change: closure SIL @convention
|
||||
|
||||
using DeclID = PointerEmbeddedInt<unsigned, 31>;
|
||||
using DeclIDField = BCFixed<31>;
|
||||
@@ -140,6 +140,7 @@ enum class SILFunctionTypeRepresentation : uint8_t {
|
||||
Method = FirstSIL,
|
||||
ObjCMethod,
|
||||
WitnessMethod,
|
||||
Closure,
|
||||
};
|
||||
using SILFunctionTypeRepresentationField = BCFixed<4>;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user