Support in-place value metadata initialization in the runtime.

This commit is contained in:
John McCall
2018-07-24 18:27:42 -04:00
parent e6fc5cb54e
commit dadb51e708
6 changed files with 340 additions and 15 deletions

View File

@@ -1202,6 +1202,14 @@ class TypeContextDescriptorFlags : public FlagSet<uint16_t> {
/// declarations associated with the same declaration.
IsSynthesizedRelatedEntity = 3,
/// Set if the type requires non-trivial but non-generic metadata
/// initialization. It may or may not be truly "in place" depending
/// on the kind of metadata.
///
/// Currently only meaningful for value descriptors, but will be
/// extended to class descriptors.
HasInPlaceMetadataInitialization = 4,
/// Set if the context descriptor is includes metadata for dynamically
/// constructing a class's vtables at metadata instantiation time.
///
@@ -1237,6 +1245,10 @@ public:
isSynthesizedRelatedEntity,
setIsSynthesizedRelatedEntity)
FLAGSET_DEFINE_FLAG_ACCESSORS(HasInPlaceMetadataInitialization,
hasInPlaceMetadataInitialization,
setHasInPlaceMetadataInitialization)
FLAGSET_DEFINE_FLAG_ACCESSORS(Class_HasVTable,
class_hasVTable,
class_setHasVTable)