@@ -55,7 +55,7 @@ const uint16_t VERSION_MAJOR = 0;
55
55
// / describe what change you made. The content of this comment isn't important;
56
56
// / it just ensures a conflict if two people change the module format.
57
57
// / Don't worry about adhering to the 80-column limit for this line.
58
- const uint16_t VERSION_MINOR = 433 ; // Last change: GenericTypeParamDecl doesn't need a DC
58
+ const uint16_t VERSION_MINOR = 435 ; // Last change: serialize new-style function parameters
59
59
60
60
using DeclIDField = BCFixed<31 >;
61
61
@@ -706,11 +706,7 @@ namespace decls_block {
706
706
707
707
using ParenTypeLayout = BCRecordLayout<
708
708
PAREN_TYPE,
709
- TypeIDField, // inner type
710
- BCFixed<1 >, // vararg?
711
- BCFixed<1 >, // autoclosure?
712
- BCFixed<1 >, // escaping?
713
- ValueOwnershipField // inout, shared or owned?
709
+ TypeIDField // inner type
714
710
>;
715
711
716
712
using TupleTypeLayout = BCRecordLayout<
@@ -720,21 +716,28 @@ namespace decls_block {
720
716
using TupleTypeEltLayout = BCRecordLayout<
721
717
TUPLE_TYPE_ELT,
722
718
IdentifierIDField, // name
723
- TypeIDField, // type
724
- BCFixed<1 >, // vararg?
725
- BCFixed<1 >, // autoclosure?
726
- BCFixed<1 >, // escaping?
727
- ValueOwnershipField // inout, shared or owned?
719
+ TypeIDField // type
728
720
>;
729
721
730
722
using FunctionTypeLayout = BCRecordLayout<
731
723
FUNCTION_TYPE,
732
- TypeIDField, // input
733
724
TypeIDField, // output
734
725
FunctionTypeRepresentationField, // representation
735
726
BCFixed<1 >, // auto-closure?
736
727
BCFixed<1 >, // noescape?
737
728
BCFixed<1 > // throws?
729
+
730
+ // trailed by parameters
731
+ >;
732
+
733
+ using FunctionParamLayout = BCRecordLayout<
734
+ FUNCTION_PARAM,
735
+ IdentifierIDField, // name
736
+ TypeIDField, // type
737
+ BCFixed<1 >, // vararg?
738
+ BCFixed<1 >, // autoclosure?
739
+ BCFixed<1 >, // escaping?
740
+ ValueOwnershipField // inout, shared or owned?
738
741
>;
739
742
740
743
using MetatypeTypeLayout = BCRecordLayout<
@@ -749,11 +752,6 @@ namespace decls_block {
749
752
MetatypeRepresentationField // representation
750
753
>;
751
754
752
- using InOutTypeLayout = BCRecordLayout<
753
- INOUT_TYPE,
754
- TypeIDField // object type
755
- >;
756
-
757
755
using ArchetypeTypeLayout = BCRecordLayout<
758
756
ARCHETYPE_TYPE,
759
757
GenericEnvironmentIDField, // generic environment
@@ -785,11 +783,12 @@ namespace decls_block {
785
783
786
784
using GenericFunctionTypeLayout = BCRecordLayout<
787
785
GENERIC_FUNCTION_TYPE,
788
- TypeIDField, // input
789
786
TypeIDField, // output
790
787
FunctionTypeRepresentationField, // representation
791
788
BCFixed<1 >, // throws?
792
789
GenericSignatureIDField // generic signture
790
+
791
+ // trailed by parameters
793
792
>;
794
793
795
794
using SILFunctionTypeLayout = BCRecordLayout<
@@ -965,7 +964,6 @@ namespace decls_block {
965
964
BCFixed<1 >, // throws?
966
965
CtorInitializerKindField, // initializer kind
967
966
GenericEnvironmentIDField, // generic environment
968
- TypeIDField, // interface type
969
967
DeclIDField, // overridden decl
970
968
AccessLevelField, // access level
971
969
BCFixed<1 >, // requires a new vtable slot
@@ -1024,7 +1022,7 @@ namespace decls_block {
1024
1022
BCFixed<1 >, // has forced static dispatch?
1025
1023
BCFixed<1 >, // throws?
1026
1024
GenericEnvironmentIDField, // generic environment
1027
- TypeIDField, // interface type
1025
+ TypeIDField, // result interface type
1028
1026
DeclIDField, // operator decl
1029
1027
DeclIDField, // overridden function
1030
1028
BCVBR<5 >, // 0 for a simple name, otherwise the number of parameter name
@@ -1053,7 +1051,7 @@ namespace decls_block {
1053
1051
BCFixed<1 >, // has forced static dispatch?
1054
1052
BCFixed<1 >, // throws?
1055
1053
GenericEnvironmentIDField, // generic environment
1056
- TypeIDField, // interface type
1054
+ TypeIDField, // result interface type
1057
1055
DeclIDField, // overridden function
1058
1056
DeclIDField, // AccessorStorageDecl
1059
1057
AccessorKindField, // accessor kind
@@ -1110,7 +1108,6 @@ namespace decls_block {
1110
1108
using EnumElementLayout = BCRecordLayout<
1111
1109
ENUM_ELEMENT_DECL,
1112
1110
DeclContextIDField,// context decl
1113
- TypeIDField, // interface type
1114
1111
BCFixed<1 >, // implicit?
1115
1112
BCFixed<1 >, // has payload?
1116
1113
EnumElementRawValueKindField, // raw value kind
@@ -1136,7 +1133,7 @@ namespace decls_block {
1136
1133
ReadWriteImplKindField, // read-write implementation
1137
1134
AccessorCountField, // number of accessors
1138
1135
GenericEnvironmentIDField, // generic environment
1139
- TypeIDField, // interface type
1136
+ TypeIDField, // element interface type
1140
1137
DeclIDField, // overridden decl
1141
1138
AccessLevelField, // access level
1142
1139
AccessLevelField, // setter access, if applicable
@@ -1167,9 +1164,7 @@ namespace decls_block {
1167
1164
DeclContextIDField, // context decl
1168
1165
BCFixed<1 >, // implicit?
1169
1166
BCFixed<1 >, // objc?
1170
- GenericEnvironmentIDField, // generic environment
1171
- TypeIDField // interface type
1172
- // Trailed by a pattern for self.
1167
+ GenericEnvironmentIDField // generic environment
1173
1168
>;
1174
1169
1175
1170
using ParameterListLayout = BCRecordLayout<
@@ -1257,8 +1252,8 @@ namespace decls_block {
1257
1252
using GenericRequirementLayout = BCRecordLayout<
1258
1253
GENERIC_REQUIREMENT,
1259
1254
GenericRequirementKindField, // requirement kind
1260
- TypeIDField, // types involved (two for conformance,
1261
- TypeIDField // same-type; one for value witness marker)
1255
+ TypeIDField, // subject type
1256
+ TypeIDField // constraint type
1262
1257
>;
1263
1258
1264
1259
using LayoutRequirementLayout = BCRecordLayout<
0 commit comments