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

Side by Side Diff: src/disassembler.cc

Issue 976623002: Serializer: correctly deal with internal references. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: argh I keep making mistakes. Created 5 years, 9 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/compiler.cc ('k') | src/ia32/assembler-ia32-inl.h » ('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/v8.h" 5 #include "src/v8.h"
6 6
7 #include "src/code-stubs.h" 7 #include "src/code-stubs.h"
8 #include "src/codegen.h" 8 #include "src/codegen.h"
9 #include "src/debug.h" 9 #include "src/debug.h"
10 #include "src/deoptimizer.h" 10 #include "src/deoptimizer.h"
(...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after
179 out.AddFormatted(" ;; debug: deopt reason '%s'", 179 out.AddFormatted(" ;; debug: deopt reason '%s'",
180 Deoptimizer::GetDeoptReason(reason)); 180 Deoptimizer::GetDeoptReason(reason));
181 } else if (rmode == RelocInfo::EMBEDDED_OBJECT) { 181 } else if (rmode == RelocInfo::EMBEDDED_OBJECT) {
182 HeapStringAllocator allocator; 182 HeapStringAllocator allocator;
183 StringStream accumulator(&allocator); 183 StringStream accumulator(&allocator);
184 relocinfo.target_object()->ShortPrint(&accumulator); 184 relocinfo.target_object()->ShortPrint(&accumulator);
185 SmartArrayPointer<const char> obj_name = accumulator.ToCString(); 185 SmartArrayPointer<const char> obj_name = accumulator.ToCString();
186 out.AddFormatted(" ;; object: %s", obj_name.get()); 186 out.AddFormatted(" ;; object: %s", obj_name.get());
187 } else if (rmode == RelocInfo::EXTERNAL_REFERENCE) { 187 } else if (rmode == RelocInfo::EXTERNAL_REFERENCE) {
188 const char* reference_name = 188 const char* reference_name =
189 ref_encoder.NameOfAddress(relocinfo.target_reference()); 189 ref_encoder.NameOfAddress(relocinfo.target_external_reference());
190 out.AddFormatted(" ;; external reference (%s)", reference_name); 190 out.AddFormatted(" ;; external reference (%s)", reference_name);
191 } else if (RelocInfo::IsCodeTarget(rmode)) { 191 } else if (RelocInfo::IsCodeTarget(rmode)) {
192 out.AddFormatted(" ;; code:"); 192 out.AddFormatted(" ;; code:");
193 if (rmode == RelocInfo::CONSTRUCT_CALL) { 193 if (rmode == RelocInfo::CONSTRUCT_CALL) {
194 out.AddFormatted(" constructor,"); 194 out.AddFormatted(" constructor,");
195 } 195 }
196 Code* code = Code::GetCodeFromTargetAddress(relocinfo.target_address()); 196 Code* code = Code::GetCodeFromTargetAddress(relocinfo.target_address());
197 Code::Kind kind = code->kind(); 197 Code::Kind kind = code->kind();
198 if (code->is_inline_cache_stub()) { 198 if (code->is_inline_cache_stub()) {
199 if (kind == Code::LOAD_IC && 199 if (kind == Code::LOAD_IC &&
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
289 #else // ENABLE_DISASSEMBLER 289 #else // ENABLE_DISASSEMBLER
290 290
291 int Disassembler::Decode(Isolate* isolate, std::ostream* os, byte* begin, 291 int Disassembler::Decode(Isolate* isolate, std::ostream* os, byte* begin,
292 byte* end, Code* code) { 292 byte* end, Code* code) {
293 return 0; 293 return 0;
294 } 294 }
295 295
296 #endif // ENABLE_DISASSEMBLER 296 #endif // ENABLE_DISASSEMBLER
297 297
298 } } // namespace v8::internal 298 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/compiler.cc ('k') | src/ia32/assembler-ia32-inl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698