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

Side by Side Diff: pkg/dart2js_incremental/lib/library_updater.dart

Issue 1221803009: Stop tracking constants in the incremental compiler. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 5 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 library dart2js_incremental.library_updater; 5 library dart2js_incremental.library_updater;
6 6
7 import 'dart:async' show 7 import 'dart:async' show
8 Future; 8 Future;
9 9
10 import 'dart:convert' show 10 import 'dart:convert' show
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after
148 } 148 }
149 super.incrementalCompiler = value; 149 super.incrementalCompiler = value;
150 } 150 }
151 151
152 void registerUriWithUpdates(Iterable<Uri> uris) { 152 void registerUriWithUpdates(Iterable<Uri> uris) {
153 _uriWithUpdates.addAll(uris); 153 _uriWithUpdates.addAll(uris);
154 } 154 }
155 155
156 void _captureState(Compiler compiler) { 156 void _captureState(Compiler compiler) {
157 JavaScriptBackend backend = compiler.backend; 157 JavaScriptBackend backend = compiler.backend;
158 _emittedClasses = new Set.from(backend.emitter.neededClasses); 158 Set neededClasses = backend.emitter.neededClasses;
159 if (neededClasses == null) {
160 neededClasses = new Set();
161 }
162 _emittedClasses = new Set.from(neededClasses);
159 163
160 _directlyInstantiatedClasses = 164 _directlyInstantiatedClasses =
161 new Set.from(compiler.codegenWorld.directlyInstantiatedClasses); 165 new Set.from(compiler.codegenWorld.directlyInstantiatedClasses);
162 166
163 List<ConstantValue> constants = 167 // This breaks constant tracking of the incremental compiler. It would need
164 backend.emitter.outputConstantLists[ 168 // to capture the emitted constants.
165 compiler.deferredLoadTask.mainOutputUnit]; 169 List<ConstantValue> constants = null;
166 if (constants == null) constants = <ConstantValue>[]; 170 if (constants == null) constants = <ConstantValue>[];
167 _compiledConstants = new Set<ConstantValue>.identity()..addAll(constants); 171 _compiledConstants = new Set<ConstantValue>.identity()..addAll(constants);
168 } 172 }
169 173
170 bool _uriHasUpdate(Uri uri) => _uriWithUpdates.contains(uri); 174 bool _uriHasUpdate(Uri uri) => _uriWithUpdates.contains(uri);
171 } 175 }
172 176
173 class LibraryUpdater extends JsFeatures { 177 class LibraryUpdater extends JsFeatures {
174 final Compiler compiler; 178 final Compiler compiler;
175 179
(...skipping 1311 matching lines...) Expand 10 before | Expand all | Expand 10 after
1487 .buildFieldsHackForIncrementalCompilation(classElement); 1491 .buildFieldsHackForIncrementalCompilation(classElement);
1488 // TODO(ahe): Rewrite for new emitter. 1492 // TODO(ahe): Rewrite for new emitter.
1489 ClassBuilder builder = new ClassBuilder(classElement, namer); 1493 ClassBuilder builder = new ClassBuilder(classElement, namer);
1490 classEmitter.emitFields(cls, builder); 1494 classEmitter.emitFields(cls, builder);
1491 return builder.fields; 1495 return builder.fields;
1492 } 1496 }
1493 } 1497 }
1494 1498
1495 // TODO(ahe): Remove this method. 1499 // TODO(ahe): Remove this method.
1496 NO_WARN(x) => x; 1500 NO_WARN(x) => x;
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698