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:
Joe Groff
2016-10-17 15:55:04 -07:00
parent 0ce9aef8f7
commit aac85cb93f
20 changed files with 58 additions and 5 deletions

View File

@@ -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>;