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

Side by Side Diff: dart/frog/leg/typechecker.dart

Issue 8993009: Implement string interpolation up to SSA. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: Address (some) review comments and update status file Created 9 years 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 | « dart/frog/leg/tree/visitors.dart ('k') | dart/tests/language/language-leg.status » ('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) 2011, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2011, 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 class TypeCheckerTask extends CompilerTask { 5 class TypeCheckerTask extends CompilerTask {
6 TypeCheckerTask(Compiler compiler) : types = new Types(), super(compiler); 6 TypeCheckerTask(Compiler compiler) : types = new Types(), super(compiler);
7 String get name() => "Type checker"; 7 String get name() => "Type checker";
8 Types types; 8 Types types;
9 9
10 void check(Node tree, TreeElements elements) { 10 void check(Node tree, TreeElements elements) {
(...skipping 514 matching lines...) Expand 10 before | Expand all | Expand 10 after
525 Type thenType = analyzeNonVoid(node.thenExpression); 525 Type thenType = analyzeNonVoid(node.thenExpression);
526 Type elseType = analyzeNonVoid(node.elseExpression); 526 Type elseType = analyzeNonVoid(node.elseExpression);
527 if (types.isSubtype(thenType, elseType)) { 527 if (types.isSubtype(thenType, elseType)) {
528 return thenType; 528 return thenType;
529 } else if (types.isSubtype(elseType, thenType)) { 529 } else if (types.isSubtype(elseType, thenType)) {
530 return elseType; 530 return elseType;
531 } else { 531 } else {
532 return objectType; 532 return objectType;
533 } 533 }
534 } 534 }
535
536 visitStringInterpolation(StringInterpolation node) {
537 node.visitChildren(this);
538 return stringType;
539 }
540
541 visitStringInterpolationPart(StringInterpolationPart node) {
542 node.visitChildren(this);
543 }
535 } 544 }
OLDNEW
« no previous file with comments | « dart/frog/leg/tree/visitors.dart ('k') | dart/tests/language/language-leg.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698