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 233 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
244 world.populate(); | 244 world.populate(); |
245 | 245 |
246 log('Resolving...'); | 246 log('Resolving...'); |
247 phase = Compiler.PHASE_RESOLVING; | 247 phase = Compiler.PHASE_RESOLVING; |
248 backend.enqueueHelpers(enqueuer.resolution); | 248 backend.enqueueHelpers(enqueuer.resolution); |
249 processQueueList(enqueuer.resolution, elementList); | 249 processQueueList(enqueuer.resolution, elementList); |
250 log('Resolved ${enqueuer.resolution.resolvedElements.length} elements.'); | 250 log('Resolved ${enqueuer.resolution.resolvedElements.length} elements.'); |
251 } | 251 } |
252 | 252 |
253 void processQueueList(Enqueuer world, List<LibraryElement> elements) { | 253 void processQueueList(Enqueuer world, List<LibraryElement> elements) { |
254 backend.processNativeClasses(world, libraries.getValues()); | 254 backend.processNativeClasses(world, libraries.values); |
255 for (var library in elements) { | 255 for (var library in elements) { |
256 library.forEachLocalMember((element) { | 256 library.forEachLocalMember((element) { |
257 world.addToWorkList(element); | 257 world.addToWorkList(element); |
258 }); | 258 }); |
259 } | 259 } |
260 progress.reset(); | 260 progress.reset(); |
261 world.forEach((WorkItem work) { | 261 world.forEach((WorkItem work) { |
262 withCurrentElement(work.element, () => work.run(this, world)); | 262 withCurrentElement(work.element, () => work.run(this, world)); |
263 }); | 263 }); |
264 } | 264 } |
(...skipping 1126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1391 if (node !== null) { | 1391 if (node !== null) { |
1392 var span = system.compiler.spanFromNode(node, script.uri); | 1392 var span = system.compiler.spanFromNode(node, script.uri); |
1393 return new Dart2JsLocation(script, span); | 1393 return new Dart2JsLocation(script, span); |
1394 } else { | 1394 } else { |
1395 var span = system.compiler.spanFromElement(_variable); | 1395 var span = system.compiler.spanFromElement(_variable); |
1396 return new Dart2JsLocation(script, span); | 1396 return new Dart2JsLocation(script, span); |
1397 } | 1397 } |
1398 } | 1398 } |
1399 } | 1399 } |
1400 | 1400 |
OLD | NEW |