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

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

Issue 23653003: Importing unittest disables tree shaking Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 3 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
« no previous file with comments | « no previous file | tests/compiler/dart2js_extra/tree_woe_test.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 1412 matching lines...) Expand 10 before | Expand all | Expand 10 after
1423 ClassElement get constMapImplementation => constMapLiteralClass; 1423 ClassElement get constMapImplementation => constMapLiteralClass;
1424 ClassElement get typeImplementation => typeLiteralClass; 1424 ClassElement get typeImplementation => typeLiteralClass;
1425 ClassElement get boolImplementation => jsBoolClass; 1425 ClassElement get boolImplementation => jsBoolClass;
1426 ClassElement get nullImplementation => jsNullClass; 1426 ClassElement get nullImplementation => jsNullClass;
1427 1427
1428 void registerStaticUse(Element element, Enqueuer enqueuer) { 1428 void registerStaticUse(Element element, Enqueuer enqueuer) {
1429 if (element == disableTreeShakingMarker) { 1429 if (element == disableTreeShakingMarker) {
1430 compiler.disableTypeInferenceForMirrors = true; 1430 compiler.disableTypeInferenceForMirrors = true;
1431 isTreeShakingDisabled = true; 1431 isTreeShakingDisabled = true;
1432 enqueuer.enqueueEverything(); 1432 enqueuer.enqueueEverything();
1433 throw 'Unexpected disable tree shaking';
1433 } else if (element == preserveNamesMarker) { 1434 } else if (element == preserveNamesMarker) {
1434 if (mustPreserveNames) return; 1435 if (mustPreserveNames) return;
1435 mustPreserveNames = true; 1436 mustPreserveNames = true;
1436 compiler.log('Preserving names.'); 1437 compiler.log('Preserving names.');
1437 } else if (element == preserveMetadataMarker) { 1438 } else if (element == preserveMetadataMarker) {
1438 if (mustRetainMetadata) return; 1439 if (mustRetainMetadata) return;
1439 compiler.log('Retaining metadata.'); 1440 compiler.log('Retaining metadata.');
1440 mustRetainMetadata = true; 1441 mustRetainMetadata = true;
1441 for (LibraryElement library in compiler.libraries.values) { 1442 for (LibraryElement library in compiler.libraries.values) {
1442 if (retainMetadataOf(library)) { 1443 if (retainMetadataOf(library)) {
(...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after
1642 copy(constant.values); 1643 copy(constant.values);
1643 copy(constant.protoValue); 1644 copy(constant.protoValue);
1644 copy(constant); 1645 copy(constant);
1645 } 1646 }
1646 1647
1647 void visitConstructed(ConstructedConstant constant) { 1648 void visitConstructed(ConstructedConstant constant) {
1648 copy(constant.fields); 1649 copy(constant.fields);
1649 copy(constant); 1650 copy(constant);
1650 } 1651 }
1651 } 1652 }
OLDNEW
« no previous file with comments | « no previous file | tests/compiler/dart2js_extra/tree_woe_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698