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

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

Issue 22833005: Allow infering of return types on runtime helpers. It's only arugments the inferrer does not see. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 4 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
« no previous file with comments | « no previous file | sdk/lib/_internal/compiler/implementation/types/simple_types_inferrer.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 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 885 matching lines...) Expand 10 before | Expand all | Expand 10 after
896 enqueueInResolution(helper.getElement(compiler), elements); 896 enqueueInResolution(helper.getElement(compiler), elements);
897 // We also need the native variant of the check (for DOM types). 897 // We also need the native variant of the check (for DOM types).
898 helper = getNativeCheckedModeHelper(type, typeCast: true); 898 helper = getNativeCheckedModeHelper(type, typeCast: true);
899 if (helper != null) { 899 if (helper != null) {
900 enqueueInResolution(helper.getElement(compiler), elements); 900 enqueueInResolution(helper.getElement(compiler), elements);
901 } 901 }
902 } 902 }
903 903
904 void registerThrowNoSuchMethod(TreeElements elements) { 904 void registerThrowNoSuchMethod(TreeElements elements) {
905 enqueueInResolution(getThrowNoSuchMethod(), elements); 905 enqueueInResolution(getThrowNoSuchMethod(), elements);
906 // Also register the types of the arguments passed to this method.
907 compiler.enqueuer.resolution.registerInstantiatedClass(
908 compiler.listClass, elements);
909 compiler.enqueuer.resolution.registerInstantiatedClass(
910 compiler.stringClass, elements);
906 } 911 }
907 912
908 void registerThrowRuntimeError(TreeElements elements) { 913 void registerThrowRuntimeError(TreeElements elements) {
909 enqueueInResolution(getThrowRuntimeError(), elements); 914 enqueueInResolution(getThrowRuntimeError(), elements);
915 // Also register the types of the arguments passed to this method.
916 compiler.enqueuer.resolution.registerInstantiatedClass(
917 compiler.stringClass, elements);
910 } 918 }
911 919
912 void registerAbstractClassInstantiation(TreeElements elements) { 920 void registerAbstractClassInstantiation(TreeElements elements) {
913 enqueueInResolution(getThrowAbstractClassInstantiationError(), elements); 921 enqueueInResolution(getThrowAbstractClassInstantiationError(), elements);
922 // Also register the types of the arguments passed to this method.
923 compiler.enqueuer.resolution.registerInstantiatedClass(
924 compiler.stringClass, elements);
914 } 925 }
915 926
916 void registerFallThroughError(TreeElements elements) { 927 void registerFallThroughError(TreeElements elements) {
917 enqueueInResolution(getFallThroughError(), elements); 928 enqueueInResolution(getFallThroughError(), elements);
918 } 929 }
919 930
920 void registerSuperNoSuchMethod(TreeElements elements) { 931 void registerSuperNoSuchMethod(TreeElements elements) {
921 enqueueInResolution(getCreateInvocationMirror(), elements); 932 enqueueInResolution(getCreateInvocationMirror(), elements);
922 enqueueInResolution( 933 enqueueInResolution(
923 compiler.objectClass.lookupLocalMember(Compiler.NO_SUCH_METHOD), 934 compiler.objectClass.lookupLocalMember(Compiler.NO_SUCH_METHOD),
(...skipping 659 matching lines...) Expand 10 before | Expand all | Expand 10 after
1583 copy(constant.values); 1594 copy(constant.values);
1584 copy(constant.protoValue); 1595 copy(constant.protoValue);
1585 copy(constant); 1596 copy(constant);
1586 } 1597 }
1587 1598
1588 void visitConstructed(ConstructedConstant constant) { 1599 void visitConstructed(ConstructedConstant constant) {
1589 copy(constant.fields); 1600 copy(constant.fields);
1590 copy(constant); 1601 copy(constant);
1591 } 1602 }
1592 } 1603 }
OLDNEW
« no previous file with comments | « no previous file | sdk/lib/_internal/compiler/implementation/types/simple_types_inferrer.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698