[Serialization] Stop serializing the contextual types of parameter declarations.

Only serialize the interface types of parameter declarations into the
module file, then lazily build the contextual types when
requested. This saves a small amount of space in the Swift module
files (~64k for the Swift standard library) and some effort on load.
This commit is contained in:
Doug Gregor
2016-12-08 16:50:11 -08:00
parent df80a0c4d9
commit 1f89886ffa
5 changed files with 41 additions and 22 deletions

View File

@@ -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 = 292; // Last change: SILBoxType layout
const uint16_t VERSION_MINOR = 293; // Last change: parameter context types
using DeclID = PointerEmbeddedInt<unsigned, 31>;
using DeclIDField = BCFixed<31>;
@@ -881,7 +881,6 @@ namespace decls_block {
IdentifierIDField, // parameter name
DeclContextIDField, // context decl
BCFixed<1>, // isLet?
TypeIDField, // type
TypeIDField // interface type
>;