Skip to content

Commit 06c3c99

Browse files
authored
Merge pull request #8933 from jrose-apple/check-the-type-before-you-decl
[Serialization] Drop decls whose types can't be deserialized.
2 parents fea17f2 + 5344d16 commit 06c3c99

File tree

11 files changed

+790
-347
lines changed

11 files changed

+790
-347
lines changed

include/swift/Serialization/ModuleFormat.h

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ const unsigned char MODULE_DOC_SIGNATURE[] = { 0xE2, 0x9C, 0xA8, 0x07 };
4444

4545
/// Serialized module format major version number.
4646
///
47-
/// Always 0 for Swift 1.x - 3.x.
47+
/// Always 0 for Swift 1.x - 4.x.
4848
const uint16_t VERSION_MAJOR = 0;
4949

5050
/// Serialized module format minor version number.
@@ -54,7 +54,7 @@ const uint16_t VERSION_MAJOR = 0;
5454
/// in source control, you should also update the comment to briefly
5555
/// describe what change you made. The content of this comment isn't important;
5656
/// it just ensures a conflict if two people change the module format.
57-
const uint16_t VERSION_MINOR = 338; // Last change: OPERAND_WITH_ATTR format.
57+
const uint16_t VERSION_MINOR = 339; // Last change: member canonical types
5858

5959
using DeclID = PointerEmbeddedInt<unsigned, 31>;
6060
using DeclIDField = BCFixed<31>;
@@ -858,7 +858,8 @@ namespace decls_block {
858858
BCFixed<1>, // throws?
859859
CtorInitializerKindField, // initializer kind
860860
GenericEnvironmentIDField, // generic environment
861-
TypeIDField, // type (interface)
861+
TypeIDField, // interface type
862+
TypeIDField, // canonical interface type
862863
DeclIDField, // overridden decl
863864
AccessibilityKindField, // accessibility
864865
BCArray<IdentifierIDField> // argument names
@@ -877,6 +878,7 @@ namespace decls_block {
877878
BCFixed<1>, // HasNonPatternBindingInit?
878879
StorageKindField, // StorageKind
879880
TypeIDField, // interface type
881+
TypeIDField, // canonical interface type
880882
DeclIDField, // getter
881883
DeclIDField, // setter
882884
DeclIDField, // materializeForSet
@@ -911,6 +913,7 @@ namespace decls_block {
911913
BCVBR<5>, // number of parameter patterns
912914
GenericEnvironmentIDField, // generic environment
913915
TypeIDField, // interface type
916+
TypeIDField, // canonical interface type
914917
DeclIDField, // operator decl
915918
DeclIDField, // overridden function
916919
DeclIDField, // AccessorStorageDecl
@@ -982,6 +985,7 @@ namespace decls_block {
982985
StorageKindField, // StorageKind
983986
GenericEnvironmentIDField, // generic environment
984987
TypeIDField, // interface type
988+
TypeIDField, // canonical interface type
985989
DeclIDField, // getter
986990
DeclIDField, // setter
987991
DeclIDField, // materializeForSet

0 commit comments

Comments
 (0)