Chromium Code Reviews| 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 void check(Node tree, TreeElements elements) { | 9 void check(Node tree, TreeElements elements) { |
| 10 measure(() { | 10 measure(() { |
| (...skipping 569 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 580 | 580 |
| 581 visitStringInterpolationPart(StringInterpolationPart node) { | 581 visitStringInterpolationPart(StringInterpolationPart node) { |
| 582 node.visitChildren(this); | 582 node.visitChildren(this); |
| 583 } | 583 } |
| 584 | 584 |
| 585 visitEmptyStatement(EmptyStatement node) { | 585 visitEmptyStatement(EmptyStatement node) { |
| 586 return StatementType.NOT_RETURNING; | 586 return StatementType.NOT_RETURNING; |
| 587 } | 587 } |
| 588 | 588 |
| 589 visitBreakStatement(BreakStatement node) { | 589 visitBreakStatement(BreakStatement node) { |
| 590 compiler.unimplemented('visitBreakStatement', node: node); | 590 return StatementType.NOT_RETURNING; |
|
Lasse Reichstein Nielsen
2012/02/20 13:56:16
Is this correct? I see visitThrow returns RETURNIN
| |
| 591 } | 591 } |
| 592 | 592 |
| 593 visitContinueStatement(ContinueStatement node) { | 593 visitContinueStatement(ContinueStatement node) { |
| 594 compiler.unimplemented('visitContinueStatement', node: node); | 594 compiler.unimplemented('visitContinueStatement', node: node); |
| 595 } | 595 } |
| 596 | 596 |
| 597 visitForInStatement(ForInStatement node) { | 597 visitForInStatement(ForInStatement node) { |
| 598 node.visitChildren(this); | 598 analyze(node.expression); |
| 599 StatementType bodyType = analyze(node.body); | |
| 600 return bodyType.join(StatementType.NOT_RETURNING); | |
| 599 } | 601 } |
| 600 | 602 |
| 601 visitLabelledStatement(LabelledStatement node) { | 603 visitLabelledStatement(LabelledStatement node) { |
| 602 compiler.unimplemented('visitLabelledStatement', node: node); | 604 return visit(node.statement); |
| 603 } | 605 } |
| 604 | 606 |
| 605 visitLiteralMap(LiteralMap node) { | 607 visitLiteralMap(LiteralMap node) { |
| 606 compiler.unimplemented('visitLiteralMap', node: node); | 608 compiler.unimplemented('visitLiteralMap', node: node); |
| 607 } | 609 } |
| 608 | 610 |
| 609 visitLiteralMapEntry(LiteralMapEntry node) { | 611 visitLiteralMapEntry(LiteralMapEntry node) { |
| 610 compiler.unimplemented('visitLiteralMapEntry', node: node); | 612 compiler.unimplemented('visitLiteralMapEntry', node: node); |
| 611 } | 613 } |
| 612 | 614 |
| (...skipping 14 matching lines...) Expand all Loading... | |
| 627 } | 629 } |
| 628 | 630 |
| 629 visitCatchBlock(CatchBlock node) { | 631 visitCatchBlock(CatchBlock node) { |
| 630 compiler.unimplemented('visitCatchBlock', node: node); | 632 compiler.unimplemented('visitCatchBlock', node: node); |
| 631 } | 633 } |
| 632 | 634 |
| 633 visitTypedef(Typedef node) { | 635 visitTypedef(Typedef node) { |
| 634 compiler.unimplemented('visitTypedef', node: node); | 636 compiler.unimplemented('visitTypedef', node: node); |
| 635 } | 637 } |
| 636 } | 638 } |
| OLD | NEW |