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 <stdarg.h> | 5 #include <stdarg.h> |
6 | 6 |
7 #include "src/v8.h" | 7 #include "src/v8.h" |
8 | 8 |
9 #include "src/ast-value-factory.h" | 9 #include "src/ast-value-factory.h" |
10 #include "src/base/platform/platform.h" | 10 #include "src/base/platform/platform.h" |
(...skipping 429 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
440 Visit(node->right()); | 440 Visit(node->right()); |
441 Print(")"); | 441 Print(")"); |
442 } | 442 } |
443 | 443 |
444 | 444 |
445 void PrettyPrinter::VisitThisFunction(ThisFunction* node) { | 445 void PrettyPrinter::VisitThisFunction(ThisFunction* node) { |
446 Print("<this-function>"); | 446 Print("<this-function>"); |
447 } | 447 } |
448 | 448 |
449 | 449 |
| 450 void PrettyPrinter::VisitSuperReference(SuperReference* node) { |
| 451 Print("<super-reference>"); |
| 452 } |
| 453 |
| 454 |
450 const char* PrettyPrinter::Print(AstNode* node) { | 455 const char* PrettyPrinter::Print(AstNode* node) { |
451 Init(); | 456 Init(); |
452 Visit(node); | 457 Visit(node); |
453 return output_; | 458 return output_; |
454 } | 459 } |
455 | 460 |
456 | 461 |
457 const char* PrettyPrinter::PrintExpression(FunctionLiteral* program) { | 462 const char* PrettyPrinter::PrintExpression(FunctionLiteral* program) { |
458 Init(); | 463 Init(); |
459 ExpressionStatement* statement = | 464 ExpressionStatement* statement = |
(...skipping 678 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1138 IndentedScope indent(this, Token::Name(node->op())); | 1143 IndentedScope indent(this, Token::Name(node->op())); |
1139 Visit(node->left()); | 1144 Visit(node->left()); |
1140 Visit(node->right()); | 1145 Visit(node->right()); |
1141 } | 1146 } |
1142 | 1147 |
1143 | 1148 |
1144 void AstPrinter::VisitThisFunction(ThisFunction* node) { | 1149 void AstPrinter::VisitThisFunction(ThisFunction* node) { |
1145 IndentedScope indent(this, "THIS-FUNCTION"); | 1150 IndentedScope indent(this, "THIS-FUNCTION"); |
1146 } | 1151 } |
1147 | 1152 |
| 1153 |
| 1154 void AstPrinter::VisitSuperReference(SuperReference* node) { |
| 1155 IndentedScope indent(this, "SUPER-REFERENCE"); |
| 1156 } |
| 1157 |
1148 #endif // DEBUG | 1158 #endif // DEBUG |
1149 | 1159 |
1150 } } // namespace v8::internal | 1160 } } // namespace v8::internal |
OLD | NEW |