File tree Expand file tree Collapse file tree 5 files changed +11
-3
lines changed Expand file tree Collapse file tree 5 files changed +11
-3
lines changed Original file line number Diff line number Diff line change 1
1
---
2
2
refs/heads/master: a67ffadd758dfc7a0f10a8afde063b8864663208
3
- refs/heads/master-next: 3cb1b6a96faa2b634f3746461e132c27f14a5db5
3
+ refs/heads/master-next: cfae7bba3d3f27d41cd062478e8fcde6e679f5d2
4
4
refs/tags/osx-passed: b6b74147ef8a386f532cf9357a1bde006e552c54
5
5
refs/tags/swift-2.2-SNAPSHOT-2015-12-01-a: 6bb18e013c2284f2b45f5f84f2df2887dc0f7dea
6
6
refs/tags/swift-2.2-SNAPSHOT-2015-12-01-b: 66d897bfcf64a82cb9a87f5e663d889189d06d07
Original file line number Diff line number Diff line change @@ -4305,6 +4305,9 @@ class ProtocolDecl final : public NominalTypeDecl {
4305
4305
// / requirements listed here become entries in the witness table.
4306
4306
ArrayRef<Requirement> getRequirementSignature () const ;
4307
4307
4308
+ // / Is the requirement signature currently being computed?
4309
+ bool isComputingRequirementSignature () const ;
4310
+
4308
4311
// / Has the requirement signature been computed yet?
4309
4312
bool isRequirementSignatureComputed () const {
4310
4313
return RequirementSignature != nullptr ;
Original file line number Diff line number Diff line change @@ -1056,7 +1056,7 @@ class GenericSignatureBuilder::RequirementSource final
1056
1056
WrittenRequirementLoc writtenReqLoc)
1057
1057
: kind(kind), storageKind(StorageKind::StoredType),
1058
1058
hasTrailingWrittenRequirementLoc(!writtenReqLoc.isNull()),
1059
- usesRequirementSignature(protocol->isRequirementSignatureComputed ()),
1059
+ usesRequirementSignature(! protocol->isComputingRequirementSignature ()),
1060
1060
parent(parent) {
1061
1061
assert ((static_cast <bool >(parent) != isRootKind (kind)) &&
1062
1062
" Root RequirementSource should not have parent (or vice versa)" );
Original file line number Diff line number Diff line change @@ -4575,6 +4575,11 @@ ArrayRef<Requirement> ProtocolDecl::getRequirementSignature() const {
4575
4575
None);
4576
4576
}
4577
4577
4578
+ bool ProtocolDecl::isComputingRequirementSignature () const {
4579
+ return getASTContext ().evaluator .hasActiveRequest (
4580
+ RequirementSignatureRequest{const_cast <ProtocolDecl*>(this )});
4581
+ }
4582
+
4578
4583
void ProtocolDecl::setRequirementSignature (ArrayRef<Requirement> requirements) {
4579
4584
assert (!RequirementSignature && " requirement signature already set" );
4580
4585
if (requirements.empty ()) {
Original file line number Diff line number Diff line change @@ -4107,7 +4107,7 @@ ConstraintResult GenericSignatureBuilder::expandConformanceRequirement(
4107
4107
// Use the requirement signature to avoid rewalking the entire protocol. This
4108
4108
// cannot compute the requirement signature directly, because that may be
4109
4109
// infinitely recursive: this code is also used to construct it.
4110
- if (proto->isRequirementSignatureComputed ()) {
4110
+ if (! proto->isComputingRequirementSignature ()) {
4111
4111
auto innerSource =
4112
4112
FloatingRequirementSource::viaProtocolRequirement (source, proto,
4113
4113
/* inferred=*/ false );
You can’t perform that action at this time.
0 commit comments