OLD | NEW |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |