Index: src/ast/ast.cc |
diff --git a/src/ast/ast.cc b/src/ast/ast.cc |
index 69e7351a7d3d9cb1e7626058bd8f97e91ad5c193..30fcf9905379db9df15c6deea980cf651546b846 100644 |
--- a/src/ast/ast.cc |
+++ b/src/ast/ast.cc |
@@ -5,6 +5,8 @@ |
#include "src/ast/ast.h" |
#include <cmath> // For isfinite. |
+ |
+#include "src/ast/prettyprinter.h" |
#include "src/ast/scopes.h" |
#include "src/builtins.h" |
#include "src/code-stubs.h" |
@@ -32,6 +34,25 @@ AST_NODE_LIST(DECL_ACCEPT) |
// ---------------------------------------------------------------------------- |
// Implementation of other node functionality. |
+#ifdef DEBUG |
+ |
+void AstNode::PrintAst() { PrintAst(Isolate::Current()); } |
+ |
+ |
+void AstNode::PrintAst(Isolate* isolate) { |
+ AstPrinter::PrintOut(isolate, this); |
+} |
+ |
+ |
+void AstNode::PrettyPrint() { PrettyPrint(Isolate::Current()); } |
+ |
+ |
+void AstNode::PrettyPrint(Isolate* isolate) { |
+ PrettyPrinter::PrintOut(isolate, this); |
+} |
+ |
+#endif // DEBUG |
+ |
bool Expression::IsSmiLiteral() const { |
return IsLiteral() && AsLiteral()->value()->IsSmi(); |