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

Unified Diff: src/compiler/pipeline-statistics.cc

Issue 2175233003: Replace SmartPointer<T> with unique_ptr<T> (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@smart-array
Patch Set: Created 4 years, 5 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
Index: src/compiler/pipeline-statistics.cc
diff --git a/src/compiler/pipeline-statistics.cc b/src/compiler/pipeline-statistics.cc
index 3d4d80a1ba1523f308208ad2aeb0ab33e031579e..5b97abe5eb82b816c76a370f1518dd605aea5f8b 100644
--- a/src/compiler/pipeline-statistics.cc
+++ b/src/compiler/pipeline-statistics.cc
@@ -14,8 +14,8 @@ namespace compiler {
void PipelineStatistics::CommonStats::Begin(
PipelineStatistics* pipeline_stats) {
- DCHECK(scope_.is_empty());
- scope_.Reset(new ZonePool::StatsScope(pipeline_stats->zone_pool_));
+ DCHECK(!scope_);
+ scope_.reset(new ZonePool::StatsScope(pipeline_stats->zone_pool_));
timer_.Start();
outer_zone_initial_size_ = pipeline_stats->OuterZoneSize();
allocated_bytes_at_start_ =
@@ -28,7 +28,7 @@ void PipelineStatistics::CommonStats::Begin(
void PipelineStatistics::CommonStats::End(
PipelineStatistics* pipeline_stats,
CompilationStatistics::BasicStats* diff) {
- DCHECK(!scope_.is_empty());
+ DCHECK(scope_);
diff->function_name_ = pipeline_stats->function_name_;
diff->delta_ = timer_.Elapsed();
size_t outer_zone_diff =
@@ -38,7 +38,7 @@ void PipelineStatistics::CommonStats::End(
diff->max_allocated_bytes_ + allocated_bytes_at_start_;
diff->total_allocated_bytes_ =
outer_zone_diff + scope_->GetTotalAllocatedBytes();
- scope_.Reset(nullptr);
+ scope_.reset();
timer_.Stop();
}

Powered by Google App Engine
This is Rietveld 408576698