Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(153)

Side by Side Diff: dart/sdk/lib/_internal/compiler/implementation/js_backend/backend.dart

Issue 16830002: Be smarter about when to disable global type inference. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: Merged with HEAD Created 7 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
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 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698