Index: src/ast/ast-traversal-visitor.h |
diff --git a/src/ast/ast-traversal-visitor.h b/src/ast/ast-traversal-visitor.h |
index 599c6d9c5c2945a7cc6b9e06ae5856386d340d6a..0f2976c4ca4f9e6b9b290ad761620c4881609b74 100644 |
--- a/src/ast/ast-traversal-visitor.h |
+++ b/src/ast/ast-traversal-visitor.h |
@@ -28,6 +28,7 @@ |
template <class Subclass> |
class AstTraversalVisitor : public AstVisitor<Subclass> { |
public: |
+ explicit AstTraversalVisitor(Isolate* isolate, AstNode* root = nullptr); |
explicit AstTraversalVisitor(uintptr_t stack_limit, AstNode* root = nullptr); |
void Run() { |
@@ -87,6 +88,12 @@ |
if (HasStackOverflow()) return; \ |
} while (false) |
+template <class Subclass> |
+AstTraversalVisitor<Subclass>::AstTraversalVisitor(Isolate* isolate, |
+ AstNode* root) |
+ : root_(root), depth_(0) { |
+ InitializeAstVisitor(isolate); |
+} |
template <class Subclass> |
AstTraversalVisitor<Subclass>::AstTraversalVisitor(uintptr_t stack_limit, |