Index: src/parsing/parse-info.cc |
diff --git a/src/parsing/parse-info.cc b/src/parsing/parse-info.cc |
index 487c36702c9743ddffef33760c1e381b0e3867a3..8bffb33573b75eebdddfbbe6f1aeb50907620b4e 100644 |
--- a/src/parsing/parse-info.cc |
+++ b/src/parsing/parse-info.cc |
@@ -9,13 +9,12 @@ |
#include "src/heap/heap-inl.h" |
#include "src/objects-inl.h" |
#include "src/objects/scope-info.h" |
-#include "src/zone/zone.h" |
namespace v8 { |
namespace internal { |
-ParseInfo::ParseInfo(AccountingAllocator* zone_allocator) |
- : zone_(std::make_shared<Zone>(zone_allocator, ZONE_NAME)), |
+ParseInfo::ParseInfo(Zone* zone) |
+ : zone_(zone), |
flags_(0), |
source_stream_(nullptr), |
source_stream_encoding_(ScriptCompiler::StreamedSource::ONE_BYTE), |
@@ -38,8 +37,8 @@ |
function_name_(nullptr), |
literal_(nullptr) {} |
-ParseInfo::ParseInfo(Handle<SharedFunctionInfo> shared) |
- : ParseInfo(shared->GetIsolate()->allocator()) { |
+ParseInfo::ParseInfo(Zone* zone, Handle<SharedFunctionInfo> shared) |
+ : ParseInfo(zone) { |
isolate_ = shared->GetIsolate(); |
set_toplevel(shared->is_toplevel()); |
@@ -69,14 +68,7 @@ |
} |
} |
-ParseInfo::ParseInfo(Handle<SharedFunctionInfo> shared, |
- std::shared_ptr<Zone> zone) |
- : ParseInfo(shared) { |
- zone_.swap(zone); |
-} |
- |
-ParseInfo::ParseInfo(Handle<Script> script) |
- : ParseInfo(script->GetIsolate()->allocator()) { |
+ParseInfo::ParseInfo(Zone* zone, Handle<Script> script) : ParseInfo(zone) { |
isolate_ = script->GetIsolate(); |
set_allow_lazy_parsing(); |