| 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 685 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 696 visitContinueStatement(ContinueStatement node) { | 696 visitContinueStatement(ContinueStatement node) { |
| 697 return StatementType.NOT_RETURNING; | 697 return StatementType.NOT_RETURNING; |
| 698 } | 698 } |
| 699 | 699 |
| 700 visitForIn(ForIn node) { | 700 visitForIn(ForIn node) { |
| 701 analyze(node.expression); | 701 analyze(node.expression); |
| 702 StatementType bodyType = analyze(node.body); | 702 StatementType bodyType = analyze(node.body); |
| 703 return bodyType.join(StatementType.NOT_RETURNING); | 703 return bodyType.join(StatementType.NOT_RETURNING); |
| 704 } | 704 } |
| 705 | 705 |
| 706 visitLabel(Label node) { } |
| 707 |
| 706 visitLabeledStatement(LabeledStatement node) { | 708 visitLabeledStatement(LabeledStatement node) { |
| 707 return node.statement.accept(this); | 709 return node.statement.accept(this); |
| 708 } | 710 } |
| 709 | 711 |
| 710 visitLiteralMap(LiteralMap node) { | 712 visitLiteralMap(LiteralMap node) { |
| 711 fail(node); | 713 fail(node); |
| 712 } | 714 } |
| 713 | 715 |
| 714 visitLiteralMapEntry(LiteralMapEntry node) { | 716 visitLiteralMapEntry(LiteralMapEntry node) { |
| 715 fail(node); | 717 fail(node); |
| (...skipping 20 matching lines...) Expand all Loading... |
| 736 } | 738 } |
| 737 | 739 |
| 738 visitCatchBlock(CatchBlock node) { | 740 visitCatchBlock(CatchBlock node) { |
| 739 fail(node); | 741 fail(node); |
| 740 } | 742 } |
| 741 | 743 |
| 742 visitTypedef(Typedef node) { | 744 visitTypedef(Typedef node) { |
| 743 fail(node); | 745 fail(node); |
| 744 } | 746 } |
| 745 } | 747 } |
| OLD | NEW |