| 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 '../../../../../lib/compiler/compiler.dart' as diagnostics; | 10 import '../../../../../lib/compiler/compiler.dart' as diagnostics; |
| (...skipping 225 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 236 var elementList = <LibraryElement>[]; | 236 var elementList = <LibraryElement>[]; |
| 237 for (var uri in uriList) { | 237 for (var uri in uriList) { |
| 238 elementList.add(libraryLoader.loadLibrary(uri, null, uri)); | 238 elementList.add(libraryLoader.loadLibrary(uri, null, uri)); |
| 239 } | 239 } |
| 240 libraries.forEach((_, library) { | 240 libraries.forEach((_, library) { |
| 241 maybeEnableJSHelper(library); | 241 maybeEnableJSHelper(library); |
| 242 }); | 242 }); |
| 243 | 243 |
| 244 world.populate(); | 244 world.populate(); |
| 245 | 245 |
| 246 enqueuer.resolution.nativeEnqueuer = |
| 247 backend.nativeResolutionEnqueuer(enqueuer.resolution); |
| 248 |
| 246 log('Resolving...'); | 249 log('Resolving...'); |
| 247 phase = Compiler.PHASE_RESOLVING; | 250 phase = Compiler.PHASE_RESOLVING; |
| 248 backend.enqueueHelpers(enqueuer.resolution); | 251 backend.enqueueHelpers(enqueuer.resolution); |
| 249 processQueueList(enqueuer.resolution, elementList); | 252 processQueueList(enqueuer.resolution, elementList); |
| 250 log('Resolved ${enqueuer.resolution.resolvedElements.length} elements.'); | 253 log('Resolved ${enqueuer.resolution.resolvedElements.length} elements.'); |
| 251 } | 254 } |
| 252 | 255 |
| 253 void processQueueList(Enqueuer world, List<LibraryElement> elements) { | 256 void processQueueList(Enqueuer world, List<LibraryElement> elements) { |
| 254 backend.processNativeClasses(world, libraries.values); | 257 world.nativeEnqueuer.processNativeClasses(libraries.values); |
| 255 for (var library in elements) { | 258 for (var library in elements) { |
| 256 library.forEachLocalMember((element) { | 259 library.forEachLocalMember((element) { |
| 257 world.addToWorkList(element); | 260 world.addToWorkList(element); |
| 258 }); | 261 }); |
| 259 } | 262 } |
| 260 progress.reset(); | 263 progress.reset(); |
| 261 world.forEach((WorkItem work) { | 264 world.forEach((WorkItem work) { |
| 262 withCurrentElement(work.element, () => work.run(this, world)); | 265 withCurrentElement(work.element, () => work.run(this, world)); |
| 263 }); | 266 }); |
| 264 } | 267 } |
| (...skipping 1125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1390 var node = _variable.variables.parseNode(_diagnosticListener); | 1393 var node = _variable.variables.parseNode(_diagnosticListener); |
| 1391 if (node !== null) { | 1394 if (node !== null) { |
| 1392 var span = system.compiler.spanFromNode(node, script.uri); | 1395 var span = system.compiler.spanFromNode(node, script.uri); |
| 1393 return new Dart2JsLocation(script, span); | 1396 return new Dart2JsLocation(script, span); |
| 1394 } else { | 1397 } else { |
| 1395 var span = system.compiler.spanFromElement(_variable); | 1398 var span = system.compiler.spanFromElement(_variable); |
| 1396 return new Dart2JsLocation(script, span); | 1399 return new Dart2JsLocation(script, span); |
| 1397 } | 1400 } |
| 1398 } | 1401 } |
| 1399 } | 1402 } |
| 1400 | |
| OLD | NEW |