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:
Joe Groff
2017-12-12 09:57:36 -08:00
parent 9ac1dc80b0
commit a7a3b17597
58 changed files with 3418 additions and 1291 deletions

View File

@@ -32,7 +32,7 @@ intptr_t _swift_stdlib_getDefaultErrorCode(OpaqueValue *error,
// Enum tags use negative values for payload cases, so adjust code to be
// in the range [0, num-cases).
result = T->vw_getEnumTag(error) +
T->getNominalTypeDescriptor()->Enum.getNumPayloadCases();
T->getTypeContextDescriptor()->Enum.getNumPayloadCases();
break;
case MetadataKind::Class: