| 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 'dart:io'; | 7 import 'dart:io'; |
| 8 import 'dart:uri'; | 8 import 'dart:uri'; |
| 9 | 9 |
| 10 import '../../compiler.dart' as diagnostics; | 10 import '../../compiler.dart' as diagnostics; |
| (...skipping 239 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 250 var elementList = <LibraryElement>[]; | 250 var elementList = <LibraryElement>[]; |
| 251 for (var uri in uriList) { | 251 for (var uri in uriList) { |
| 252 elementList.add(libraryLoader.loadLibrary(uri, null, uri)); | 252 elementList.add(libraryLoader.loadLibrary(uri, null, uri)); |
| 253 } | 253 } |
| 254 libraries.forEach((_, library) { | 254 libraries.forEach((_, library) { |
| 255 maybeEnableJSHelper(library); | 255 maybeEnableJSHelper(library); |
| 256 }); | 256 }); |
| 257 | 257 |
| 258 world.populate(); | 258 world.populate(); |
| 259 | 259 |
| 260 enqueuer.resolution.nativeEnqueuer = |
| 261 backend.nativeResolutionEnqueuer(enqueuer.resolution, false); |
| 262 enqueuer.codegen.nativeEnqueuer = |
| 263 backend.nativeCodegenEnqueuer(enqueuer.codegen, false); |
| 264 |
| 260 log('Resolving...'); | 265 log('Resolving...'); |
| 261 phase = Compiler.PHASE_RESOLVING; | 266 phase = Compiler.PHASE_RESOLVING; |
| 262 backend.enqueueHelpers(enqueuer.resolution); | 267 backend.enqueueHelpers(enqueuer.resolution); |
| 263 processQueueList(enqueuer.resolution, elementList); | 268 processQueueList(enqueuer.resolution, elementList); |
| 264 log('Resolved ${enqueuer.resolution.resolvedElements.length} elements.'); | 269 log('Resolved ${enqueuer.resolution.resolvedElements.length} elements.'); |
| 265 } | 270 } |
| 266 | 271 |
| 267 void processQueueList(Enqueuer world, List<LibraryElement> elements) { | 272 void processQueueList(Enqueuer world, List<LibraryElement> elements) { |
| 268 backend.processNativeClasses(world, libraries.values); | 273 world.nativeEnqueuer.processNativeClasses(libraries.values); |
| 269 for (var library in elements) { | 274 for (var library in elements) { |
| 270 library.forEachLocalMember((element) { | 275 library.forEachLocalMember((element) { |
| 271 world.addToWorkList(element); | 276 world.addToWorkList(element); |
| 272 }); | 277 }); |
| 273 } | 278 } |
| 274 progress.reset(); | 279 progress.reset(); |
| 275 world.forEach((WorkItem work) { | 280 world.forEach((WorkItem work) { |
| 276 withCurrentElement(work.element, () => work.run(this, world)); | 281 withCurrentElement(work.element, () => work.run(this, world)); |
| 277 }); | 282 }); |
| 278 } | 283 } |
| (...skipping 1262 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1541 var node = _variable.variables.parseNode(_diagnosticListener); | 1546 var node = _variable.variables.parseNode(_diagnosticListener); |
| 1542 if (node != null) { | 1547 if (node != null) { |
| 1543 var span = mirrors.compiler.spanFromNode(node, script.uri); | 1548 var span = mirrors.compiler.spanFromNode(node, script.uri); |
| 1544 return new Dart2JsSourceLocation(script, span); | 1549 return new Dart2JsSourceLocation(script, span); |
| 1545 } else { | 1550 } else { |
| 1546 var span = mirrors.compiler.spanFromElement(_variable); | 1551 var span = mirrors.compiler.spanFromElement(_variable); |
| 1547 return new Dart2JsSourceLocation(script, span); | 1552 return new Dart2JsSourceLocation(script, span); |
| 1548 } | 1553 } |
| 1549 } | 1554 } |
| 1550 } | 1555 } |
| 1551 | |
| OLD | NEW |