mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Runtime: Provide value witness implementations for class existentials.
Same deal as for opaque existentials--pre-instantiate a static witness table for one-witness-table types (the zero-witness-tables case is nicely handled by Builtin.ObjCPointer's value witness), and generate a vwtable using dynamic witness implementations for each different-sized container on demand as necessary. Swift SVN r9850
This commit is contained in:
@@ -1396,6 +1396,15 @@ OpaqueValue *swift_assignExistentialWithCopy1(OpaqueValue *dest,
|
||||
const OpaqueValue *src,
|
||||
const Metadata *type);
|
||||
|
||||
/// \brief Standard 'typeof' value witness for heap object references that may
|
||||
/// not be native Swift objects.
|
||||
///
|
||||
/// \param obj The object reference.
|
||||
///
|
||||
/// \returns The dynamic type metadata for the object.
|
||||
extern "C"
|
||||
const Metadata *swift_unknownTypeOf(HeapObject *obj);
|
||||
|
||||
} // end namespace swift
|
||||
|
||||
#endif /* SWIFT_RUNTIME_METADATA_H */
|
||||
|
||||
Reference in New Issue
Block a user