Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions docs/ABI.rst
Original file line number Diff line number Diff line change
Expand Up @@ -792,6 +792,9 @@ Globals
global ::= type 'WV' // value witness table
global ::= entity 'Wv' DIRECTNESS // field offset

global ::= type 'Wy' // Outlined Copy Function Type
global ::= type 'We' // Outlined Consume Function Type

DIRECTNESS ::= 'd' // direct
DIRECTNESS ::= 'i' // indirect

Expand Down
2 changes: 2 additions & 0 deletions include/swift/Basic/DemangleNodes.def
Original file line number Diff line number Diff line change
Expand Up @@ -177,5 +177,7 @@ NODE(ThrowsAnnotation)
NODE(EmptyList)
NODE(FirstElementMarker)
NODE(VariadicMarker)
NODE(OutlinedCopy)
NODE(OutlinedConsume)
#undef CONTEXT_NODE
#undef NODE
10 changes: 10 additions & 0 deletions lib/Basic/Demangle.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2544,6 +2544,8 @@ class NodePrinter {
case Node::Kind::EmptyList:
case Node::Kind::FirstElementMarker:
case Node::Kind::VariadicMarker:
case Node::Kind::OutlinedCopy:
case Node::Kind::OutlinedConsume:
return false;
}
unreachable("bad node kind");
Expand Down Expand Up @@ -2975,6 +2977,14 @@ void NodePrinter::print(NodePointer pointer, bool asContext, bool suppressType)
Printer << "curry thunk of ";
print(pointer->getChild(0), asContext, suppressType);
return;
case Node::Kind::OutlinedCopy:
Printer << "outlined copy of ";
print(pointer->getChild(0), asContext, suppressType);
return;
case Node::Kind::OutlinedConsume:
Printer << "outlined consume of ";
print(pointer->getChild(0), asContext, suppressType);
return;
case Node::Kind::Directness:
Printer << toString(Directness(pointer->getIndex())) << " ";
return;
Expand Down
8 changes: 8 additions & 0 deletions lib/Basic/Demangler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1320,6 +1320,14 @@ NodePointer Demangler::demangleWitness() {
return createWithChildren(Node::Kind::AssociatedTypeWitnessTableAccessor,
Conf, Name, ProtoTy);
}
case 'y': {
return createWithChild(Node::Kind::OutlinedCopy,
popNode(Node::Kind::Type));
}
case 'e': {
return createWithChild(Node::Kind::OutlinedConsume,
popNode(Node::Kind::Type));
}
default:
return nullptr;
}
Expand Down
10 changes: 10 additions & 0 deletions lib/Basic/Remangle.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1697,6 +1697,16 @@ void Remangler::mangleVariadicMarker(Node *node) {
Out << "<vararg>";
}

void Remangler::mangleOutlinedCopy(Node *node) {
Out << "Wy";
mangleChildNodes(node);
}

void Remangler::mangleOutlinedConsume(Node *node) {
Out << "We";
mangleChildNodes(node);
}

void Remangler::mangleSILBoxTypeWithLayout(Node *node) {
assert(node->getKind() == Node::Kind::SILBoxTypeWithLayout);
assert(node->getNumChildren() == 1 || node->getNumChildren() == 3);
Expand Down
10 changes: 10 additions & 0 deletions lib/Basic/Remangler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1626,6 +1626,16 @@ void Remangler::mangleVariadicMarker(Node *node) {
Buffer << 'd';
}

void Remangler::mangleOutlinedCopy(Node *node) {
mangleSingleChildNode(node);
Buffer << "Wy";
}

void Remangler::mangleOutlinedConsume(Node *node) {
mangleSingleChildNode(node);
Buffer << "We";
}

void Remangler::mangleSILBoxTypeWithLayout(Node *node) {
assert(node->getNumChildren() == 1 || node->getNumChildren() == 3);
assert(node->getChild(0)->getKind() == Node::Kind::SILBoxLayout);
Expand Down
Loading