| 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 js_backend; | 5 part of js_backend; |
| 6 | 6 |
| 7 const VERBOSE_OPTIMIZER_HINTS = false; | 7 const VERBOSE_OPTIMIZER_HINTS = false; |
| 8 | 8 |
| 9 const bool USE_CPS_IR = const bool.fromEnvironment("USE_CPS_IR"); | 9 const bool USE_CPS_IR = const bool.fromEnvironment("USE_CPS_IR"); |
| 10 | 10 |
| (...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 84 | 84 |
| 85 /// The list of functions for classes in the [internalLibrary] that we want | 85 /// The list of functions for classes in the [internalLibrary] that we want |
| 86 /// to inline always. Any function in this list must be inlinable with | 86 /// to inline always. Any function in this list must be inlinable with |
| 87 /// respect to the conditions used in [InlineWeeder.canInline], except for | 87 /// respect to the conditions used in [InlineWeeder.canInline], except for |
| 88 /// size/complexity heuristics. | 88 /// size/complexity heuristics. |
| 89 static const Map<String, List<String>> ALWAYS_INLINE = | 89 static const Map<String, List<String>> ALWAYS_INLINE = |
| 90 const <String, List<String>> { | 90 const <String, List<String>> { |
| 91 'IterableMixinWorkaround': const <String>['forEach'], | 91 'IterableMixinWorkaround': const <String>['forEach'], |
| 92 }; | 92 }; |
| 93 | 93 |
| 94 String get patchVersion => USE_NEW_EMITTER ? 'new' : 'old'; |
| 95 |
| 94 /// List of [FunctionElement]s that we want to inline always. This list is | 96 /// List of [FunctionElement]s that we want to inline always. This list is |
| 95 /// filled when resolution is complete by looking up in [internalLibrary]. | 97 /// filled when resolution is complete by looking up in [internalLibrary]. |
| 96 List<FunctionElement> functionsToAlwaysInline; | 98 List<FunctionElement> functionsToAlwaysInline; |
| 97 | 99 |
| 98 /// Reference to the internal library to lookup functions to always inline. | 100 /// Reference to the internal library to lookup functions to always inline. |
| 99 LibraryElement internalLibrary; | 101 LibraryElement internalLibrary; |
| 100 | 102 |
| 101 | 103 |
| 102 /// Set of classes that need to be considered for reflection although not | 104 /// Set of classes that need to be considered for reflection although not |
| 103 /// otherwise visible during resolution. | 105 /// otherwise visible during resolution. |
| (...skipping 2423 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2527 } | 2529 } |
| 2528 } | 2530 } |
| 2529 | 2531 |
| 2530 /// Records that [constant] is used by the element behind [registry]. | 2532 /// Records that [constant] is used by the element behind [registry]. |
| 2531 class Dependency { | 2533 class Dependency { |
| 2532 final ConstantValue constant; | 2534 final ConstantValue constant; |
| 2533 final Element annotatedElement; | 2535 final Element annotatedElement; |
| 2534 | 2536 |
| 2535 const Dependency(this.constant, this.annotatedElement); | 2537 const Dependency(this.constant, this.annotatedElement); |
| 2536 } | 2538 } |
| OLD | NEW |