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

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

Issue 201613006: Introduces the new syntax for deferred loading (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 9 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 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
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.isDeferredLoaderFunction()) {
1560 // TODO(sigurdm): Create a function registerLoadLibraryAccess.
1561 if (compiler.loadLibraryFunction == null) {
1562 compiler.loadLibraryFunction = compiler.findHelper("_load");
1563 enqueueInResolution(compiler.loadLibraryFunction,
1564 compiler.globalDependencies);
1565 }
1559 } 1566 }
1560 customElementsAnalysis.registerStaticUse(element, enqueuer); 1567 customElementsAnalysis.registerStaticUse(element, enqueuer);
1561 } 1568 }
1562 1569
1563 /// Called when [:const Symbol(name):] is seen. 1570 /// Called when [:const Symbol(name):] is seen.
1564 void registerConstSymbol(String name, TreeElements elements) { 1571 void registerConstSymbol(String name, TreeElements elements) {
1565 symbolsUsed.add(name); 1572 symbolsUsed.add(name);
1566 if (name.endsWith('=')) { 1573 if (name.endsWith('=')) {
1567 symbolsUsed.add(name.substring(0, name.length - 1)); 1574 symbolsUsed.add(name.substring(0, name.length - 1));
1568 } 1575 }
(...skipping 348 matching lines...) Expand 10 before | Expand all | Expand 10 after
1917 copy(constant.values); 1924 copy(constant.values);
1918 copy(constant.protoValue); 1925 copy(constant.protoValue);
1919 copy(constant); 1926 copy(constant);
1920 } 1927 }
1921 1928
1922 void visitConstructed(ConstructedConstant constant) { 1929 void visitConstructed(ConstructedConstant constant) {
1923 copy(constant.fields); 1930 copy(constant.fields);
1924 copy(constant); 1931 copy(constant);
1925 } 1932 }
1926 } 1933 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698