mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Track the generic parameters and requirements of nominal type declarations.
Put generic nominal type declarations through the same dependent-type validation as generic functions, then capture their generic parameters and requirements in their generic signature. This allows us to re-instate the requirements in their dependent forms, before the archetypes ruin them completely. Swift SVN r8958
This commit is contained in:
@@ -320,6 +320,7 @@ namespace decls_block {
|
||||
GENERIC_PARAM_LIST = 240,
|
||||
GENERIC_PARAM,
|
||||
GENERIC_REQUIREMENT,
|
||||
LAST_GENERIC_REQUIREMENT,
|
||||
|
||||
NO_CONFORMANCE = 250,
|
||||
NORMAL_PROTOCOL_CONFORMANCE = 251,
|
||||
@@ -762,6 +763,17 @@ namespace decls_block {
|
||||
BCArray<TypeIDField> // types involved (currently always two)
|
||||
>;
|
||||
|
||||
/// Placeholder that marks the last generic requirement in the generic
|
||||
/// parameters list.
|
||||
///
|
||||
/// Used as a buffer between the generic parameter list's requirements and
|
||||
/// the generic signature's requirements for nominal type declarations.
|
||||
/// FIXME: Expected to go away once the latter is no longer serialized.
|
||||
using LastGenericRequirementLayout = BCRecordLayout<
|
||||
LAST_GENERIC_REQUIREMENT,
|
||||
BCFixed<1> // dummy
|
||||
>;
|
||||
|
||||
/// A placeholder for lack of conformance information. Conformances are
|
||||
/// indexed, so simply omitting one would be incorrect.
|
||||
using NoConformanceLayout = BCRecordLayout<
|
||||
|
||||
Reference in New Issue
Block a user