| 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 227 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 238 var elementList = <LibraryElement>[]; | 238 var elementList = <LibraryElement>[]; |
| 239 for (var uri in uriList) { | 239 for (var uri in uriList) { |
| 240 elementList.add(libraryLoader.loadLibrary(uri, null, uri)); | 240 elementList.add(libraryLoader.loadLibrary(uri, null, uri)); |
| 241 } | 241 } |
| 242 libraries.forEach((_, library) { | 242 libraries.forEach((_, library) { |
| 243 maybeEnableJSHelper(library); | 243 maybeEnableJSHelper(library); |
| 244 }); | 244 }); |
| 245 | 245 |
| 246 world.populate(); | 246 world.populate(); |
| 247 | 247 |
| 248 enqueuer.resolution.nativeEnqueuer = |
| 249 backend.nativeResolutionEnqueuer(enqueuer.resolution); |
| 250 |
| 248 log('Resolving...'); | 251 log('Resolving...'); |
| 249 phase = Compiler.PHASE_RESOLVING; | 252 phase = Compiler.PHASE_RESOLVING; |
| 250 backend.enqueueHelpers(enqueuer.resolution); | 253 backend.enqueueHelpers(enqueuer.resolution); |
| 251 processQueueList(enqueuer.resolution, elementList); | 254 processQueueList(enqueuer.resolution, elementList); |
| 252 log('Resolved ${enqueuer.resolution.resolvedElements.length} elements.'); | 255 log('Resolved ${enqueuer.resolution.resolvedElements.length} elements.'); |
| 253 } | 256 } |
| 254 | 257 |
| 255 void processQueueList(Enqueuer world, List<LibraryElement> elements) { | 258 void processQueueList(Enqueuer world, List<LibraryElement> elements) { |
| 256 backend.processNativeClasses(world, libraries.values); | 259 world.nativeEnqueuer.processNativeClasses(libraries.values); |
| 257 for (var library in elements) { | 260 for (var library in elements) { |
| 258 library.forEachLocalMember((element) { | 261 library.forEachLocalMember((element) { |
| 259 world.addToWorkList(element); | 262 world.addToWorkList(element); |
| 260 }); | 263 }); |
| 261 } | 264 } |
| 262 progress.reset(); | 265 progress.reset(); |
| 263 world.forEach((WorkItem work) { | 266 world.forEach((WorkItem work) { |
| 264 withCurrentElement(work.element, () => work.run(this, world)); | 267 withCurrentElement(work.element, () => work.run(this, world)); |
| 265 }); | 268 }); |
| 266 } | 269 } |
| (...skipping 1262 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1529 var node = _variable.variables.parseNode(_diagnosticListener); | 1532 var node = _variable.variables.parseNode(_diagnosticListener); |
| 1530 if (node != null) { | 1533 if (node != null) { |
| 1531 var span = mirrors.compiler.spanFromNode(node, script.uri); | 1534 var span = mirrors.compiler.spanFromNode(node, script.uri); |
| 1532 return new Dart2JsSourceLocation(script, span); | 1535 return new Dart2JsSourceLocation(script, span); |
| 1533 } else { | 1536 } else { |
| 1534 var span = mirrors.compiler.spanFromElement(_variable); | 1537 var span = mirrors.compiler.spanFromElement(_variable); |
| 1535 return new Dart2JsSourceLocation(script, span); | 1538 return new Dart2JsSourceLocation(script, span); |
| 1536 } | 1539 } |
| 1537 } | 1540 } |
| 1538 } | 1541 } |
| 1539 | |
| OLD | NEW |