| 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 'dart2jslib.dart' show | 7 import 'dart2jslib.dart' show |
| 8 Compiler, | 8 Compiler, |
| 9 CompilerTask, | 9 CompilerTask, |
| 10 Constant, | 10 Constant, |
| (...skipping 23 matching lines...) Expand all Loading... |
| 34 InterfaceType, | 34 InterfaceType, |
| 35 TypeKind; | 35 TypeKind; |
| 36 | 36 |
| 37 import 'tree/tree.dart' show | 37 import 'tree/tree.dart' show |
| 38 Import, | 38 Import, |
| 39 LibraryTag, | 39 LibraryTag, |
| 40 NamedArgument, | 40 NamedArgument, |
| 41 NewExpression, | 41 NewExpression, |
| 42 Node; | 42 Node; |
| 43 | 43 |
| 44 import 'resolution/resolution.dart' show | |
| 45 ConstantMapper; | |
| 46 | |
| 47 /** | 44 /** |
| 48 * Compiler task that analyzes MirrorsUsed annotations. | 45 * Compiler task that analyzes MirrorsUsed annotations. |
| 49 * | 46 * |
| 50 * 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 |
| 51 * 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 |
| 52 * reflected on at runtime. Such elements, even they would normally be | 49 * reflected on at runtime. Such elements, even they would normally be |
| 53 * 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 |
| 54 * final output. | 51 * final output. |
| 55 * | 52 * |
| 56 * Since some libraries cannot tell exactly what they will be reflecting on, it | 53 * Since some libraries cannot tell exactly what they will be reflecting on, it |
| (...skipping 528 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 585 // @MirrorsUsed(targets: fisk) | 582 // @MirrorsUsed(targets: fisk) |
| 586 // ^^^^ | 583 // ^^^^ |
| 587 // | 584 // |
| 588 // Instead of saying 'fisk' should pretty print the problematic constant | 585 // Instead of saying 'fisk' should pretty print the problematic constant |
| 589 // value. | 586 // value. |
| 590 return spannable; | 587 return spannable; |
| 591 } | 588 } |
| 592 return node; | 589 return node; |
| 593 } | 590 } |
| 594 } | 591 } |
| OLD | NEW |