@@ -52,7 +52,7 @@ const uint16_t SWIFTMODULE_VERSION_MAJOR = 0;
52
52
// / describe what change you made. The content of this comment isn't important;
53
53
// / it just ensures a conflict if two people change the module format.
54
54
// / Don't worry about adhering to the 80-column limit for this line.
55
- const uint16_t SWIFTMODULE_VERSION_MINOR = 515 ; // remove DeclContext indirection
55
+ const uint16_t SWIFTMODULE_VERSION_MINOR = 516 ; // encode GenericSignature and GenericEnvironment together
56
56
57
57
using DeclIDField = BCFixed<31 >;
58
58
@@ -129,11 +129,6 @@ using NormalConformanceIDField = DeclIDField;
129
129
using GenericSignatureID = DeclID;
130
130
using GenericSignatureIDField = DeclIDField;
131
131
132
- // GenericEnvironmentID must be the same as DeclID because it is stored in the
133
- // same way.
134
- using GenericEnvironmentID = DeclID;
135
- using GenericEnvironmentIDField = DeclIDField;
136
-
137
132
// SubstitutionMapID must be the same as DeclID because it is stored in the
138
133
// same way.
139
134
using SubstitutionMapID = DeclID;
@@ -843,7 +838,7 @@ namespace decls_block {
843
838
844
839
using PrimaryArchetypeTypeLayout = BCRecordLayout<
845
840
PRIMARY_ARCHETYPE_TYPE,
846
- GenericEnvironmentIDField , // generic environment
841
+ GenericSignatureIDField , // generic environment
847
842
BCVBR<4 >, // generic type parameter depth
848
843
BCVBR<4 > // index + 1, or zero if we have a generic type parameter decl
849
844
>;
@@ -963,7 +958,7 @@ namespace decls_block {
963
958
TypeIDField, // underlying type
964
959
TypeIDField, // interface type (no longer used)
965
960
BCFixed<1 >, // implicit flag
966
- GenericEnvironmentIDField , // generic environment
961
+ GenericSignatureIDField , // generic environment
967
962
AccessLevelField, // access level
968
963
BCArray<TypeIDField> // dependency types
969
964
// Trailed by generic parameters (if any).
@@ -992,7 +987,7 @@ namespace decls_block {
992
987
DeclContextIDField, // context decl
993
988
BCFixed<1 >, // implicit flag
994
989
BCFixed<1 >, // isObjC
995
- GenericEnvironmentIDField , // generic environment
990
+ GenericSignatureIDField , // generic environment
996
991
AccessLevelField, // access level
997
992
BCVBR<4 >, // number of conformances
998
993
BCVBR<4 >, // number of inherited types
@@ -1007,7 +1002,7 @@ namespace decls_block {
1007
1002
DeclContextIDField, // context decl
1008
1003
BCFixed<1 >, // implicit flag
1009
1004
BCFixed<1 >, // isObjC
1010
- GenericEnvironmentIDField , // generic environment
1005
+ GenericSignatureIDField , // generic environment
1011
1006
TypeIDField, // raw type
1012
1007
AccessLevelField, // access level
1013
1008
BCVBR<4 >, // number of conformances
@@ -1024,7 +1019,7 @@ namespace decls_block {
1024
1019
BCFixed<1 >, // implicit?
1025
1020
BCFixed<1 >, // explicitly objc?
1026
1021
BCFixed<1 >, // inherits convenience initializers from its superclass?
1027
- GenericEnvironmentIDField , // generic environment
1022
+ GenericSignatureIDField , // generic environment
1028
1023
TypeIDField, // superclass
1029
1024
AccessLevelField, // access level
1030
1025
BCVBR<4 >, // number of conformances
@@ -1066,7 +1061,7 @@ namespace decls_block {
1066
1061
BCFixed<1 >, // stub implementation?
1067
1062
BCFixed<1 >, // throws?
1068
1063
CtorInitializerKindField, // initializer kind
1069
- GenericEnvironmentIDField , // generic environment
1064
+ GenericSignatureIDField , // generic environment
1070
1065
DeclIDField, // overridden decl
1071
1066
AccessLevelField, // access level
1072
1067
BCFixed<1 >, // requires a new vtable slot
@@ -1134,7 +1129,7 @@ namespace decls_block {
1134
1129
SelfAccessKindField, // self access kind
1135
1130
BCFixed<1 >, // has forced static dispatch?
1136
1131
BCFixed<1 >, // throws?
1137
- GenericEnvironmentIDField , // generic environment
1132
+ GenericSignatureIDField , // generic environment
1138
1133
TypeIDField, // result interface type
1139
1134
BCFixed<1 >, // IUO result?
1140
1135
DeclIDField, // operator decl
@@ -1160,7 +1155,7 @@ namespace decls_block {
1160
1155
DeclIDField, // naming decl
1161
1156
GenericSignatureIDField, // interface generic signature
1162
1157
TypeIDField, // interface type for opaque type
1163
- GenericEnvironmentIDField , // generic environment
1158
+ GenericSignatureIDField , // generic environment
1164
1159
SubstitutionMapIDField // optional substitution map for underlying type
1165
1160
// trailed by generic parameters
1166
1161
>;
@@ -1176,7 +1171,7 @@ namespace decls_block {
1176
1171
SelfAccessKindField, // self access kind
1177
1172
BCFixed<1 >, // has forced static dispatch?
1178
1173
BCFixed<1 >, // throws?
1179
- GenericEnvironmentIDField , // generic environment
1174
+ GenericSignatureIDField , // generic environment
1180
1175
TypeIDField, // result interface type
1181
1176
BCFixed<1 >, // IUO result?
1182
1177
DeclIDField, // overridden function
@@ -1263,7 +1258,7 @@ namespace decls_block {
1263
1258
WriteImplKindField, // write implementation
1264
1259
ReadWriteImplKindField, // read-write implementation
1265
1260
AccessorCountField, // number of accessors
1266
- GenericEnvironmentIDField , // generic environment
1261
+ GenericSignatureIDField , // generic environment
1267
1262
TypeIDField, // element interface type
1268
1263
BCFixed<1 >, // IUO element?
1269
1264
DeclIDField, // overridden decl
@@ -1286,7 +1281,7 @@ namespace decls_block {
1286
1281
TypeIDField, // base type
1287
1282
DeclContextIDField, // context decl
1288
1283
BCFixed<1 >, // implicit flag
1289
- GenericEnvironmentIDField , // generic environment
1284
+ GenericSignatureIDField , // generic environment
1290
1285
BCVBR<4 >, // # of protocol conformances
1291
1286
BCVBR<4 >, // number of inherited types
1292
1287
BCArray<TypeIDField> // inherited types, followed by TypeID dependencies
@@ -1299,7 +1294,7 @@ namespace decls_block {
1299
1294
DeclContextIDField, // context decl
1300
1295
BCFixed<1 >, // implicit?
1301
1296
BCFixed<1 >, // objc?
1302
- GenericEnvironmentIDField // generic environment
1297
+ GenericSignatureIDField // generic environment
1303
1298
// This record is trailed by its inlinable body text
1304
1299
>;
1305
1300
@@ -1379,8 +1374,8 @@ namespace decls_block {
1379
1374
// Conformances trail the record.
1380
1375
>;
1381
1376
1382
- using SILGenericEnvironmentLayout = BCRecordLayout<
1383
- SIL_GENERIC_ENVIRONMENT ,
1377
+ using SILGenericSignatureLayout = BCRecordLayout<
1378
+ SIL_GENERIC_SIGNATURE ,
1384
1379
BCArray<TypeIDField> // (generic parameter name, sugared interface
1385
1380
// type) pairs
1386
1381
>;
@@ -1780,7 +1775,7 @@ namespace index_block {
1780
1775
LOCAL_DECL_CONTEXT_OFFSETS,
1781
1776
LOCAL_TYPE_DECLS,
1782
1777
OPAQUE_RETURN_TYPE_DECLS,
1783
- GENERIC_ENVIRONMENT_OFFSETS ,
1778
+ GENERIC_SIGNATURE_OFFSETS ,
1784
1779
NORMAL_CONFORMANCE_OFFSETS,
1785
1780
SIL_LAYOUT_OFFSETS,
1786
1781
@@ -1790,7 +1785,6 @@ namespace index_block {
1790
1785
1791
1786
ORDERED_TOP_LEVEL_DECLS,
1792
1787
1793
- GENERIC_SIGNATURE_OFFSETS,
1794
1788
SUBSTITUTION_MAP_OFFSETS,
1795
1789
LastRecordKind = SUBSTITUTION_MAP_OFFSETS,
1796
1790
};
0 commit comments