Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(89)

Unified Diff: src/parsing/parse-info.cc

Issue 2683733002: Revert of Reland: [Parse] ParseInfo owns the parsing Zone. (Closed)
Patch Set: Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/parsing/parse-info.h ('k') | src/runtime/runtime-internal.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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();
« no previous file with comments | « src/parsing/parse-info.h ('k') | src/runtime/runtime-internal.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698