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

Side by Side Diff: pkg/compiler/lib/src/typechecker.dart

Issue 1019923005: Dart2js deferred loading. Follow types of functions when calculating dependencies. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Added test for generic type Created 5 years, 8 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 dart2js; 5 part of dart2js;
6 6
7 class TypeCheckerTask extends CompilerTask { 7 class TypeCheckerTask extends CompilerTask {
8 TypeCheckerTask(Compiler compiler) : super(compiler); 8 TypeCheckerTask(Compiler compiler) : super(compiler);
9 String get name => "Type checker"; 9 String get name => "Type checker";
10 10
(...skipping 894 matching lines...) Expand 10 before | Expand all | Expand 10 after
905 if (parameterTypes.moveNext()) { 905 if (parameterTypes.moveNext()) {
906 error = true; 906 error = true;
907 // TODO(johnniwinther): Provide better information on the called 907 // TODO(johnniwinther): Provide better information on the called
908 // function. 908 // function.
909 reportTypeWarning(send, MessageKind.MISSING_ARGUMENT, 909 reportTypeWarning(send, MessageKind.MISSING_ARGUMENT,
910 {'argumentType': parameterTypes.current}); 910 {'argumentType': parameterTypes.current});
911 } 911 }
912 if (error) { 912 if (error) {
913 // TODO(johnniwinther): Improve access to declaring element and handle 913 // TODO(johnniwinther): Improve access to declaring element and handle
914 // synthesized member signatures. Currently function typed instance 914 // synthesized member signatures. Currently function typed instance
915 // members provide no access to there own name. 915 // members provide no access to their own name.
916 if (element == null) { 916 if (element == null) {
917 element = type.element; 917 element = type.element;
918 } else if (type.element.isTypedef) { 918 } else if (type.isTypedef) {
919 if (element != null) { 919 reportTypeInfo(element,
920 reportTypeInfo(element, 920 MessageKind.THIS_IS_THE_DECLARATION,
921 MessageKind.THIS_IS_THE_DECLARATION, 921 {'name': element.name});
922 {'name': element.name});
923 }
924 element = type.element; 922 element = type.element;
925 } 923 }
926 reportTypeInfo(element, MessageKind.THIS_IS_THE_METHOD); 924 if (element != null) {
925 reportTypeInfo(element, MessageKind.THIS_IS_THE_METHOD);
926 }
927 } 927 }
928 } else { 928 } else {
929 while(!arguments.isEmpty) { 929 while(!arguments.isEmpty) {
930 DartType argumentType = analyze(arguments.head); 930 DartType argumentType = analyze(arguments.head);
931 if (argumentTypes != null) argumentTypes.addLast(argumentType); 931 if (argumentTypes != null) argumentTypes.addLast(argumentType);
932 arguments = arguments.tail; 932 arguments = arguments.tail;
933 } 933 }
934 } 934 }
935 } 935 }
936 936
(...skipping 910 matching lines...) Expand 10 before | Expand all | Expand 10 after
1847 1847
1848 visitTypedef(Typedef node) { 1848 visitTypedef(Typedef node) {
1849 // Do not typecheck [Typedef] nodes. 1849 // Do not typecheck [Typedef] nodes.
1850 } 1850 }
1851 1851
1852 visitNode(Node node) { 1852 visitNode(Node node) {
1853 compiler.internalError(node, 1853 compiler.internalError(node,
1854 'Unexpected node ${node.getObjectDescription()} in the type checker.'); 1854 'Unexpected node ${node.getObjectDescription()} in the type checker.');
1855 } 1855 }
1856 } 1856 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/resolution/members.dart ('k') | tests/language/deferred_regression_22995_lib.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698