mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
[NamedLazyMemberLoading] Add initial bits of serialized Decl member tables.
This commit is contained in:
@@ -54,7 +54,7 @@ const uint16_t VERSION_MAJOR = 0;
|
||||
/// in source control, you should also update the comment to briefly
|
||||
/// describe what change you made. The content of this comment isn't important;
|
||||
/// it just ensures a conflict if two people change the module format.
|
||||
const uint16_t VERSION_MINOR = 377; // Last change: SILFunctionType witness_method conformances
|
||||
const uint16_t VERSION_MINOR = 378; // Last change: DECL_MEMBER_NAMES
|
||||
|
||||
using DeclIDField = BCFixed<31>;
|
||||
|
||||
@@ -440,6 +440,11 @@ enum BlockID {
|
||||
/// \sa index_block
|
||||
INDEX_BLOCK_ID,
|
||||
|
||||
/// The declaration member-tables index block, a sub-blocb of the index block.
|
||||
///
|
||||
/// \sa decl_member_tables_block
|
||||
DECL_MEMBER_TABLES_BLOCK_ID,
|
||||
|
||||
/// The block for SIL functions.
|
||||
///
|
||||
/// \sa sil_block
|
||||
@@ -1516,6 +1521,7 @@ namespace index_block {
|
||||
|
||||
PRECEDENCE_GROUPS,
|
||||
NESTED_TYPE_DECLS,
|
||||
DECL_MEMBER_NAMES,
|
||||
|
||||
LastRecordKind = PRECEDENCE_GROUPS,
|
||||
};
|
||||
@@ -1559,12 +1565,32 @@ namespace index_block {
|
||||
BCBlob // map from identifier strings to decl kinds / decl IDs
|
||||
>;
|
||||
|
||||
using DeclMemberNamesLayout = BCRecordLayout<
|
||||
DECL_MEMBER_NAMES, // record ID
|
||||
BCVBR<16>, // table offset within the blob (see below)
|
||||
BCBlob // map from member DeclBaseNames to offsets of DECL_MEMBERS records
|
||||
>;
|
||||
|
||||
using EntryPointLayout = BCRecordLayout<
|
||||
ENTRY_POINT,
|
||||
DeclIDField // the ID of the main class; 0 if there was a main source file
|
||||
>;
|
||||
}
|
||||
|
||||
/// \sa DECL_MEMBER_TABLES_BLOCK_ID
|
||||
namespace decl_member_tables_block {
|
||||
enum RecordKind {
|
||||
DECL_MEMBERS = 1,
|
||||
};
|
||||
|
||||
using DeclMembersLayout = BCRecordLayout<
|
||||
DECL_MEMBERS, // record ID
|
||||
BCVBR<16>, // table offset within the blob (see below)
|
||||
BCBlob // maps from DeclIDs to DeclID vectors
|
||||
>;
|
||||
|
||||
}
|
||||
|
||||
/// \sa COMMENT_BLOCK_ID
|
||||
namespace comment_block {
|
||||
enum RecordKind {
|
||||
|
||||
Reference in New Issue
Block a user