File tree Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -331,6 +331,7 @@ class Semantic
331
331
}
332
332
333
333
bool [QualType] hasMutableIndirectionCache;
334
+ string [Declaration] fullyQualifiedNameCache;
334
335
}
335
336
336
337
struct SemanticRunInfo
@@ -2435,6 +2436,9 @@ template iterateTreeConditions(alias F)
2435
2436
2436
2437
string fullyQualifiedName (Semantic semantic, Declaration d)
2437
2438
{
2439
+ auto inCache = d in semantic.fullyQualifiedNameCache;
2440
+ if (inCache)
2441
+ return * inCache;
2438
2442
Appender! string app;
2439
2443
void visitScope (Scope s)
2440
2444
{
@@ -2484,7 +2488,11 @@ string fullyQualifiedName(Semantic semantic, Declaration d)
2484
2488
}
2485
2489
visitScope(s);
2486
2490
if (app.data.length == 0 )
2491
+ {
2492
+ semantic.fullyQualifiedNameCache[d] = d.name;
2487
2493
return d.name;
2494
+ }
2488
2495
app.put(d.name);
2496
+ semantic.fullyQualifiedNameCache[d] = app.data;
2489
2497
return app.data;
2490
2498
}
You can’t perform that action at this time.
0 commit comments