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

Side by Side Diff: pkg/compiler/lib/src/js_backend/backend.dart

Issue 1418043005: dart2js: Set inferred return types for async, async*, and sync* methods. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 1 month 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
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 1860 matching lines...) Expand 10 before | Expand all | Expand 10 after
1871 ClassElement get stringImplementation => helpers.jsStringClass; 1871 ClassElement get stringImplementation => helpers.jsStringClass;
1872 ClassElement get listImplementation => helpers.jsArrayClass; 1872 ClassElement get listImplementation => helpers.jsArrayClass;
1873 ClassElement get constListImplementation => helpers.jsUnmodifiableArrayClass; 1873 ClassElement get constListImplementation => helpers.jsUnmodifiableArrayClass;
1874 ClassElement get fixedListImplementation => helpers.jsFixedArrayClass; 1874 ClassElement get fixedListImplementation => helpers.jsFixedArrayClass;
1875 ClassElement get growableListImplementation => helpers.jsExtendableArrayClass; 1875 ClassElement get growableListImplementation => helpers.jsExtendableArrayClass;
1876 ClassElement get mapImplementation => helpers.mapLiteralClass; 1876 ClassElement get mapImplementation => helpers.mapLiteralClass;
1877 ClassElement get constMapImplementation => helpers.constMapLiteralClass; 1877 ClassElement get constMapImplementation => helpers.constMapLiteralClass;
1878 ClassElement get typeImplementation => helpers.typeLiteralClass; 1878 ClassElement get typeImplementation => helpers.typeLiteralClass;
1879 ClassElement get boolImplementation => helpers.jsBoolClass; 1879 ClassElement get boolImplementation => helpers.jsBoolClass;
1880 ClassElement get nullImplementation => helpers.jsNullClass; 1880 ClassElement get nullImplementation => helpers.jsNullClass;
1881 ClassElement get syncStarIterableImplementation => helpers.syncStarIterable;
1882 ClassElement get asyncFutureImplementation => helpers.futureImplementation;
1883 ClassElement get asyncStarStreamImplementation => helpers.controllerStream;
1881 1884
1882 void registerStaticUse(Element element, Enqueuer enqueuer) { 1885 void registerStaticUse(Element element, Enqueuer enqueuer) {
1883 if (element == helpers.disableTreeShakingMarker) { 1886 if (element == helpers.disableTreeShakingMarker) {
1884 compiler.disableTypeInferenceForMirrors = true; 1887 compiler.disableTypeInferenceForMirrors = true;
1885 isTreeShakingDisabled = true; 1888 isTreeShakingDisabled = true;
1886 } else if (element == helpers.preserveNamesMarker) { 1889 } else if (element == helpers.preserveNamesMarker) {
1887 mustPreserveNames = true; 1890 mustPreserveNames = true;
1888 } else if (element == helpers.preserveMetadataMarker) { 1891 } else if (element == helpers.preserveMetadataMarker) {
1889 mustRetainMetadata = true; 1892 mustRetainMetadata = true;
1890 } else if (element == helpers.preserveUrisMarker) { 1893 } else if (element == helpers.preserveUrisMarker) {
(...skipping 1110 matching lines...) Expand 10 before | Expand all | Expand 10 after
3001 } 3004 }
3002 } 3005 }
3003 3006
3004 /// Records that [constant] is used by the element behind [registry]. 3007 /// Records that [constant] is used by the element behind [registry].
3005 class Dependency { 3008 class Dependency {
3006 final ConstantValue constant; 3009 final ConstantValue constant;
3007 final Element annotatedElement; 3010 final Element annotatedElement;
3008 3011
3009 const Dependency(this.constant, this.annotatedElement); 3012 const Dependency(this.constant, this.annotatedElement);
3010 } 3013 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/inferrer/type_graph_inferrer.dart ('k') | pkg/compiler/lib/src/js_backend/backend_helpers.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698