Skip to content

Commit 713bb43

Browse files
committed
Rework the serialization schema for conformances and requirements.
We now schedule conformance emissions in basically the same way we do for types and declarations, which means that we'll emit them uniquely in the module file instead of redundantly at every use. This should produce substantially smaller module files overall, especially for modules that heavily use generics. It also means that we can remove all the unfortunate code to support using different abbrev codes for them in different bitcode blocks. Requirement lists are now emitted inline in the records that need them instead of as trailing records. I think this will improve space usage, but mostly it assists in eliminating the problem where abbrev codes are shared between blocks.
1 parent 9f95d01 commit 713bb43

12 files changed

+816
-839
lines changed

lib/Serialization/DeclTypeRecordNodes.def

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,6 @@ DECL(OPAQUE_TYPE)
127127
DECL(PATTERN_BINDING)
128128
DECL(PROTOCOL)
129129
TRAILING_INFO(DEFAULT_WITNESS_TABLE)
130-
TRAILING_INFO(PROTOCOL_TYPEALIAS)
131130
TRAILING_INFO(ASSOCIATED_TYPE)
132131
DECL(PREFIX_OPERATOR)
133132
DECL(POSTFIX_OPERATOR)
@@ -172,8 +171,8 @@ OTHER(TOP_LEVEL_CODE_DECL_CONTEXT, 223)
172171

173172
OTHER(GENERIC_PARAM_LIST, 230)
174173
OTHER(GENERIC_SIGNATURE, 231)
175-
TRAILING_INFO(GENERIC_REQUIREMENT)
176-
TRAILING_INFO(LAYOUT_REQUIREMENT)
174+
OTHER(REQUIREMENT_SIGNATURE, 232)
175+
// 233 is unused; was LAYOUT_REQUIREMENT
177176
OTHER(BUILTIN_PROTOCOL_CONFORMANCE, 234)
178177
OTHER(SIL_GENERIC_SIGNATURE, 235)
179178
OTHER(SUBSTITUTION_MAP, 236)
@@ -182,14 +181,14 @@ OTHER(LOCAL_DISCRIMINATOR, 237)
182181
OTHER(PRIVATE_DISCRIMINATOR, 238)
183182
OTHER(FILENAME_FOR_PRIVATE, 239)
184183

185-
OTHER(ABSTRACT_PROTOCOL_CONFORMANCE, 240)
184+
// 240 is unused; was ABSTRACT_PROTOCOL_CONFORMANCE
186185
OTHER(NORMAL_PROTOCOL_CONFORMANCE, 241)
187186
OTHER(SPECIALIZED_PROTOCOL_CONFORMANCE, 242)
188187
OTHER(INHERITED_PROTOCOL_CONFORMANCE, 243)
189-
OTHER(INVALID_PROTOCOL_CONFORMANCE, 244)
188+
// 244 is unused; was INVALID_PROTOCOL_CONFORMANCE
190189

191190
OTHER(SIL_LAYOUT, 245)
192-
OTHER(NORMAL_PROTOCOL_CONFORMANCE_ID, 246)
191+
// 246 is unused; was NORMAL_PROTOCOL_CONFORMANCE_ID
193192
OTHER(PROTOCOL_CONFORMANCE_XREF, 247)
194193
OTHER(MEMBERS, 248)
195194
OTHER(XREF, 249)

0 commit comments

Comments
 (0)