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

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

Issue 814833008: dart2js: rename Elements.isErroneousElement to Elements.isErroneous. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 years, 11 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 | « pkg/compiler/lib/src/ssa/builder.dart ('k') | no next file » | 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 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 1100 matching lines...) Expand 10 before | Expand all | Expand 10 after
1111 Identifier selector = node.selector.asIdentifier(); 1111 Identifier selector = node.selector.asIdentifier();
1112 if (Elements.isClosureSend(node, element)) { 1112 if (Elements.isClosureSend(node, element)) {
1113 if (element != null) { 1113 if (element != null) {
1114 // foo() where foo is a local or a parameter. 1114 // foo() where foo is a local or a parameter.
1115 return analyzeInvocation(node, createPromotedAccess(element)); 1115 return analyzeInvocation(node, createPromotedAccess(element));
1116 } else { 1116 } else {
1117 // exp() where exp is some complex expression like (o) or foo(). 1117 // exp() where exp is some complex expression like (o) or foo().
1118 DartType type = analyze(node.selector); 1118 DartType type = analyze(node.selector);
1119 return analyzeInvocation(node, new TypeAccess(type)); 1119 return analyzeInvocation(node, new TypeAccess(type));
1120 } 1120 }
1121 } else if (Elements.isErroneousElement(element) && selector == null) { 1121 } else if (Elements.isErroneous(element) && selector == null) {
1122 // exp() where exp is an erroneous construct like `new Unresolved()`. 1122 // exp() where exp is an erroneous construct like `new Unresolved()`.
1123 DartType type = analyze(node.selector); 1123 DartType type = analyze(node.selector);
1124 return analyzeInvocation(node, new TypeAccess(type)); 1124 return analyzeInvocation(node, new TypeAccess(type));
1125 } 1125 }
1126 1126
1127 String name = selector.source; 1127 String name = selector.source;
1128 1128
1129 if (node.isOperator && identical(name, 'is')) { 1129 if (node.isOperator && identical(name, 'is')) {
1130 analyze(node.receiver); 1130 analyze(node.receiver);
1131 if (!node.isIsNotCheck) { 1131 if (!node.isIsNotCheck) {
(...skipping 696 matching lines...) Expand 10 before | Expand all | Expand 10 after
1828 1828
1829 visitTypedef(Typedef node) { 1829 visitTypedef(Typedef node) {
1830 // Do not typecheck [Typedef] nodes. 1830 // Do not typecheck [Typedef] nodes.
1831 } 1831 }
1832 1832
1833 visitNode(Node node) { 1833 visitNode(Node node) {
1834 compiler.internalError(node, 1834 compiler.internalError(node,
1835 'Unexpected node ${node.getObjectDescription()} in the type checker.'); 1835 'Unexpected node ${node.getObjectDescription()} in the type checker.');
1836 } 1836 }
1837 } 1837 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/ssa/builder.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698