IRGen and basic optimizer support for coroutines.

This commit is contained in:
John McCall
2018-01-07 01:13:42 -05:00
parent b80808bbc1
commit 3c54c0edfc
39 changed files with 1886 additions and 153 deletions

View File

@@ -307,6 +307,7 @@ private:
case Node::Kind::ClassMetadataBaseOffset:
case Node::Kind::CFunctionPointer:
case Node::Kind::Constructor:
case Node::Kind::CoroutineContinuationPrototype:
case Node::Kind::CurryThunk:
case Node::Kind::DispatchThunk:
case Node::Kind::Deallocator:
@@ -1414,6 +1415,10 @@ NodePointer NodePrinter::print(NodePointer Node, bool asPrefixContext) {
Printer << "nominal type descriptor for ";
print(Node->getChild(0));
return nullptr;
case Node::Kind::CoroutineContinuationPrototype:
Printer << "coroutine continuation prototype for ";
print(Node->getChild(0));
return nullptr;
case Node::Kind::ValueWitness:
Printer << toString(ValueWitnessKind(Node->getIndex()));
if (Options.ShortenValueWitness) Printer << " for ";