Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(844)

Side by Side Diff: dart/frog/leg/typechecker.dart

Issue 9539009: Generate code that throws an exception on unimplemented features. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 8 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « dart/frog/leg/ssa/closure.dart ('k') | dart/tests/co19/co19-leg.status » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 615 matching lines...) Expand 10 before | Expand all | Expand 10 after
626 626
627 visitEmptyStatement(EmptyStatement node) { 627 visitEmptyStatement(EmptyStatement node) {
628 return StatementType.NOT_RETURNING; 628 return StatementType.NOT_RETURNING;
629 } 629 }
630 630
631 visitBreakStatement(BreakStatement node) { 631 visitBreakStatement(BreakStatement node) {
632 return StatementType.NOT_RETURNING; 632 return StatementType.NOT_RETURNING;
633 } 633 }
634 634
635 visitContinueStatement(ContinueStatement node) { 635 visitContinueStatement(ContinueStatement node) {
636 compiler.unimplemented('visitContinueStatement', node: node); 636 return StatementType.NOT_RETURNING;
637 } 637 }
638 638
639 visitForInStatement(ForInStatement node) { 639 visitForInStatement(ForInStatement node) {
640 analyze(node.expression); 640 analyze(node.expression);
641 StatementType bodyType = analyze(node.body); 641 StatementType bodyType = analyze(node.body);
642 return bodyType.join(StatementType.NOT_RETURNING); 642 return bodyType.join(StatementType.NOT_RETURNING);
643 } 643 }
644 644
645 visitLabelledStatement(LabelledStatement node) { 645 visitLabelledStatement(LabelledStatement node) {
646 return node.statement.accept(this); 646 return node.statement.accept(this);
647 } 647 }
648 648
649 visitLiteralMap(LiteralMap node) { 649 visitLiteralMap(LiteralMap node) {
650 compiler.unimplemented('visitLiteralMap', node: node); 650 fail(node);
651 } 651 }
652 652
653 visitLiteralMapEntry(LiteralMapEntry node) { 653 visitLiteralMapEntry(LiteralMapEntry node) {
654 compiler.unimplemented('visitLiteralMapEntry', node: node); 654 fail(node);
655 } 655 }
656 656
657 visitNamedArgument(NamedArgument node) { 657 visitNamedArgument(NamedArgument node) {
658 fail(node, 'named argument not implemented'); 658 fail(node, 'named argument not implemented');
659 } 659 }
660 660
661 visitSwitchStatement(SwitchStatement node) { 661 visitSwitchStatement(SwitchStatement node) {
662 compiler.unimplemented('visitSwitchStatement', node: node); 662 fail(node);
663 } 663 }
664 664
665 visitTryStatement(TryStatement node) { 665 visitTryStatement(TryStatement node) {
666 fail(node, 'unimplemented'); 666 fail(node, 'unimplemented');
667 } 667 }
668 668
669 visitScriptTag(ScriptTag node) { 669 visitScriptTag(ScriptTag node) {
670 compiler.unimplemented('visitScriptTag', node: node); 670 fail(node);
671 } 671 }
672 672
673 visitCatchBlock(CatchBlock node) { 673 visitCatchBlock(CatchBlock node) {
674 compiler.unimplemented('visitCatchBlock', node: node); 674 fail(node);
675 } 675 }
676 676
677 visitTypedef(Typedef node) { 677 visitTypedef(Typedef node) {
678 compiler.unimplemented('visitTypedef', node: node); 678 fail(node);
679 } 679 }
680 } 680 }
OLDNEW
« no previous file with comments | « dart/frog/leg/ssa/closure.dart ('k') | dart/tests/co19/co19-leg.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698