| 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 481 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 492 } | 492 } |
| 493 | 493 |
| 494 Type visitLiteralBool(LiteralBool node) { | 494 Type visitLiteralBool(LiteralBool node) { |
| 495 return boolType; | 495 return boolType; |
| 496 } | 496 } |
| 497 | 497 |
| 498 Type visitLiteralString(LiteralString node) { | 498 Type visitLiteralString(LiteralString node) { |
| 499 return stringType; | 499 return stringType; |
| 500 } | 500 } |
| 501 | 501 |
| 502 Type visitLiteralStringJuxtaposition(LiteralStringJuxtaposition node) { | 502 Type visitStringJuxtaposition(StringJuxtaposition node) { |
| 503 analyze(node.first); |
| 504 analyze(node.second); |
| 503 return stringType; | 505 return stringType; |
| 504 } | 506 } |
| 505 | 507 |
| 506 Type visitLiteralNull(LiteralNull node) { | 508 Type visitLiteralNull(LiteralNull node) { |
| 507 return types.dynamicType; | 509 return types.dynamicType; |
| 508 } | 510 } |
| 509 | 511 |
| 510 Type visitNewExpression(NewExpression node) { | 512 Type visitNewExpression(NewExpression node) { |
| 511 return analyze(node.send.selector); | 513 return analyze(node.send.selector); |
| 512 } | 514 } |
| (...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 705 } | 707 } |
| 706 | 708 |
| 707 visitCatchBlock(CatchBlock node) { | 709 visitCatchBlock(CatchBlock node) { |
| 708 fail(node); | 710 fail(node); |
| 709 } | 711 } |
| 710 | 712 |
| 711 visitTypedef(Typedef node) { | 713 visitTypedef(Typedef node) { |
| 712 fail(node); | 714 fail(node); |
| 713 } | 715 } |
| 714 } | 716 } |
| OLD | NEW |