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 class JavaScriptItemCompilationContext extends ItemCompilationContext { | 7 class JavaScriptItemCompilationContext extends ItemCompilationContext { |
8 final Set<HInstruction> boundsChecked; | 8 final Set<HInstruction> boundsChecked; |
9 | 9 |
10 JavaScriptItemCompilationContext() | 10 JavaScriptItemCompilationContext() |
(...skipping 1115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1126 LibraryElement library = compiler.libraries['dart:_js_mirrors']; | 1126 LibraryElement library = compiler.libraries['dart:_js_mirrors']; |
1127 disableTreeShakingMarker = | 1127 disableTreeShakingMarker = |
1128 library.find(const SourceString('disableTreeShaking')); | 1128 library.find(const SourceString('disableTreeShaking')); |
1129 preserveNamesMarker = | 1129 preserveNamesMarker = |
1130 library.find(const SourceString('preserveNames')); | 1130 library.find(const SourceString('preserveNames')); |
1131 } | 1131 } |
1132 | 1132 |
1133 void registerStaticUse(Element element, Enqueuer enqueuer) { | 1133 void registerStaticUse(Element element, Enqueuer enqueuer) { |
1134 if (element == disableTreeShakingMarker) { | 1134 if (element == disableTreeShakingMarker) { |
1135 enqueuer.enqueueEverything(); | 1135 enqueuer.enqueueEverything(); |
| 1136 compiler.disableTypeInferenceForMirrors = true; |
1136 } else if (element == preserveNamesMarker) { | 1137 } else if (element == preserveNamesMarker) { |
1137 } | 1138 } |
1138 } | 1139 } |
1139 } | 1140 } |
OLD | NEW |