@@ -1192,10 +1192,6 @@ void LazyConformanceLoader::anchor() {}
1192
1192
// / Lookup table used to store members of a nominal type (and its extensions)
1193
1193
// / for fast retrieval.
1194
1194
class swift ::MemberLookupTable : public ASTAllocated<swift::MemberLookupTable> {
1195
- // / The last extension that was included within the member lookup table's
1196
- // / results.
1197
- ExtensionDecl *LastExtensionIncluded = nullptr ;
1198
-
1199
1195
// / The type of the internal lookup table.
1200
1196
typedef llvm::DenseMap<DeclName, llvm::TinyPtrVector<ValueDecl *>>
1201
1197
LookupTable;
@@ -1212,9 +1208,6 @@ class swift::MemberLookupTable : public ASTAllocated<swift::MemberLookupTable> {
1212
1208
// / Create a new member lookup table.
1213
1209
explicit MemberLookupTable (ASTContext &ctx);
1214
1210
1215
- // / Update a lookup table with members from newly-added extensions.
1216
- void updateLookupTable (NominalTypeDecl *nominal);
1217
-
1218
1211
// / Add the given member to the lookup table.
1219
1212
void addMember (Decl *members);
1220
1213
@@ -1250,12 +1243,6 @@ class swift::MemberLookupTable : public ASTAllocated<swift::MemberLookupTable> {
1250
1243
}
1251
1244
1252
1245
void dump (llvm::raw_ostream &os) const {
1253
- os << " LastExtensionIncluded:\n " ;
1254
- if (LastExtensionIncluded)
1255
- LastExtensionIncluded->printContext (os, 2 );
1256
- else
1257
- os << " nullptr\n " ;
1258
-
1259
1246
os << " Lookup:\n " ;
1260
1247
for (auto &pair : Lookup) {
1261
1248
pair.getFirst ().print (os);
@@ -1357,22 +1344,6 @@ void MemberLookupTable::addMembers(DeclRange members) {
1357
1344
}
1358
1345
}
1359
1346
1360
- void MemberLookupTable::updateLookupTable (NominalTypeDecl *nominal) {
1361
- // If the last extension we included is the same as the last known extension,
1362
- // we're already up-to-date.
1363
- if (LastExtensionIncluded == nominal->LastExtension )
1364
- return ;
1365
-
1366
- // Add members from each of the extensions that we have not yet visited.
1367
- for (auto next = LastExtensionIncluded
1368
- ? LastExtensionIncluded->NextExtension .getPointer ()
1369
- : nominal->FirstExtension ;
1370
- next;
1371
- (LastExtensionIncluded = next,next = next->NextExtension .getPointer ())) {
1372
- addMembers (next->getMembers ());
1373
- }
1374
- }
1375
-
1376
1347
void NominalTypeDecl::addedExtension (ExtensionDecl *ext) {
1377
1348
auto *table = LookupTable.getPointer ();
1378
1349
@@ -1619,7 +1590,6 @@ DirectLookupRequest::evaluate(Evaluator &evaluator,
1619
1590
for (auto E : decl->getExtensions ())
1620
1591
(void )E->getMembers ();
1621
1592
1622
- Table.updateLookupTable (decl);
1623
1593
} else if (!Table.isLazilyComplete (name.getBaseName ())) {
1624
1594
DeclBaseName baseName (name.getBaseName ());
1625
1595
0 commit comments