Subsume OwnershipConventions into SILFunctionType.

Swift SVN r9186
This commit is contained in:
John McCall
2013-10-11 00:50:57 +00:00
parent 1c742f15a3
commit 8fbc790d39
18 changed files with 688 additions and 462 deletions

View File

@@ -1693,6 +1693,8 @@ void Serializer::writeType(Type ty) {
auto callingConvention = fnTy->getAbstractCC();
auto result = fnTy->getResult();
auto stableResultConvention =
getRawStableResultConvention(result.getConvention());
SmallVector<TypeID, 8> paramTypes;
for (auto param : fnTy->getParameters()) {
@@ -1701,11 +1703,15 @@ void Serializer::writeType(Type ty) {
paramTypes.push_back(TypeID(conv));
}
auto stableCalleeConvention =
getRawStableParameterConvention(fnTy->getCalleeConvention());
unsigned abbrCode = DeclTypeAbbrCodes[SILFunctionTypeLayout::Code];
SILFunctionTypeLayout::emitRecord(Out, ScratchRecord, abbrCode,
addTypeRef(result.getType()),
getRawStableResultConvention(result.getConvention()),
stableResultConvention,
dID,
stableCalleeConvention,
getRawStableCC(callingConvention),
fnTy->isThin(),
fnTy->isNoReturn(),