mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
AST: Nuke the unqualified archetype mangling
This commit is contained in:
@@ -1421,15 +1421,6 @@ private:
|
||||
return entity;
|
||||
}
|
||||
|
||||
NodePointer demangleArchetypeRef(Node::IndexType depth, Node::IndexType i) {
|
||||
// FIXME: Name won't match demangled context generic signatures correctly.
|
||||
auto ref = NodeFactory::create(Node::Kind::ArchetypeRef,
|
||||
archetypeName(i, depth));
|
||||
ref->addChild(NodeFactory::create(Node::Kind::Index, depth));
|
||||
ref->addChild(NodeFactory::create(Node::Kind::Index, i));
|
||||
return ref;
|
||||
}
|
||||
|
||||
NodePointer getDependentGenericParamType(unsigned depth, unsigned index) {
|
||||
DemanglerPrinter PrintName;
|
||||
PrintName << archetypeName(index, depth);
|
||||
@@ -1773,14 +1764,6 @@ private:
|
||||
NodePointer stdlib = NodeFactory::create(Node::Kind::Module, STDLIB_NAME);
|
||||
return makeAssociatedType(stdlib);
|
||||
}
|
||||
if (Mangled.nextIf('d')) {
|
||||
Node::IndexType depth, index;
|
||||
if (!demangleIndex(depth))
|
||||
return nullptr;
|
||||
if (!demangleIndex(index))
|
||||
return nullptr;
|
||||
return demangleArchetypeRef(depth + 1, index);
|
||||
}
|
||||
if (Mangled.nextIf('q')) {
|
||||
NodePointer index = demangleIndexAsNode();
|
||||
if (!index)
|
||||
@@ -1795,10 +1778,7 @@ private:
|
||||
qual_atype->addChild(decl_ctx);
|
||||
return qual_atype;
|
||||
}
|
||||
Node::IndexType index;
|
||||
if (!demangleIndex(index))
|
||||
return nullptr;
|
||||
return demangleArchetypeRef(0, index);
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
NodePointer demangleTuple(IsVariadic isV) {
|
||||
@@ -2449,7 +2429,6 @@ private:
|
||||
bool isSimpleType(NodePointer pointer) {
|
||||
switch (pointer->getKind()) {
|
||||
case Node::Kind::Archetype:
|
||||
case Node::Kind::ArchetypeRef:
|
||||
case Node::Kind::AssociatedType:
|
||||
case Node::Kind::AssociatedTypeRef:
|
||||
case Node::Kind::BoundGenericClass:
|
||||
@@ -3574,9 +3553,6 @@ void NodePrinter::print(NodePointer pointer, bool asContext, bool suppressType)
|
||||
Printer << pointer->getText();
|
||||
return;
|
||||
}
|
||||
case Node::Kind::ArchetypeRef:
|
||||
Printer << pointer->getText();
|
||||
return;
|
||||
case Node::Kind::AssociatedTypeRef:
|
||||
print(pointer->getChild(0));
|
||||
Printer << '.' << pointer->getChild(1)->getText();
|
||||
|
||||
Reference in New Issue
Block a user