| OLD | NEW |
| 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 class TypeCheckerTask extends CompilerTask { | 5 class TypeCheckerTask extends CompilerTask { |
| 6 TypeCheckerTask(Compiler compiler) : super(compiler); | 6 TypeCheckerTask(Compiler compiler) : super(compiler); |
| 7 String get name() => "Type checker"; | 7 String get name() => "Type checker"; |
| 8 | 8 |
| 9 static final bool LOG_FAILURES = false; | 9 static final bool LOG_FAILURES = false; |
| 10 | 10 |
| (...skipping 473 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 484 } | 484 } |
| 485 | 485 |
| 486 Type visitLiteralBool(LiteralBool node) { | 486 Type visitLiteralBool(LiteralBool node) { |
| 487 return boolType; | 487 return boolType; |
| 488 } | 488 } |
| 489 | 489 |
| 490 Type visitLiteralString(LiteralString node) { | 490 Type visitLiteralString(LiteralString node) { |
| 491 return stringType; | 491 return stringType; |
| 492 } | 492 } |
| 493 | 493 |
| 494 Type visitLiteralStringJuxtaposition(LiteralStringJuxtaposition node) { | 494 Type visitStringJuxtaposition(StringJuxtaposition node) { |
| 495 analyze(node.first); |
| 496 analyze(node.second); |
| 495 return stringType; | 497 return stringType; |
| 496 } | 498 } |
| 497 | 499 |
| 498 Type visitLiteralNull(LiteralNull node) { | 500 Type visitLiteralNull(LiteralNull node) { |
| 499 return types.dynamicType; | 501 return types.dynamicType; |
| 500 } | 502 } |
| 501 | 503 |
| 502 Type visitNewExpression(NewExpression node) { | 504 Type visitNewExpression(NewExpression node) { |
| 503 return analyze(node.send.selector); | 505 return analyze(node.send.selector); |
| 504 } | 506 } |
| (...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 693 } | 695 } |
| 694 | 696 |
| 695 visitCatchBlock(CatchBlock node) { | 697 visitCatchBlock(CatchBlock node) { |
| 696 fail(node); | 698 fail(node); |
| 697 } | 699 } |
| 698 | 700 |
| 699 visitTypedef(Typedef node) { | 701 visitTypedef(Typedef node) { |
| 700 fail(node); | 702 fail(node); |
| 701 } | 703 } |
| 702 } | 704 } |
| OLD | NEW |