| 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 359 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 370 void CallPrinter::VisitEmptyParentheses(EmptyParentheses* node) { | 370 void CallPrinter::VisitEmptyParentheses(EmptyParentheses* node) { | 
| 371   UNREACHABLE(); | 371   UNREACHABLE(); | 
| 372 } | 372 } | 
| 373 | 373 | 
| 374 void CallPrinter::VisitGetIterator(GetIterator* node) { | 374 void CallPrinter::VisitGetIterator(GetIterator* node) { | 
| 375   Print("GetIterator("); | 375   Print("GetIterator("); | 
| 376   Find(node->iterable(), true); | 376   Find(node->iterable(), true); | 
| 377   Print(")"); | 377   Print(")"); | 
| 378 } | 378 } | 
| 379 | 379 | 
|  | 380 void CallPrinter::VisitInternalVariable(InternalVariable* node) { | 
|  | 381   const char* name = node->name(); | 
|  | 382   Print(name); | 
|  | 383 } | 
|  | 384 | 
| 380 void CallPrinter::VisitThisFunction(ThisFunction* node) {} | 385 void CallPrinter::VisitThisFunction(ThisFunction* node) {} | 
| 381 | 386 | 
| 382 | 387 | 
| 383 void CallPrinter::VisitSuperPropertyReference(SuperPropertyReference* node) {} | 388 void CallPrinter::VisitSuperPropertyReference(SuperPropertyReference* node) {} | 
| 384 | 389 | 
| 385 | 390 | 
| 386 void CallPrinter::VisitSuperCallReference(SuperCallReference* node) { | 391 void CallPrinter::VisitSuperCallReference(SuperCallReference* node) { | 
| 387   Print("super"); | 392   Print("super"); | 
| 388 } | 393 } | 
| 389 | 394 | 
| (...skipping 806 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 1196 | 1201 | 
| 1197 void AstPrinter::VisitEmptyParentheses(EmptyParentheses* node) { | 1202 void AstPrinter::VisitEmptyParentheses(EmptyParentheses* node) { | 
| 1198   IndentedScope indent(this, "()", node->position()); | 1203   IndentedScope indent(this, "()", node->position()); | 
| 1199 } | 1204 } | 
| 1200 | 1205 | 
| 1201 void AstPrinter::VisitGetIterator(GetIterator* node) { | 1206 void AstPrinter::VisitGetIterator(GetIterator* node) { | 
| 1202   IndentedScope indent(this, "GET-ITERATOR", node->position()); | 1207   IndentedScope indent(this, "GET-ITERATOR", node->position()); | 
| 1203   Visit(node->iterable()); | 1208   Visit(node->iterable()); | 
| 1204 } | 1209 } | 
| 1205 | 1210 | 
|  | 1211 void AstPrinter::VisitInternalVariable(InternalVariable* node) { | 
|  | 1212   Print("%s", node->name()); | 
|  | 1213 } | 
|  | 1214 | 
| 1206 void AstPrinter::VisitThisFunction(ThisFunction* node) { | 1215 void AstPrinter::VisitThisFunction(ThisFunction* node) { | 
| 1207   IndentedScope indent(this, "THIS-FUNCTION", node->position()); | 1216   IndentedScope indent(this, "THIS-FUNCTION", node->position()); | 
| 1208 } | 1217 } | 
| 1209 | 1218 | 
| 1210 | 1219 | 
| 1211 void AstPrinter::VisitSuperPropertyReference(SuperPropertyReference* node) { | 1220 void AstPrinter::VisitSuperPropertyReference(SuperPropertyReference* node) { | 
| 1212   IndentedScope indent(this, "SUPER-PROPERTY-REFERENCE", node->position()); | 1221   IndentedScope indent(this, "SUPER-PROPERTY-REFERENCE", node->position()); | 
| 1213 } | 1222 } | 
| 1214 | 1223 | 
| 1215 | 1224 | 
| 1216 void AstPrinter::VisitSuperCallReference(SuperCallReference* node) { | 1225 void AstPrinter::VisitSuperCallReference(SuperCallReference* node) { | 
| 1217   IndentedScope indent(this, "SUPER-CALL-REFERENCE", node->position()); | 1226   IndentedScope indent(this, "SUPER-CALL-REFERENCE", node->position()); | 
| 1218 } | 1227 } | 
| 1219 | 1228 | 
| 1220 | 1229 | 
| 1221 void AstPrinter::VisitRewritableExpression(RewritableExpression* node) { | 1230 void AstPrinter::VisitRewritableExpression(RewritableExpression* node) { | 
| 1222   Visit(node->expression()); | 1231   Visit(node->expression()); | 
| 1223 } | 1232 } | 
| 1224 | 1233 | 
| 1225 | 1234 | 
| 1226 #endif  // DEBUG | 1235 #endif  // DEBUG | 
| 1227 | 1236 | 
| 1228 }  // namespace internal | 1237 }  // namespace internal | 
| 1229 }  // namespace v8 | 1238 }  // namespace v8 | 
| OLD | NEW | 
|---|