mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
Replace nominal type descriptors with a hierarchy of context descriptors.
This new format more efficiently represents existing information, while more accurately encoding important information about nested generic contexts with same-type and layout constraints that need to be evaluated at runtime. It's also designed with an eye to forward- and backward-compatible expansion for ABI stability with future Swift versions.
This commit is contained in:
@@ -138,7 +138,7 @@ public:
|
||||
|
||||
return createNominalTypeDecl(node);
|
||||
}
|
||||
|
||||
|
||||
NominalTypeDecl *createNominalTypeDecl(const Demangle::NodePointer &node);
|
||||
|
||||
ProtocolDecl *createProtocolDecl(const Demangle::NodePointer &node) {
|
||||
@@ -1107,8 +1107,8 @@ public:
|
||||
Result<MetadataKind>
|
||||
getKindForRemoteTypeMetadata(RemoteAddress metadata) override {
|
||||
auto result = Reader.readKindFromMetadata(metadata.getAddressData());
|
||||
if (result.first)
|
||||
return result.second;
|
||||
if (result)
|
||||
return *result;
|
||||
return getFailure<MetadataKind>();
|
||||
}
|
||||
|
||||
@@ -1145,7 +1145,7 @@ public:
|
||||
Result<RemoteAddress>
|
||||
getHeapMetadataForObject(RemoteAddress object) override {
|
||||
auto result = Reader.readMetadataFromInstance(object.getAddressData());
|
||||
if (result.first) return RemoteAddress(result.second);
|
||||
if (result) return RemoteAddress(*result);
|
||||
return getFailure<RemoteAddress>();
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user