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

Unified Diff: src/compiler/graph-visualizer.cc

Issue 2173403002: Replace SmartArrayPointer<T> with unique_ptr<T[]> (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: updates 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
« no previous file with comments | « src/compiler/graph-visualizer.h ('k') | src/compiler/pipeline.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/graph-visualizer.cc
diff --git a/src/compiler/graph-visualizer.cc b/src/compiler/graph-visualizer.cc
index 7eb4c84211c0af828c130546844354dee6f1020d..53089040ab3ea607e48206df27872b17d4d129e3 100644
--- a/src/compiler/graph-visualizer.cc
+++ b/src/compiler/graph-visualizer.cc
@@ -4,6 +4,7 @@
#include "src/compiler/graph-visualizer.h"
+#include <memory>
#include <sstream>
#include <string>
@@ -25,10 +26,11 @@ namespace v8 {
namespace internal {
namespace compiler {
-base::SmartArrayPointer<const char> GetVisualizerLogFileName(
- CompilationInfo* info, const char* phase, const char* suffix) {
+std::unique_ptr<char[]> GetVisualizerLogFileName(CompilationInfo* info,
+ const char* phase,
+ const char* suffix) {
EmbeddedVector<char, 256> filename(0);
- base::SmartArrayPointer<char> debug_name = info->GetDebugName();
+ std::unique_ptr<char[]> debug_name = info->GetDebugName();
if (strlen(debug_name.get()) > 0) {
SNPrintF(filename, "turbo-%s", debug_name.get());
} else if (info->has_shared_info()) {
@@ -69,7 +71,7 @@ base::SmartArrayPointer<const char> GetVisualizerLogFileName(
char* buffer = new char[full_filename.length() + 1];
memcpy(buffer, full_filename.start(), full_filename.length());
buffer[full_filename.length()] = '\0';
- return base::SmartArrayPointer<const char>(buffer);
+ return std::unique_ptr<char[]>(buffer);
}
@@ -328,7 +330,7 @@ void GraphC1Visualizer::PrintIntProperty(const char* name, int value) {
void GraphC1Visualizer::PrintCompilation(const CompilationInfo* info) {
Tag tag(this, "compilation");
- base::SmartArrayPointer<char> name = info->GetDebugName();
+ std::unique_ptr<char[]> name = info->GetDebugName();
if (info->IsOptimizing()) {
PrintStringProperty("name", name.get());
PrintIndent();
« no previous file with comments | « src/compiler/graph-visualizer.h ('k') | src/compiler/pipeline.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698