OLD | NEW |
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.compiler_base; | 5 library dart2js.compiler_base; |
6 | 6 |
7 import 'dart:async' show Future; | 7 import 'dart:async' show Future; |
8 | 8 |
9 import '../compiler_new.dart' as api; | 9 import '../compiler_new.dart' as api; |
10 import 'closure.dart' as closureMapping show ClosureTask; | 10 import 'closure.dart' as closureMapping show ClosureTask; |
(...skipping 725 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
736 enqueuer.open(impactStrategy, mainMethod, libraries); | 736 enqueuer.open(impactStrategy, mainMethod, libraries); |
737 if (options.verbose) { | 737 if (options.verbose) { |
738 progress.reset(); | 738 progress.reset(); |
739 } | 739 } |
740 emptyQueue(enqueuer, onProgress: onProgress); | 740 emptyQueue(enqueuer, onProgress: onProgress); |
741 enqueuer.queueIsClosed = true; | 741 enqueuer.queueIsClosed = true; |
742 enqueuer.close(); | 742 enqueuer.close(); |
743 // Notify the impact strategy impacts are no longer needed for this | 743 // Notify the impact strategy impacts are no longer needed for this |
744 // enqueuer. | 744 // enqueuer. |
745 impactStrategy.onImpactUsed(enqueuer.impactUse); | 745 impactStrategy.onImpactUsed(enqueuer.impactUse); |
746 backend.onQueueClosed(); | |
747 assert(compilationFailed || | 746 assert(compilationFailed || |
748 enqueuer.checkNoEnqueuedInvokedInstanceMethods(elementEnvironment)); | 747 enqueuer.checkNoEnqueuedInvokedInstanceMethods(elementEnvironment)); |
749 }); | 748 }); |
750 } | 749 } |
751 | 750 |
752 /** | 751 /** |
753 * Perform various checks of the queues. This includes checking that | 752 * Perform various checks of the queues. This includes checking that |
754 * the queues are empty (nothing was added after we stopped | 753 * the queues are empty (nothing was added after we stopped |
755 * processing the queues). Also compute the number of methods that | 754 * processing the queues). Also compute the number of methods that |
756 * were resolved, but not compiled (aka excess resolution). | 755 * were resolved, but not compiled (aka excess resolution). |
(...skipping 922 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1679 _ElementScanner(this.scanner); | 1678 _ElementScanner(this.scanner); |
1680 void scanLibrary(LibraryElement library) => scanner.scanLibrary(library); | 1679 void scanLibrary(LibraryElement library) => scanner.scanLibrary(library); |
1681 void scanUnit(CompilationUnitElement unit) => scanner.scan(unit); | 1680 void scanUnit(CompilationUnitElement unit) => scanner.scan(unit); |
1682 } | 1681 } |
1683 | 1682 |
1684 class _EmptyEnvironment implements Environment { | 1683 class _EmptyEnvironment implements Environment { |
1685 const _EmptyEnvironment(); | 1684 const _EmptyEnvironment(); |
1686 | 1685 |
1687 String valueOf(String key) => null; | 1686 String valueOf(String key) => null; |
1688 } | 1687 } |
OLD | NEW |