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

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: 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
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..4d1b07804756ad7d04fc9dc452432dd6f53fc8d9 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 = new Set<Element>.identity();
+
Set<ClassElement> subclassesOf(ClassElement cls) {
return _subclasses[cls.declaration];
}
@@ -59,6 +61,9 @@ class World {
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.');

Powered by Google App Engine
This is Rietveld 408576698