| 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 475 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 486 } | 486 } |
| 487 | 487 |
| 488 Type visitLiteralBool(LiteralBool node) { | 488 Type visitLiteralBool(LiteralBool node) { |
| 489 return boolType; | 489 return boolType; |
| 490 } | 490 } |
| 491 | 491 |
| 492 Type visitLiteralString(LiteralString node) { | 492 Type visitLiteralString(LiteralString node) { |
| 493 return stringType; | 493 return stringType; |
| 494 } | 494 } |
| 495 | 495 |
| 496 Type visitLiteralStringJuxtaposition(LiteralStringJuxtaposition node) { | 496 Type visitStringJuxtaposition(StringJuxtaposition node) { |
| 497 analyze(node.first); |
| 498 analyze(node.second); |
| 497 return stringType; | 499 return stringType; |
| 498 } | 500 } |
| 499 | 501 |
| 500 Type visitLiteralNull(LiteralNull node) { | 502 Type visitLiteralNull(LiteralNull node) { |
| 501 return types.dynamicType; | 503 return types.dynamicType; |
| 502 } | 504 } |
| 503 | 505 |
| 504 Type visitNewExpression(NewExpression node) { | 506 Type visitNewExpression(NewExpression node) { |
| 505 return analyze(node.send.selector); | 507 return analyze(node.send.selector); |
| 506 } | 508 } |
| (...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 695 } | 697 } |
| 696 | 698 |
| 697 visitCatchBlock(CatchBlock node) { | 699 visitCatchBlock(CatchBlock node) { |
| 698 fail(node); | 700 fail(node); |
| 699 } | 701 } |
| 700 | 702 |
| 701 visitTypedef(Typedef node) { | 703 visitTypedef(Typedef node) { |
| 702 fail(node); | 704 fail(node); |
| 703 } | 705 } |
| 704 } | 706 } |
| OLD | NEW |