mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
SILGen: Currying of 'super.method' calls.
Keep track of a second set of "direct method reference" curry thunks that don't end in a dynamic dispatch in order to properly implement a partial application such as 'let foo = super.foo'. Fixes rdar://problem/20598526. Swift SVN r27538
This commit is contained in:
@@ -382,6 +382,9 @@ public:
|
||||
topLevel->addChild(NodeFactory::create(Node::Kind::NonObjCAttribute));
|
||||
} else if (Mangled.nextIf("TD")) {
|
||||
topLevel->addChild(NodeFactory::create(Node::Kind::DynamicAttribute));
|
||||
} else if (Mangled.nextIf("Td")) {
|
||||
topLevel->addChild(NodeFactory::create(
|
||||
Node::Kind::DirectMethodReferenceAttribute));
|
||||
} else if (Mangled.nextIf("TV")) {
|
||||
topLevel->addChild(NodeFactory::create(Node::Kind::VTableAttribute));
|
||||
}
|
||||
@@ -2241,6 +2244,7 @@ private:
|
||||
case Node::Kind::DependentProtocolWitnessTableTemplate:
|
||||
case Node::Kind::Destructor:
|
||||
case Node::Kind::DidSet:
|
||||
case Node::Kind::DirectMethodReferenceAttribute:
|
||||
case Node::Kind::Directness:
|
||||
case Node::Kind::DynamicAttribute:
|
||||
case Node::Kind::ExplicitClosure:
|
||||
@@ -2767,6 +2771,9 @@ void NodePrinter::print(NodePointer pointer, bool asContext, bool suppressType)
|
||||
case Node::Kind::ObjCAttribute:
|
||||
Printer << "@objc ";
|
||||
return;
|
||||
case Node::Kind::DirectMethodReferenceAttribute:
|
||||
Printer << "super ";
|
||||
return;
|
||||
case Node::Kind::DynamicAttribute:
|
||||
Printer << "dynamic ";
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user