diff options
Diffstat (limited to 'deps/v8/src/ast/prettyprinter.h')
-rw-r--r-- | deps/v8/src/ast/prettyprinter.h | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/deps/v8/src/ast/prettyprinter.h b/deps/v8/src/ast/prettyprinter.h index cc29052c2d9..71019fe264f 100644 --- a/deps/v8/src/ast/prettyprinter.h +++ b/deps/v8/src/ast/prettyprinter.h @@ -8,14 +8,16 @@ #include "src/allocation.h" #include "src/ast/ast.h" #include "src/base/compiler-specific.h" -#include "src/string-builder.h" namespace v8 { namespace internal { +class IncrementalStringBuilder; // to avoid including string-builder-inl.h + class CallPrinter final : public AstVisitor<CallPrinter> { public: explicit CallPrinter(Isolate* isolate, bool is_user_js); + ~CallPrinter(); // The following routine prints the node with position |position| into a // string. @@ -42,7 +44,8 @@ class CallPrinter final : public AstVisitor<CallPrinter> { Isolate* isolate_; int num_prints_; - IncrementalStringBuilder builder_; + // Allocate the builder on the heap simply because it's forward declared. + std::unique_ptr<IncrementalStringBuilder> builder_; int position_; // position of ast node to print bool found_; bool done_; @@ -107,7 +110,8 @@ class AstPrinter final : public AstVisitor<AstPrinter> { bool quote); void PrintLiteralWithModeIndented(const char* info, Variable* var, const AstRawString* value); - void PrintLabelsIndented(ZonePtrList<const AstRawString>* labels); + void PrintLabelsIndented(ZonePtrList<const AstRawString>* labels, + const char* prefix = ""); void PrintObjectProperties(ZonePtrList<ObjectLiteral::Property>* properties); void PrintClassProperties(ZonePtrList<ClassLiteral::Property>* properties); |