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

Unified Diff: dart/pkg/dart2js_incremental/lib/library_updater.dart

Issue 763083004: Incremental compilation handles indirectly instantiated classes. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: Minor issues found during testing. Created 6 years 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 | « no previous file | dart/tests/try/web/incremental_compilation_update_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: dart/pkg/dart2js_incremental/lib/library_updater.dart
diff --git a/dart/pkg/dart2js_incremental/lib/library_updater.dart b/dart/pkg/dart2js_incremental/lib/library_updater.dart
index bb3c16baebcc271d55786ae3bc18f4eaa278d2ae..eab16f330bc981f3075c73d3f0a43c666703f991 100644
--- a/dart/pkg/dart2js_incremental/lib/library_updater.dart
+++ b/dart/pkg/dart2js_incremental/lib/library_updater.dart
@@ -122,12 +122,18 @@ class LibraryUpdater extends JsFeatures {
final Set<ClassElementX> _classesWithSchemaChanges =
new Set<ClassElementX>();
+ final Set<ClassElementX> _existingClasses = new Set();
+
LibraryUpdater(
this.compiler,
this.inputProvider,
this.uri,
this.logTime,
- this.logVerbose);
+ this.logVerbose) {
+ if (compiler != null) {
+ _existingClasses.addAll(emitter.neededClasses);
+ }
+ }
/// When [true], updates must be applied (using [applyUpdates]) before the
/// [compiler]'s state correctly reflects the updated program.
@@ -534,9 +540,6 @@ class LibraryUpdater extends JsFeatures {
}
String computeUpdateJs() {
- Set existingClasses =
- new Set.from(compiler.codegenWorld.directlyInstantiatedClasses);
-
List<Update> removals = <Update>[];
List<Element> updatedElements = applyUpdates(removals);
if (compiler.progress != null) {
@@ -569,9 +572,10 @@ class LibraryUpdater extends JsFeatures {
List<jsAst.Statement> updates = <jsAst.Statement>[];
- Set newClasses =
- new Set.from(compiler.codegenWorld.directlyInstantiatedClasses);
- newClasses.removeAll(existingClasses);
+ Set newClasses = new Set.from(
+ compiler.codegenWorld.allInstantiatedClasses.where(
+ emitter.computeClassFilter()));
+ newClasses.removeAll(_existingClasses);
List<jsAst.Statement> inherits = <jsAst.Statement>[];
« no previous file with comments | « no previous file | dart/tests/try/web/incremental_compilation_update_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698