| OLD | NEW |
| 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 868 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 879 | 879 |
| 880 void AstPrinter::VisitTryFinallyStatement(TryFinallyStatement* node) { | 880 void AstPrinter::VisitTryFinallyStatement(TryFinallyStatement* node) { |
| 881 IndentedScope indent(this, "TRY FINALLY", node->position()); | 881 IndentedScope indent(this, "TRY FINALLY", node->position()); |
| 882 PrintTryStatement(node); | 882 PrintTryStatement(node); |
| 883 PrintIndentedVisit("FINALLY", node->finally_block()); | 883 PrintIndentedVisit("FINALLY", node->finally_block()); |
| 884 } | 884 } |
| 885 | 885 |
| 886 void AstPrinter::PrintTryStatement(TryStatement* node) { | 886 void AstPrinter::PrintTryStatement(TryStatement* node) { |
| 887 PrintIndentedVisit("TRY", node->try_block()); | 887 PrintIndentedVisit("TRY", node->try_block()); |
| 888 PrintIndented("CATCH PREDICTION"); | 888 PrintIndented("CATCH PREDICTION"); |
| 889 const char* prediction; | 889 const char* prediction = ""; |
| 890 switch (node->catch_prediction()) { | 890 switch (node->catch_prediction()) { |
| 891 case HandlerTable::UNCAUGHT: | 891 case HandlerTable::UNCAUGHT: |
| 892 prediction = "UNCAUGHT"; | 892 prediction = "UNCAUGHT"; |
| 893 break; | 893 break; |
| 894 case HandlerTable::CAUGHT: | 894 case HandlerTable::CAUGHT: |
| 895 prediction = "CAUGHT"; | 895 prediction = "CAUGHT"; |
| 896 break; | 896 break; |
| 897 case HandlerTable::PROMISE: | 897 case HandlerTable::PROMISE: |
| 898 prediction = "PROMISE"; | 898 prediction = "PROMISE"; |
| 899 break; | 899 break; |
| (...skipping 287 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1187 | 1187 |
| 1188 void AstPrinter::VisitRewritableExpression(RewritableExpression* node) { | 1188 void AstPrinter::VisitRewritableExpression(RewritableExpression* node) { |
| 1189 Visit(node->expression()); | 1189 Visit(node->expression()); |
| 1190 } | 1190 } |
| 1191 | 1191 |
| 1192 | 1192 |
| 1193 #endif // DEBUG | 1193 #endif // DEBUG |
| 1194 | 1194 |
| 1195 } // namespace internal | 1195 } // namespace internal |
| 1196 } // namespace v8 | 1196 } // namespace v8 |
| OLD | NEW |