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 201 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
212 } | 212 } |
213 tracer.close(); | 213 tracer.close(); |
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)); | 222 elementList.add(scanner.loadLibrary(uri, null, uri)); |
223 } | 223 } |
224 | 224 |
225 world.populate(this); | 225 world.populate(this); |
226 | 226 |
227 log('Resolving...'); | 227 log('Resolving...'); |
228 phase = Compiler.PHASE_RESOLVING; | 228 phase = Compiler.PHASE_RESOLVING; |
229 backend.enqueueHelpers(enqueuer.resolution); | 229 backend.enqueueHelpers(enqueuer.resolution); |
230 processQueueList(enqueuer.resolution, elementList); | 230 processQueueList(enqueuer.resolution, elementList); |
231 log('Resolved ${enqueuer.resolution.resolvedElements.length} elements.'); | 231 log('Resolved ${enqueuer.resolution.resolvedElements.length} elements.'); |
232 } | 232 } |
(...skipping 1128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1361 if (node !== null) { | 1361 if (node !== null) { |
1362 var span = system.compiler.spanFromNode(node, script.uri); | 1362 var span = system.compiler.spanFromNode(node, script.uri); |
1363 return new Dart2JsLocation(script, span); | 1363 return new Dart2JsLocation(script, span); |
1364 } else { | 1364 } else { |
1365 var span = system.compiler.spanFromElement(_variable); | 1365 var span = system.compiler.spanFromElement(_variable); |
1366 return new Dart2JsLocation(script, span); | 1366 return new Dart2JsLocation(script, span); |
1367 } | 1367 } |
1368 } | 1368 } |
1369 } | 1369 } |
1370 | 1370 |
OLD | NEW |