| 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 if (element == disableTreeShakingMarker) { | 1549 if (element == disableTreeShakingMarker) { |
| 1550 compiler.disableTypeInferenceForMirrors = true; | 1550 compiler.disableTypeInferenceForMirrors = true; |
| 1551 isTreeShakingDisabled = true; | 1551 isTreeShakingDisabled = true; |
| 1552 typeVariableHandler.onTreeShakingDisabled(enqueuer); | 1552 typeVariableHandler.onTreeShakingDisabled(enqueuer); |
| 1553 } else if (element == preserveNamesMarker) { | 1553 } else if (element == preserveNamesMarker) { |
| 1554 mustPreserveNames = true; | 1554 mustPreserveNames = true; |
| 1555 } else if (element == preserveMetadataMarker) { | 1555 } else if (element == preserveMetadataMarker) { |
| 1556 mustRetainMetadata = true; | 1556 mustRetainMetadata = true; |
| 1557 } else if (element == getIsolateAffinityTagMarker) { | 1557 } else if (element == getIsolateAffinityTagMarker) { |
| 1558 needToInitializeIsolateAffinityTag = true; | 1558 needToInitializeIsolateAffinityTag = true; |
| 1559 } else if (element.isDeferredLoaderGetter()) { |
| 1560 // TODO(sigurdm): Create a function registerLoadLibraryAccess. |
| 1561 if (compiler.loadLibraryFunction == null) { |
| 1562 compiler.loadLibraryFunction = |
| 1563 compiler.findHelper("_loadLibraryWrapper"); |
| 1564 enqueueInResolution(compiler.loadLibraryFunction, |
| 1565 compiler.globalDependencies); |
| 1566 } |
| 1559 } | 1567 } |
| 1560 customElementsAnalysis.registerStaticUse(element, enqueuer); | 1568 customElementsAnalysis.registerStaticUse(element, enqueuer); |
| 1561 } | 1569 } |
| 1562 | 1570 |
| 1563 /// Called when [:const Symbol(name):] is seen. | 1571 /// Called when [:const Symbol(name):] is seen. |
| 1564 void registerConstSymbol(String name, TreeElements elements) { | 1572 void registerConstSymbol(String name, TreeElements elements) { |
| 1565 symbolsUsed.add(name); | 1573 symbolsUsed.add(name); |
| 1566 if (name.endsWith('=')) { | 1574 if (name.endsWith('=')) { |
| 1567 symbolsUsed.add(name.substring(0, name.length - 1)); | 1575 symbolsUsed.add(name.substring(0, name.length - 1)); |
| 1568 } | 1576 } |
| (...skipping 348 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1917 copy(constant.values); | 1925 copy(constant.values); |
| 1918 copy(constant.protoValue); | 1926 copy(constant.protoValue); |
| 1919 copy(constant); | 1927 copy(constant); |
| 1920 } | 1928 } |
| 1921 | 1929 |
| 1922 void visitConstructed(ConstructedConstant constant) { | 1930 void visitConstructed(ConstructedConstant constant) { |
| 1923 copy(constant.fields); | 1931 copy(constant.fields); |
| 1924 copy(constant); | 1932 copy(constant); |
| 1925 } | 1933 } |
| 1926 } | 1934 } |
| OLD | NEW |