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 dart2js.mirrors; | 5 library dart2js.mirrors; |
6 | 6 |
7 import 'dart:collection' show UnmodifiableListView, UnmodifiableMapView; | 7 import 'dart:collection' show UnmodifiableListView, UnmodifiableMapView; |
8 | 8 |
9 import '../constants/expressions.dart'; | 9 import '../constants/expressions.dart'; |
10 import '../constants/values.dart'; | 10 import '../constants/values.dart'; |
11 import '../elements/elements.dart'; | |
12 import '../scanner/scannerlib.dart'; | |
13 import '../resolution/resolution.dart' show Scope; | |
14 import '../dart2jslib.dart'; | 11 import '../dart2jslib.dart'; |
15 import '../dart_types.dart'; | 12 import '../dart_types.dart'; |
| 13 import '../elements/elements.dart'; |
| 14 import '../resolution/resolution.dart' show Scope; |
| 15 import '../scanner/scannerlib.dart'; |
| 16 import '../script.dart'; |
16 import '../tree/tree.dart'; | 17 import '../tree/tree.dart'; |
17 import '../util/util.dart' | 18 import '../util/util.dart' |
18 show Link, | 19 show Link, |
19 LinkBuilder; | 20 LinkBuilder, |
| 21 NO_LOCATION_SPANNABLE; |
20 import '../util/characters.dart' show $CR, $LF; | 22 import '../util/characters.dart' show $CR, $LF; |
21 | 23 |
22 import 'source_mirrors.dart'; | 24 import 'source_mirrors.dart'; |
23 import 'mirrors_util.dart'; | 25 import 'mirrors_util.dart'; |
24 | 26 |
25 part 'dart2js_library_mirror.dart'; | 27 part 'dart2js_library_mirror.dart'; |
26 part 'dart2js_type_mirrors.dart'; | 28 part 'dart2js_type_mirrors.dart'; |
27 part 'dart2js_member_mirrors.dart'; | 29 part 'dart2js_member_mirrors.dart'; |
28 part 'dart2js_instance_mirrors.dart'; | 30 part 'dart2js_instance_mirrors.dart'; |
29 | 31 |
(...skipping 444 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
474 if (!parameter.hasDefaultValue) return null; | 476 if (!parameter.hasDefaultValue) return null; |
475 ParameterElement parameterElement = parameter._element; | 477 ParameterElement parameterElement = parameter._element; |
476 Compiler compiler = parameter.mirrorSystem.compiler; | 478 Compiler compiler = parameter.mirrorSystem.compiler; |
477 return compiler.constants.getConstantForVariable(parameterElement); | 479 return compiler.constants.getConstantForVariable(parameterElement); |
478 } | 480 } |
479 | 481 |
480 static Mirror getMirrorFromElement(Dart2JsMirror mirror, Element element) { | 482 static Mirror getMirrorFromElement(Dart2JsMirror mirror, Element element) { |
481 return _convertElementToDeclarationMirror(mirror.mirrorSystem, element); | 483 return _convertElementToDeclarationMirror(mirror.mirrorSystem, element); |
482 } | 484 } |
483 } | 485 } |
OLD | NEW |