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

Unified Diff: src/compiler/pipeline.cc

Issue 1914473002: [turbofan] Allocate SourcePositionTable inside a Zone. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 8 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 | « no previous file | src/compiler/source-position.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/pipeline.cc
diff --git a/src/compiler/pipeline.cc b/src/compiler/pipeline.cc
index 74847a69a88af1e3dc022dc37a36d2c27f7596ac..575300ef78b22512b7caf0c020ab241056d2ede4 100644
--- a/src/compiler/pipeline.cc
+++ b/src/compiler/pipeline.cc
@@ -104,7 +104,8 @@ class PipelineData {
register_allocation_data_(nullptr) {
PhaseScope scope(pipeline_statistics, "init pipeline data");
graph_ = new (graph_zone_) Graph(graph_zone_);
- source_positions_.Reset(new SourcePositionTable(graph_));
+ source_positions_ = new (graph_zone_->New(sizeof(SourcePositionTable)))
+ SourcePositionTable(graph_);
simplified_ = new (graph_zone_) SimplifiedOperatorBuilder(graph_zone_);
machine_ = new (graph_zone_) MachineOperatorBuilder(
graph_zone_, MachineType::PointerRepresentation(),
@@ -128,7 +129,8 @@ class PipelineData {
graph_zone_scope_(zone_pool_),
graph_zone_(nullptr),
graph_(graph),
- source_positions_(new SourcePositionTable(graph_)),
+ source_positions_(new (info->zone()->New(sizeof(SourcePositionTable)))
+ SourcePositionTable(graph_)),
loop_assignment_(nullptr),
simplified_(nullptr),
machine_(nullptr),
@@ -195,9 +197,7 @@ class PipelineData {
Zone* graph_zone() const { return graph_zone_; }
Graph* graph() const { return graph_; }
- SourcePositionTable* source_positions() const {
- return source_positions_.get();
- }
+ SourcePositionTable* source_positions() const { return source_positions_; }
MachineOperatorBuilder* machine() const { return machine_; }
CommonOperatorBuilder* common() const { return common_; }
JSOperatorBuilder* javascript() const { return javascript_; }
@@ -238,13 +238,11 @@ class PipelineData {
}
void DeleteGraphZone() {
- // Destroy objects with destructors first.
- source_positions_.Reset(nullptr);
if (graph_zone_ == nullptr) return;
- // Destroy zone and clear pointers.
graph_zone_scope_.Destroy();
graph_zone_ = nullptr;
graph_ = nullptr;
+ source_positions_ = nullptr;
loop_assignment_ = nullptr;
type_hint_analysis_ = nullptr;
simplified_ = nullptr;
@@ -317,8 +315,7 @@ class PipelineData {
ZonePool::Scope graph_zone_scope_;
Zone* graph_zone_;
Graph* graph_;
- // TODO(dcarney): make this into a ZoneObject.
- base::SmartPointer<SourcePositionTable> source_positions_;
+ SourcePositionTable* source_positions_;
LoopAssignmentAnalysis* loop_assignment_;
TypeHintAnalysis* type_hint_analysis_ = nullptr;
SimplifiedOperatorBuilder* simplified_;
« no previous file with comments | « no previous file | src/compiler/source-position.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698