| 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('../../compiler/compiler.dart', prefix: 'diagnostics'); | 7 #import('../../compiler/compiler.dart', prefix: 'diagnostics'); |
| 8 #import('../../compiler/implementation/elements/elements.dart'); | 8 #import('../../compiler/implementation/elements/elements.dart'); |
| 9 #import('../../compiler/implementation/apiimpl.dart', prefix: 'api'); | 9 #import('../../compiler/implementation/apiimpl.dart', prefix: 'api'); |
| 10 #import('../../compiler/implementation/scanner/scannerlib.dart'); | 10 #import('../../compiler/implementation/scanner/scannerlib.dart'); |
| (...skipping 481 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 492 } | 492 } |
| 493 | 493 |
| 494 String qualifiedName() => simpleName(); | 494 String qualifiedName() => simpleName(); |
| 495 | 495 |
| 496 void _ensureTypes() { | 496 void _ensureTypes() { |
| 497 if (_types == null) { | 497 if (_types == null) { |
| 498 _types = <InterfaceMirror>{}; | 498 _types = <InterfaceMirror>{}; |
| 499 _library.forEachExport((Element e) { | 499 _library.forEachExport((Element e) { |
| 500 if (e.getLibrary() == _library) { | 500 if (e.getLibrary() == _library) { |
| 501 if (e.isClass()) { | 501 if (e.isClass()) { |
| 502 e.ensureResolved(system.compiler); |
| 502 var type = new Dart2JsInterfaceMirror.fromLibrary(this, e); | 503 var type = new Dart2JsInterfaceMirror.fromLibrary(this, e); |
| 503 _types[type.canonicalName] = type; | 504 _types[type.canonicalName] = type; |
| 504 } else if (e.isTypedef()) { | 505 } else if (e.isTypedef()) { |
| 505 var type = new Dart2JsTypedefMirror.fromLibrary(this, e); | 506 var type = new Dart2JsTypedefMirror.fromLibrary(this, e); |
| 506 _types[type.canonicalName] = type; | 507 _types[type.canonicalName] = type; |
| 507 } | 508 } |
| 508 } | 509 } |
| 509 }); | 510 }); |
| 510 } | 511 } |
| 511 } | 512 } |
| (...skipping 850 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1362 if (node !== null) { | 1363 if (node !== null) { |
| 1363 var span = system.compiler.spanFromNode(node, script.uri); | 1364 var span = system.compiler.spanFromNode(node, script.uri); |
| 1364 return new Dart2JsLocation(script, span); | 1365 return new Dart2JsLocation(script, span); |
| 1365 } else { | 1366 } else { |
| 1366 var span = system.compiler.spanFromElement(_variable); | 1367 var span = system.compiler.spanFromElement(_variable); |
| 1367 return new Dart2JsLocation(script, span); | 1368 return new Dart2JsLocation(script, span); |
| 1368 } | 1369 } |
| 1369 } | 1370 } |
| 1370 } | 1371 } |
| 1371 | 1372 |
| OLD | NEW |