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

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

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.h
diff --git a/src/compiler/pipeline-statistics.h b/src/compiler/pipeline-statistics.h
index c52c61cd85c387c145c09ea731367030b7108136..a9931ebed75f28fc282c1fb82c36aded6e0504a9 100644
--- a/src/compiler/pipeline-statistics.h
+++ b/src/compiler/pipeline-statistics.h
@@ -5,10 +5,10 @@
#ifndef V8_COMPILER_PIPELINE_STATISTICS_H_
#define V8_COMPILER_PIPELINE_STATISTICS_H_
+#include <memory>
#include <string>
#include "src/base/platform/elapsed-timer.h"
-#include "src/base/smart-pointers.h"
#include "src/compilation-statistics.h"
#include "src/compiler/zone-pool.h"
@@ -39,16 +39,19 @@ class PipelineStatistics : public Malloced {
void End(PipelineStatistics* pipeline_stats,
CompilationStatistics::BasicStats* diff);
- base::SmartPointer<ZonePool::StatsScope> scope_;
+ std::unique_ptr<ZonePool::StatsScope> scope_;
base::ElapsedTimer timer_;
size_t outer_zone_initial_size_;
size_t allocated_bytes_at_start_;
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(CommonStats);
};
- bool InPhaseKind() { return !phase_kind_stats_.scope_.is_empty(); }
+ bool InPhaseKind() { return !!phase_kind_stats_.scope_; }
Igor Sheludko 2016/07/25 09:58:10 !! is not necessary.
jochen (gone - plz use gerrit) 2016/07/25 10:34:38 the operator bool if unique_ptr is explicit, so ju
Igor Sheludko 2016/07/25 10:46:52 Ok, I see.
friend class PhaseScope;
- bool InPhase() { return !phase_stats_.scope_.is_empty(); }
+ bool InPhase() { return !!phase_stats_.scope_; }
Igor Sheludko 2016/07/25 09:58:10 same here
void BeginPhase(const char* name);
void EndPhase();

Powered by Google App Engine
This is Rietveld 408576698