[AST] Introduce BuiltinProtocolConformance

This commit is contained in:
Azoy
2020-05-23 11:07:38 -04:00
parent 64ec60bbd4
commit f21a306ae5
16 changed files with 294 additions and 27 deletions

View File

@@ -2,7 +2,7 @@
//
// This source file is part of the Swift.org open source project
//
// Copyright (c) 2014 - 2018 Apple Inc. and the Swift project authors
// Copyright (c) 2014 - 2020 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
@@ -56,7 +56,7 @@ const uint16_t SWIFTMODULE_VERSION_MAJOR = 0;
/// 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.
/// Don't worry about adhering to the 80-column limit for this line.
const uint16_t SWIFTMODULE_VERSION_MINOR = 583; // @actorIndependent safe/unsafe attribute
const uint16_t SWIFTMODULE_VERSION_MINOR = 584; // builtin protocol conformances
/// A standard hash seed used for all string hashes in a serialized module.
///
@@ -1628,6 +1628,14 @@ namespace decls_block {
TypeIDField // the conforming type
>;
using BuiltinProtocolConformanceLayout = BCRecordLayout<
BUILTIN_PROTOCOL_CONFORMANCE,
TypeIDField, // the conforming type
DeclIDField, // the protocol
BCVBR<5> // the number of element conformances
// the (optional) element conformances follow
>;
// Refers to a normal protocol conformance in the given module via its id.
using NormalProtocolConformanceIdLayout = BCRecordLayout<
NORMAL_PROTOCOL_CONFORMANCE_ID,