| 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 part of dart2js; | 5 part of dart2js; |
| 6 | 6 |
| 7 class TypeCheckerTask extends CompilerTask { | 7 class TypeCheckerTask extends CompilerTask { |
| 8 TypeCheckerTask(Compiler compiler) : super(compiler); | 8 TypeCheckerTask(Compiler compiler) : super(compiler); |
| 9 String get name => "Type checker"; | 9 String get name => "Type checker"; |
| 10 | 10 |
| (...skipping 1701 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1712 } | 1712 } |
| 1713 | 1713 |
| 1714 visitBreakStatement(BreakStatement node) { | 1714 visitBreakStatement(BreakStatement node) { |
| 1715 return const StatementType(); | 1715 return const StatementType(); |
| 1716 } | 1716 } |
| 1717 | 1717 |
| 1718 visitContinueStatement(ContinueStatement node) { | 1718 visitContinueStatement(ContinueStatement node) { |
| 1719 return const StatementType(); | 1719 return const StatementType(); |
| 1720 } | 1720 } |
| 1721 | 1721 |
| 1722 visitForIn(ForIn node) { | 1722 visitAsyncForIn(AsyncForIn node) { |
| 1723 analyze(node.expression); | 1723 analyze(node.expression); |
| 1724 analyze(node.body); | 1724 analyze(node.body); |
| 1725 return const StatementType(); | 1725 return const StatementType(); |
| 1726 } |
| 1727 |
| 1728 visitSyncForIn(SyncForIn node) { |
| 1729 analyze(node.expression); |
| 1730 analyze(node.body); |
| 1731 return const StatementType(); |
| 1726 } | 1732 } |
| 1727 | 1733 |
| 1728 visitLabeledStatement(LabeledStatement node) { | 1734 visitLabeledStatement(LabeledStatement node) { |
| 1729 return analyze(node.statement); | 1735 return analyze(node.statement); |
| 1730 } | 1736 } |
| 1731 | 1737 |
| 1732 visitLiteralMap(LiteralMap node) { | 1738 visitLiteralMap(LiteralMap node) { |
| 1733 InterfaceType mapType = elements.getType(node); | 1739 InterfaceType mapType = elements.getType(node); |
| 1734 DartType mapKeyType = firstType(mapType.typeArguments); | 1740 DartType mapKeyType = firstType(mapType.typeArguments); |
| 1735 DartType mapValueType = secondType(mapType.typeArguments); | 1741 DartType mapValueType = secondType(mapType.typeArguments); |
| (...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1841 | 1847 |
| 1842 visitTypedef(Typedef node) { | 1848 visitTypedef(Typedef node) { |
| 1843 // Do not typecheck [Typedef] nodes. | 1849 // Do not typecheck [Typedef] nodes. |
| 1844 } | 1850 } |
| 1845 | 1851 |
| 1846 visitNode(Node node) { | 1852 visitNode(Node node) { |
| 1847 compiler.internalError(node, | 1853 compiler.internalError(node, |
| 1848 'Unexpected node ${node.getObjectDescription()} in the type checker.'); | 1854 'Unexpected node ${node.getObjectDescription()} in the type checker.'); |
| 1849 } | 1855 } |
| 1850 } | 1856 } |
| OLD | NEW |