| 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 class JavaScriptItemCompilationContext extends ItemCompilationContext { | 9 class JavaScriptItemCompilationContext extends ItemCompilationContext { |
| 10 final Set<HInstruction> boundsChecked = new Set<HInstruction>(); | 10 final Set<HInstruction> boundsChecked = new Set<HInstruction>(); |
| (...skipping 1538 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1549 void registerStaticUse(Element element, Enqueuer enqueuer) { | 1549 void registerStaticUse(Element element, Enqueuer enqueuer) { |
| 1550 if (element == disableTreeShakingMarker) { | 1550 if (element == disableTreeShakingMarker) { |
| 1551 compiler.disableTypeInferenceForMirrors = true; | 1551 compiler.disableTypeInferenceForMirrors = true; |
| 1552 isTreeShakingDisabled = true; | 1552 isTreeShakingDisabled = true; |
| 1553 typeVariableHandler.onTreeShakingDisabled(enqueuer); | 1553 typeVariableHandler.onTreeShakingDisabled(enqueuer); |
| 1554 } else if (element == preserveNamesMarker) { | 1554 } else if (element == preserveNamesMarker) { |
| 1555 mustPreserveNames = true; | 1555 mustPreserveNames = true; |
| 1556 } else if (element == preserveMetadataMarker) { | 1556 } else if (element == preserveMetadataMarker) { |
| 1557 mustRetainMetadata = true; | 1557 mustRetainMetadata = true; |
| 1558 } else if (element == preserveUrisMarker) { | 1558 } else if (element == preserveUrisMarker) { |
| 1559 mustRetainUris = true; | 1559 if (!compiler.hideUris) mustRetainUris = true; |
| 1560 } else if (element == preserveLibraryNamesMarker) { | 1560 } else if (element == preserveLibraryNamesMarker) { |
| 1561 mustRetainLibraryNames = true; | 1561 mustRetainLibraryNames = true; |
| 1562 } else if (element == getIsolateAffinityTagMarker) { | 1562 } else if (element == getIsolateAffinityTagMarker) { |
| 1563 needToInitializeIsolateAffinityTag = true; | 1563 needToInitializeIsolateAffinityTag = true; |
| 1564 } else if (element.isDeferredLoaderGetter) { | 1564 } else if (element.isDeferredLoaderGetter) { |
| 1565 // TODO(sigurdm): Create a function registerLoadLibraryAccess. | 1565 // TODO(sigurdm): Create a function registerLoadLibraryAccess. |
| 1566 if (compiler.loadLibraryFunction == null) { | 1566 if (compiler.loadLibraryFunction == null) { |
| 1567 compiler.loadLibraryFunction = | 1567 compiler.loadLibraryFunction = |
| 1568 findHelper("_loadLibraryWrapper"); | 1568 findHelper("_loadLibraryWrapper"); |
| 1569 enqueueInResolution(compiler.loadLibraryFunction, | 1569 enqueueInResolution(compiler.loadLibraryFunction, |
| (...skipping 837 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2407 } | 2407 } |
| 2408 } | 2408 } |
| 2409 | 2409 |
| 2410 /// Records that [constant] is used by the element behind [registry]. | 2410 /// Records that [constant] is used by the element behind [registry]. |
| 2411 class Dependency { | 2411 class Dependency { |
| 2412 final Constant constant; | 2412 final Constant constant; |
| 2413 final Element annotatedElement; | 2413 final Element annotatedElement; |
| 2414 | 2414 |
| 2415 const Dependency(this.constant, this.annotatedElement); | 2415 const Dependency(this.constant, this.annotatedElement); |
| 2416 } | 2416 } |
| OLD | NEW |