| 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 1124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1135 | 1135 |
| 1136 void AstPrinter::VisitCallNew(CallNew* node) { | 1136 void AstPrinter::VisitCallNew(CallNew* node) { |
| 1137 IndentedScope indent(this, "CALL NEW", node->position()); | 1137 IndentedScope indent(this, "CALL NEW", node->position()); |
| 1138 Visit(node->expression()); | 1138 Visit(node->expression()); |
| 1139 PrintArguments(node->arguments()); | 1139 PrintArguments(node->arguments()); |
| 1140 } | 1140 } |
| 1141 | 1141 |
| 1142 | 1142 |
| 1143 void AstPrinter::VisitCallRuntime(CallRuntime* node) { | 1143 void AstPrinter::VisitCallRuntime(CallRuntime* node) { |
| 1144 EmbeddedVector<char, 128> buf; | 1144 EmbeddedVector<char, 128> buf; |
| 1145 if (node->is_jsruntime()) { | 1145 SNPrintF(buf, "CALL RUNTIME %s", node->debug_name()); |
| 1146 SNPrintF(buf, "CALL RUNTIME %s code = %p", node->debug_name(), | |
| 1147 isolate_->context()->get(node->context_index())); | |
| 1148 } else { | |
| 1149 SNPrintF(buf, "CALL RUNTIME %s", node->debug_name()); | |
| 1150 } | |
| 1151 | |
| 1152 IndentedScope indent(this, buf.start(), node->position()); | 1146 IndentedScope indent(this, buf.start(), node->position()); |
| 1153 PrintArguments(node->arguments()); | 1147 PrintArguments(node->arguments()); |
| 1154 } | 1148 } |
| 1155 | 1149 |
| 1156 | 1150 |
| 1157 void AstPrinter::VisitUnaryOperation(UnaryOperation* node) { | 1151 void AstPrinter::VisitUnaryOperation(UnaryOperation* node) { |
| 1158 IndentedScope indent(this, Token::Name(node->op()), node->position()); | 1152 IndentedScope indent(this, Token::Name(node->op()), node->position()); |
| 1159 Visit(node->expression()); | 1153 Visit(node->expression()); |
| 1160 } | 1154 } |
| 1161 | 1155 |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1215 | 1209 |
| 1216 void AstPrinter::VisitRewritableExpression(RewritableExpression* node) { | 1210 void AstPrinter::VisitRewritableExpression(RewritableExpression* node) { |
| 1217 Visit(node->expression()); | 1211 Visit(node->expression()); |
| 1218 } | 1212 } |
| 1219 | 1213 |
| 1220 | 1214 |
| 1221 #endif // DEBUG | 1215 #endif // DEBUG |
| 1222 | 1216 |
| 1223 } // namespace internal | 1217 } // namespace internal |
| 1224 } // namespace v8 | 1218 } // namespace v8 |
| OLD | NEW |