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

Side by Side Diff: pkg/compiler/lib/src/js_emitter/program_builder/collector.dart

Issue 2903753002: Use failedAt in more places (js_emitter) (Closed)
Patch Set: Created 3 years, 7 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
OLDNEW
1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2015, 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 part of dart2js.js_emitter.program_builder; 5 part of dart2js.js_emitter.program_builder;
6 6
7 /** 7 /**
8 * Generates the code for all used classes in the program. Static fields (even 8 * Generates the code for all used classes in the program. Static fields (even
9 * in classes) are ignored, since they can be treated as non-class elements. 9 * in classes) are ignored, since they can be treated as non-class elements.
10 * 10 *
(...skipping 262 matching lines...) Expand 10 before | Expand all | Expand 10 after
273 } 273 }
274 274
275 // 4. Finally, sort the classes. 275 // 4. Finally, sort the classes.
276 List<ClassEntity> sortedClasses = _sorter.sortClasses(neededClasses); 276 List<ClassEntity> sortedClasses = _sorter.sortClasses(neededClasses);
277 277
278 for (ClassEntity cls in sortedClasses) { 278 for (ClassEntity cls in sortedClasses) {
279 if (_nativeData.isNativeOrExtendsNative(cls) && 279 if (_nativeData.isNativeOrExtendsNative(cls) &&
280 !classesOnlyNeededForRti.contains(cls)) { 280 !classesOnlyNeededForRti.contains(cls)) {
281 // For now, native classes and related classes cannot be deferred. 281 // For now, native classes and related classes cannot be deferred.
282 nativeClassesAndSubclasses.add(cls); 282 nativeClassesAndSubclasses.add(cls);
283 assert(invariant(cls, !_deferredLoadTask.isDeferredClass(cls))); 283 assert(!_deferredLoadTask.isDeferredClass(cls), failedAt(cls));
284 outputClassLists 284 outputClassLists
285 .putIfAbsent(_deferredLoadTask.mainOutputUnit, 285 .putIfAbsent(_deferredLoadTask.mainOutputUnit,
286 () => new List<ClassElement>()) 286 () => new List<ClassElement>())
287 .add(cls); 287 .add(cls);
288 } else { 288 } else {
289 outputClassLists 289 outputClassLists
290 .putIfAbsent(_deferredLoadTask.outputUnitForClass(cls), 290 .putIfAbsent(_deferredLoadTask.outputUnitForClass(cls),
291 () => new List<ClassElement>()) 291 () => new List<ClassElement>())
292 .add(cls); 292 .add(cls);
293 } 293 }
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
355 } 355 }
356 356
357 void collect() { 357 void collect() {
358 computeNeededDeclarations(); 358 computeNeededDeclarations();
359 computeNeededConstants(); 359 computeNeededConstants();
360 computeNeededStatics(); 360 computeNeededStatics();
361 computeNeededStaticNonFinalFields(); 361 computeNeededStaticNonFinalFields();
362 computeNeededLibraries(); 362 computeNeededLibraries();
363 } 363 }
364 } 364 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698