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

Side by Side Diff: src/disassembler.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 unified diff | Download patch
« no previous file with comments | « src/deoptimizer.cc ('k') | src/frames.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/disassembler.h" 5 #include "src/disassembler.h"
6 6
7 #include <memory>
8
7 #include "src/code-stubs.h" 9 #include "src/code-stubs.h"
8 #include "src/codegen.h" 10 #include "src/codegen.h"
9 #include "src/debug/debug.h" 11 #include "src/debug/debug.h"
10 #include "src/deoptimizer.h" 12 #include "src/deoptimizer.h"
11 #include "src/disasm.h" 13 #include "src/disasm.h"
12 #include "src/ic/ic.h" 14 #include "src/ic/ic.h"
13 #include "src/macro-assembler.h" 15 #include "src/macro-assembler.h"
14 #include "src/snapshot/serializer-common.h" 16 #include "src/snapshot/serializer-common.h"
15 #include "src/string-stream.h" 17 #include "src/string-stream.h"
16 18
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after
178 static_cast<DeoptimizeReason>(relocinfo.data()); 180 static_cast<DeoptimizeReason>(relocinfo.data());
179 out.AddFormatted(" ;; debug: deopt reason '%s'", 181 out.AddFormatted(" ;; debug: deopt reason '%s'",
180 DeoptimizeReasonToString(reason)); 182 DeoptimizeReasonToString(reason));
181 } else if (rmode == RelocInfo::DEOPT_ID) { 183 } else if (rmode == RelocInfo::DEOPT_ID) {
182 out.AddFormatted(" ;; debug: deopt index %d", 184 out.AddFormatted(" ;; debug: deopt index %d",
183 static_cast<int>(relocinfo.data())); 185 static_cast<int>(relocinfo.data()));
184 } else if (rmode == RelocInfo::EMBEDDED_OBJECT) { 186 } else if (rmode == RelocInfo::EMBEDDED_OBJECT) {
185 HeapStringAllocator allocator; 187 HeapStringAllocator allocator;
186 StringStream accumulator(&allocator); 188 StringStream accumulator(&allocator);
187 relocinfo.target_object()->ShortPrint(&accumulator); 189 relocinfo.target_object()->ShortPrint(&accumulator);
188 base::SmartArrayPointer<const char> obj_name = accumulator.ToCString(); 190 std::unique_ptr<char[]> obj_name = accumulator.ToCString();
189 out.AddFormatted(" ;; object: %s", obj_name.get()); 191 out.AddFormatted(" ;; object: %s", obj_name.get());
190 } else if (rmode == RelocInfo::EXTERNAL_REFERENCE) { 192 } else if (rmode == RelocInfo::EXTERNAL_REFERENCE) {
191 const char* reference_name = ref_encoder.NameOfAddress( 193 const char* reference_name = ref_encoder.NameOfAddress(
192 isolate, relocinfo.target_external_reference()); 194 isolate, relocinfo.target_external_reference());
193 out.AddFormatted(" ;; external reference (%s)", reference_name); 195 out.AddFormatted(" ;; external reference (%s)", reference_name);
194 } else if (RelocInfo::IsCodeTarget(rmode)) { 196 } else if (RelocInfo::IsCodeTarget(rmode)) {
195 out.AddFormatted(" ;; code:"); 197 out.AddFormatted(" ;; code:");
196 Code* code = Code::GetCodeFromTargetAddress(relocinfo.target_address()); 198 Code* code = Code::GetCodeFromTargetAddress(relocinfo.target_address());
197 Code::Kind kind = code->kind(); 199 Code::Kind kind = code->kind();
198 if (code->is_inline_cache_stub()) { 200 if (code->is_inline_cache_stub()) {
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
280 282
281 int Disassembler::Decode(Isolate* isolate, std::ostream* os, byte* begin, 283 int Disassembler::Decode(Isolate* isolate, std::ostream* os, byte* begin,
282 byte* end, Code* code) { 284 byte* end, Code* code) {
283 return 0; 285 return 0;
284 } 286 }
285 287
286 #endif // ENABLE_DISASSEMBLER 288 #endif // ENABLE_DISASSEMBLER
287 289
288 } // namespace internal 290 } // namespace internal
289 } // namespace v8 291 } // namespace v8
OLDNEW
« no previous file with comments | « src/deoptimizer.cc ('k') | src/frames.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698