| 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 1412 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 Loading... |
| 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 } |
| OLD | NEW |