Render TypeContextDescriptor into a proper hierarchy; NFC.

The purpose here is to make it easier to add type-specific fields to the
descriptor.
This commit is contained in:
John McCall
2018-02-20 15:20:32 -05:00
parent fab3c180f9
commit 23fa44e56c
7 changed files with 368 additions and 232 deletions

View File

@@ -638,7 +638,7 @@ id getErrorEmbeddedNSErrorIndirect(const OpaqueValue *error,
/******************************************************************************/
/// Nominal type descriptor for Swift.AnyHashable.
extern "C" const TypeContextDescriptor STRUCT_TYPE_DESCR_SYM(s11AnyHashable);
extern "C" const StructDescriptor STRUCT_TYPE_DESCR_SYM(s11AnyHashable);
static bool isAnyHashableType(const StructMetadata *type) {
return type->getDescription() == &STRUCT_TYPE_DESCR_SYM(s11AnyHashable);
@@ -2117,13 +2117,13 @@ static bool tryDynamicCastBoxedSwiftValue(OpaqueValue *dest,
/******************************************************************************/
/// Nominal type descriptor for Swift.Array.
extern "C" const TypeContextDescriptor NOMINAL_TYPE_DESCR_SYM(Sa);
extern "C" const StructDescriptor NOMINAL_TYPE_DESCR_SYM(Sa);
/// Nominal type descriptor for Swift.Dictionary.
extern "C" const TypeContextDescriptor STRUCT_TYPE_DESCR_SYM(s10Dictionary);
extern "C" const StructDescriptor STRUCT_TYPE_DESCR_SYM(s10Dictionary);
/// Nominal type descriptor for Swift.Set.
extern "C" const TypeContextDescriptor STRUCT_TYPE_DESCR_SYM(s3Set);
extern "C" const StructDescriptor STRUCT_TYPE_DESCR_SYM(s3Set);
// internal func _arrayDownCastIndirect<SourceValue, TargetValue>(
// _ source: UnsafePointer<Array<SourceValue>>,