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

Side by Side Diff: src/ast/prettyprinter.cc

Issue 2575133002: [parser] remove %catch parsing (Closed)
Patch Set: try improving the comment again Created 4 years 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
« no previous file with comments | « src/ast/ast.h ('k') | src/parsing/parser.cc » ('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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/ast/prettyprinter.h" 5 #include "src/ast/prettyprinter.h"
6 6
7 #include <stdarg.h> 7 #include <stdarg.h>
8 8
9 #include "src/ast/ast-value-factory.h" 9 #include "src/ast/ast-value-factory.h"
10 #include "src/ast/scopes.h" 10 #include "src/ast/scopes.h"
(...skipping 861 matching lines...) Expand 10 before | Expand all | Expand 10 after
872 PrintIndentedVisit("TRY", node->try_block()); 872 PrintIndentedVisit("TRY", node->try_block());
873 PrintIndented("CATCH PREDICTION"); 873 PrintIndented("CATCH PREDICTION");
874 const char* prediction = ""; 874 const char* prediction = "";
875 switch (node->catch_prediction()) { 875 switch (node->catch_prediction()) {
876 case HandlerTable::UNCAUGHT: 876 case HandlerTable::UNCAUGHT:
877 prediction = "UNCAUGHT"; 877 prediction = "UNCAUGHT";
878 break; 878 break;
879 case HandlerTable::CAUGHT: 879 case HandlerTable::CAUGHT:
880 prediction = "CAUGHT"; 880 prediction = "CAUGHT";
881 break; 881 break;
882 case HandlerTable::PROMISE:
883 prediction = "PROMISE";
884 break;
885 case HandlerTable::DESUGARING: 882 case HandlerTable::DESUGARING:
886 prediction = "DESUGARING"; 883 prediction = "DESUGARING";
887 break; 884 break;
888 case HandlerTable::ASYNC_AWAIT: 885 case HandlerTable::ASYNC_AWAIT:
889 prediction = "ASYNC_AWAIT"; 886 prediction = "ASYNC_AWAIT";
890 break; 887 break;
888 case HandlerTable::PROMISE:
889 // Catch prediction resulting in promise rejections aren't
890 // parsed by the parser.
891 UNREACHABLE();
891 } 892 }
892 Print(" %s\n", prediction); 893 Print(" %s\n", prediction);
893 } 894 }
894 895
895 void AstPrinter::VisitDebuggerStatement(DebuggerStatement* node) { 896 void AstPrinter::VisitDebuggerStatement(DebuggerStatement* node) {
896 IndentedScope indent(this, "DEBUGGER", node->position()); 897 IndentedScope indent(this, "DEBUGGER", node->position());
897 } 898 }
898 899
899 900
900 void AstPrinter::VisitFunctionLiteral(FunctionLiteral* node) { 901 void AstPrinter::VisitFunctionLiteral(FunctionLiteral* node) {
(...skipping 307 matching lines...) Expand 10 before | Expand all | Expand 10 after
1208 1209
1209 void AstPrinter::VisitRewritableExpression(RewritableExpression* node) { 1210 void AstPrinter::VisitRewritableExpression(RewritableExpression* node) {
1210 Visit(node->expression()); 1211 Visit(node->expression());
1211 } 1212 }
1212 1213
1213 1214
1214 #endif // DEBUG 1215 #endif // DEBUG
1215 1216
1216 } // namespace internal 1217 } // namespace internal
1217 } // namespace v8 1218 } // namespace v8
OLDNEW
« no previous file with comments | « src/ast/ast.h ('k') | src/parsing/parser.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698