Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(446)

Unified Diff: dart/sdk/lib/_internal/compiler/implementation/world.dart

Issue 340023003: Various caches for incremental compilation. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: Only allocate caches when hasIncrementalCompilation is true. Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « dart/sdk/lib/_internal/compiler/implementation/native_handler.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: dart/sdk/lib/_internal/compiler/implementation/world.dart
diff --git a/dart/sdk/lib/_internal/compiler/implementation/world.dart b/dart/sdk/lib/_internal/compiler/implementation/world.dart
index ae56485644495ad46bb80e07ff225dc56c4fa746..b2e9c9c2ed38365f89045fea6af1d568d71850c0 100644
--- a/dart/sdk/lib/_internal/compiler/implementation/world.dart
+++ b/dart/sdk/lib/_internal/compiler/implementation/world.dart
@@ -32,6 +32,8 @@ class World {
final Set<Element> functionsThatMightBePassedToApply =
new Set<FunctionElement>();
+ final Set<Element> alreadyPopulated;
+
Set<ClassElement> subclassesOf(ClassElement cls) {
return _subclasses[cls.declaration];
}
@@ -55,10 +57,14 @@ class World {
World(Compiler compiler)
: allFunctions = new FunctionSet(compiler),
- this.compiler = compiler;
+ this.compiler = compiler,
+ alreadyPopulated = compiler.cacheStrategy.newSet();
void populate() {
void addSubtypes(ClassElement cls) {
+ if (compiler.hasIncrementalSupport && !alreadyPopulated.add(cls)) {
+ return;
+ }
assert(cls.isDeclaration);
if (cls.resolutionState != STATE_DONE) {
compiler.internalError(cls, 'Class "${cls.name}" is not resolved.');
« no previous file with comments | « dart/sdk/lib/_internal/compiler/implementation/native_handler.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698