OLD | NEW |
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 /// Command line tool to run the checker on a Dart program. | 5 /// Command line tool to run the checker on a Dart program. |
6 library dev_compiler.src.compiler; | 6 library dev_compiler.src.compiler; |
7 | 7 |
8 import 'dart:async'; | 8 import 'dart:async'; |
9 import 'dart:collection'; | 9 import 'dart:collection'; |
10 import 'dart:math' as math; | 10 import 'dart:math' as math; |
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
144 } | 144 } |
145 | 145 |
146 void _processPending() { | 146 void _processPending() { |
147 // _pendingLibraries was recorded in post-order. Process from the end | 147 // _pendingLibraries was recorded in post-order. Process from the end |
148 // to ensure reverse post-order. This will ensure that we handle back | 148 // to ensure reverse post-order. This will ensure that we handle back |
149 // edges from the original depth-first search correctly. | 149 // edges from the original depth-first search correctly. |
150 | 150 |
151 while (_pendingLibraries.isNotEmpty) { | 151 while (_pendingLibraries.isNotEmpty) { |
152 var unit = _pendingLibraries.removeLast(); | 152 var unit = _pendingLibraries.removeLast(); |
153 var library = unit.library.element.enclosingElement; | 153 var library = unit.library.element.enclosingElement; |
154 assert(_compilationRecord[library] == true); | 154 assert(_compilationRecord[library] == true || |
| 155 options.codegenOptions.forceCompile); |
155 | 156 |
156 // Process dependences one more time to propagate failure from cycles | 157 // Process dependences one more time to propagate failure from cycles |
157 for (var import in library.imports) { | 158 for (var import in library.imports) { |
158 if (!_compilationRecord[import.importedLibrary]) { | 159 if (!_compilationRecord[import.importedLibrary]) { |
159 _compilationRecord[library] = false; | 160 _compilationRecord[library] = false; |
160 } | 161 } |
161 } | 162 } |
162 for (var export in library.exports) { | 163 for (var export in library.exports) { |
163 if (!_compilationRecord[export.exportedLibrary]) { | 164 if (!_compilationRecord[export.exportedLibrary]) { |
164 _compilationRecord[library] = false; | 165 _compilationRecord[library] = false; |
(...skipping 354 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
519 '_rtti.js', | 520 '_rtti.js', |
520 '_classes.js', | 521 '_classes.js', |
521 '_operations.js', | 522 '_operations.js', |
522 'dart_runtime.js', | 523 'dart_runtime.js', |
523 ]; | 524 ]; |
524 files.addAll(corelibOrder.map((l) => l.replaceAll('.', '/') + '.js')); | 525 files.addAll(corelibOrder.map((l) => l.replaceAll('.', '/') + '.js')); |
525 return files; | 526 return files; |
526 }(); | 527 }(); |
527 | 528 |
528 final _log = new Logger('dev_compiler.src.compiler'); | 529 final _log = new Logger('dev_compiler.src.compiler'); |
OLD | NEW |