| OLD | NEW |
| 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, 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_used; | 5 library dart2js.mirrors_used; |
| 6 | 6 |
| 7 import 'common/tasks.dart' show |
| 8 CompilerTask; |
| 7 import 'compile_time_constants.dart' show | 9 import 'compile_time_constants.dart' show |
| 8 ConstantCompiler; | 10 ConstantCompiler; |
| 11 import 'compiler.dart' show |
| 12 Compiler; |
| 9 import 'constants/expressions.dart'; | 13 import 'constants/expressions.dart'; |
| 10 import 'constants/values.dart' show | 14 import 'constants/values.dart' show |
| 11 ConstantValue, | 15 ConstantValue, |
| 12 ConstructedConstantValue, | 16 ConstructedConstantValue, |
| 13 ListConstantValue, | 17 ListConstantValue, |
| 14 StringConstantValue, | 18 StringConstantValue, |
| 15 TypeConstantValue; | 19 TypeConstantValue; |
| 16 import 'dart_types.dart' show | 20 import 'dart_types.dart' show |
| 17 DartType, | 21 DartType, |
| 18 InterfaceType, | 22 InterfaceType, |
| 19 TypeKind; | 23 TypeKind; |
| 20 import 'dart2jslib.dart' show | 24 import 'diagnostics/spannable.dart' show |
| 21 Compiler, | 25 Spannable; |
| 22 CompilerTask, | |
| 23 invariant; | |
| 24 import 'elements/elements.dart' show | 26 import 'elements/elements.dart' show |
| 25 ClassElement, | 27 ClassElement, |
| 26 Element, | 28 Element, |
| 27 LibraryElement, | 29 LibraryElement, |
| 28 MetadataAnnotation, | 30 MetadataAnnotation, |
| 29 ScopeContainerElement, | 31 ScopeContainerElement, |
| 30 VariableElement; | 32 VariableElement; |
| 31 import 'messages.dart' show | 33 import 'messages.dart' show |
| 32 MessageKind; | 34 MessageKind; |
| 33 import 'resolution/resolution.dart' show | 35 import 'resolution/resolution.dart' show |
| 34 TreeElements; | 36 TreeElements; |
| 35 import 'tree/tree.dart' show | 37 import 'tree/tree.dart' show |
| 36 Import, | 38 Import, |
| 37 LibraryTag, | 39 LibraryTag, |
| 38 NamedArgument, | 40 NamedArgument, |
| 39 NewExpression, | 41 NewExpression, |
| 40 Node; | 42 Node; |
| 41 import 'util/util.dart' show | |
| 42 Link, | |
| 43 Spannable; | |
| 44 | 43 |
| 45 /** | 44 /** |
| 46 * Compiler task that analyzes MirrorsUsed annotations. | 45 * Compiler task that analyzes MirrorsUsed annotations. |
| 47 * | 46 * |
| 48 * When importing 'dart:mirrors', it is possible to annotate the import with | 47 * When importing 'dart:mirrors', it is possible to annotate the import with |
| 49 * MirrorsUsed annotation. This is a way to declare what elements will be | 48 * MirrorsUsed annotation. This is a way to declare what elements will be |
| 50 * reflected on at runtime. Such elements, even they would normally be | 49 * reflected on at runtime. Such elements, even they would normally be |
| 51 * discarded by the implicit tree-shaking algorithm must be preserved in the | 50 * discarded by the implicit tree-shaking algorithm must be preserved in the |
| 52 * final output. | 51 * final output. |
| 53 * | 52 * |
| (...skipping 533 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 587 // @MirrorsUsed(targets: fisk) | 586 // @MirrorsUsed(targets: fisk) |
| 588 // ^^^^ | 587 // ^^^^ |
| 589 // | 588 // |
| 590 // Instead of saying 'fisk' should pretty print the problematic constant | 589 // Instead of saying 'fisk' should pretty print the problematic constant |
| 591 // value. | 590 // value. |
| 592 return spannable; | 591 return spannable; |
| 593 } | 592 } |
| 594 return node; | 593 return node; |
| 595 } | 594 } |
| 596 } | 595 } |
| OLD | NEW |