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

Side by Side Diff: pkg/compiler/lib/src/enqueue.dart

Issue 2726463002: Redo "Flush deferred action queue" (Closed)
Patch Set: Created 3 years, 9 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 | tests/lib/lib.status » ('j') | 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) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, 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.enqueue; 5 library dart2js.enqueue;
6 6
7 import 'dart:collection' show Queue; 7 import 'dart:collection' show Queue;
8 8
9 import 'common/resolution.dart' show Resolution; 9 import 'common/resolution.dart' show Resolution;
10 import 'common/tasks.dart' show CompilerTask; 10 import 'common/tasks.dart' show CompilerTask;
(...skipping 351 matching lines...) Expand 10 before | Expand all | Expand 10 after
362 if (!_processedEntities.contains(work.element)) { 362 if (!_processedEntities.contains(work.element)) {
363 strategy.processWorkItem(f, work); 363 strategy.processWorkItem(f, work);
364 _processedEntities.add(work.element); 364 _processedEntities.add(work.element);
365 } 365 }
366 } 366 }
367 List recents = _recentClasses.toList(growable: false); 367 List recents = _recentClasses.toList(growable: false);
368 _recentClasses.clear(); 368 _recentClasses.clear();
369 if (!_onQueueEmpty(recents)) { 369 if (!_onQueueEmpty(recents)) {
370 _recentClasses.addAll(recents); 370 _recentClasses.addAll(recents);
371 } 371 }
372 } while (_queue.isNotEmpty || _recentClasses.isNotEmpty); 372 } while (_queue.isNotEmpty ||
373 _recentClasses.isNotEmpty ||
374 _deferredQueue.isNotEmpty);
373 } 375 }
374 376
375 void logSummary(log(message)) { 377 void logSummary(log(message)) {
376 log('Resolved ${_processedEntities.length} elements.'); 378 log('Resolved ${_processedEntities.length} elements.');
377 nativeEnqueuer.logSummary(log); 379 nativeEnqueuer.logSummary(log);
378 } 380 }
379 381
380 String toString() => 'Enqueuer($name)'; 382 String toString() => 'Enqueuer($name)';
381 383
382 Iterable<Entity> get processedEntities => _processedEntities; 384 Iterable<Entity> get processedEntities => _processedEntities;
(...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after
566 @override 568 @override
567 WorkItem createWorkItem(MemberElement element) { 569 WorkItem createWorkItem(MemberElement element) {
568 assert(invariant(element, element.isDeclaration)); 570 assert(invariant(element, element.isDeclaration));
569 if (element.isMalformed) return null; 571 if (element.isMalformed) return null;
570 572
571 assert(invariant(element, element is AnalyzableElement, 573 assert(invariant(element, element is AnalyzableElement,
572 message: 'Element $element is not analyzable.')); 574 message: 'Element $element is not analyzable.'));
573 return _resolution.createWorkItem(element); 575 return _resolution.createWorkItem(element);
574 } 576 }
575 } 577 }
OLDNEW
« no previous file with comments | « no previous file | tests/lib/lib.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698