| 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 part of dart2js; | 5 part of dart2js; |
| 6 | 6 |
| 7 /** | 7 /** |
| 8 * If true, print a warning for each method that was resolved, but not | 8 * If true, print a warning for each method that was resolved, but not |
| 9 * compiled. | 9 * compiled. |
| 10 */ | 10 */ |
| (...skipping 263 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 274 /// Returns true if this element should be retained for reflection even if it | 274 /// Returns true if this element should be retained for reflection even if it |
| 275 /// would normally be tree-shaken away. | 275 /// would normally be tree-shaken away. |
| 276 bool isNeededForReflection(Element element) => false; | 276 bool isNeededForReflection(Element element) => false; |
| 277 | 277 |
| 278 /// Returns true if global optimizations such as type inferencing | 278 /// Returns true if global optimizations such as type inferencing |
| 279 /// can apply to this element. One category of elements that do not | 279 /// can apply to this element. One category of elements that do not |
| 280 /// apply is runtime helpers that the backend calls, but the | 280 /// apply is runtime helpers that the backend calls, but the |
| 281 /// optimizations don't see those calls. | 281 /// optimizations don't see those calls. |
| 282 bool canBeUsedForGlobalOptimizations(Element element) => true; | 282 bool canBeUsedForGlobalOptimizations(Element element) => true; |
| 283 | 283 |
| 284 bool enforceIrRepresentation(Element element) => false; |
| 285 bool enforceAstRepresentation(Element element) => false; |
| 286 |
| 284 /// Called when [enqueuer]'s queue is empty, but before it is closed. | 287 /// Called when [enqueuer]'s queue is empty, but before it is closed. |
| 285 /// This is used, for example, by the JS backend to enqueue additional | 288 /// This is used, for example, by the JS backend to enqueue additional |
| 286 /// elements needed for reflection. | 289 /// elements needed for reflection. |
| 287 void onQueueEmpty(Enqueuer enqueuer) {} | 290 void onQueueEmpty(Enqueuer enqueuer) {} |
| 288 | 291 |
| 289 /// Called after [element] has been resolved. | 292 /// Called after [element] has been resolved. |
| 290 void onElementResolved(Element element, TreeElements elements) {} | 293 void onElementResolved(Element element, TreeElements elements) {} |
| 291 } | 294 } |
| 292 | 295 |
| 293 /** | 296 /** |
| (...skipping 1381 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1675 | 1678 |
| 1676 void close() {} | 1679 void close() {} |
| 1677 | 1680 |
| 1678 toString() => name; | 1681 toString() => name; |
| 1679 | 1682 |
| 1680 /// Convenience method for getting an [api.CompilerOutputProvider]. | 1683 /// Convenience method for getting an [api.CompilerOutputProvider]. |
| 1681 static NullSink outputProvider(String name, String extension) { | 1684 static NullSink outputProvider(String name, String extension) { |
| 1682 return new NullSink('$name.$extension'); | 1685 return new NullSink('$name.$extension'); |
| 1683 } | 1686 } |
| 1684 } | 1687 } |
| OLD | NEW |