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('mirrors.dart2js'); | 5 #library('mirrors.dart2js'); |
6 | 6 |
7 #import('../../../lib/compiler/compiler.dart', prefix: 'diagnostics'); | 7 #import('../../../lib/compiler/compiler.dart', prefix: 'diagnostics'); |
8 #import('../../../lib/compiler/implementation/elements/elements.dart'); | 8 #import('../../../lib/compiler/implementation/elements/elements.dart'); |
9 #import('../../../lib/compiler/implementation/apiimpl.dart', prefix: 'api'); | 9 #import('../../../lib/compiler/implementation/apiimpl.dart', prefix: 'api'); |
10 #import('../../../lib/compiler/implementation/scanner/scannerlib.dart'); | 10 #import('../../../lib/compiler/implementation/scanner/scannerlib.dart'); |
(...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
214 log('compilation succeeded'); | 214 log('compilation succeeded'); |
215 return true; | 215 return true; |
216 } | 216 } |
217 | 217 |
218 void runCompilerList(List<Uri> uriList) { | 218 void runCompilerList(List<Uri> uriList) { |
219 scanBuiltinLibraries(); | 219 scanBuiltinLibraries(); |
220 var elementList = <LibraryElement>[]; | 220 var elementList = <LibraryElement>[]; |
221 for (var uri in uriList) { | 221 for (var uri in uriList) { |
222 elementList.add(scanner.loadLibrary(uri, null, uri)); | 222 elementList.add(scanner.loadLibrary(uri, null, uri)); |
223 } | 223 } |
| 224 libraries.forEach((_, library) { |
| 225 maybeEnableJSHelper(library); |
| 226 }); |
224 | 227 |
225 world.populate(this); | 228 world.populate(this); |
226 | 229 |
227 log('Resolving...'); | 230 log('Resolving...'); |
228 phase = Compiler.PHASE_RESOLVING; | 231 phase = Compiler.PHASE_RESOLVING; |
229 backend.enqueueHelpers(enqueuer.resolution); | 232 backend.enqueueHelpers(enqueuer.resolution); |
230 processQueueList(enqueuer.resolution, elementList); | 233 processQueueList(enqueuer.resolution, elementList); |
231 log('Resolved ${enqueuer.resolution.resolvedElements.length} elements.'); | 234 log('Resolved ${enqueuer.resolution.resolvedElements.length} elements.'); |
232 } | 235 } |
233 | 236 |
(...skipping 1134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1368 if (node !== null) { | 1371 if (node !== null) { |
1369 var span = system.compiler.spanFromNode(node, script.uri); | 1372 var span = system.compiler.spanFromNode(node, script.uri); |
1370 return new Dart2JsLocation(script, span); | 1373 return new Dart2JsLocation(script, span); |
1371 } else { | 1374 } else { |
1372 var span = system.compiler.spanFromElement(_variable); | 1375 var span = system.compiler.spanFromElement(_variable); |
1373 return new Dart2JsLocation(script, span); | 1376 return new Dart2JsLocation(script, span); |
1374 } | 1377 } |
1375 } | 1378 } |
1376 } | 1379 } |
1377 | 1380 |
OLD | NEW |