| 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/disassembler.h" | 5 #include "src/disassembler.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/debug.h" | 9 #include "src/debug/debug.h" |
| 10 #include "src/deoptimizer.h" | 10 #include "src/deoptimizer.h" |
| (...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 185 StringStream accumulator(&allocator); | 185 StringStream accumulator(&allocator); |
| 186 relocinfo.target_object()->ShortPrint(&accumulator); | 186 relocinfo.target_object()->ShortPrint(&accumulator); |
| 187 base::SmartArrayPointer<const char> obj_name = accumulator.ToCString(); | 187 base::SmartArrayPointer<const char> obj_name = accumulator.ToCString(); |
| 188 out.AddFormatted(" ;; object: %s", obj_name.get()); | 188 out.AddFormatted(" ;; object: %s", obj_name.get()); |
| 189 } else if (rmode == RelocInfo::EXTERNAL_REFERENCE) { | 189 } else if (rmode == RelocInfo::EXTERNAL_REFERENCE) { |
| 190 const char* reference_name = ref_encoder.NameOfAddress( | 190 const char* reference_name = ref_encoder.NameOfAddress( |
| 191 isolate, relocinfo.target_external_reference()); | 191 isolate, relocinfo.target_external_reference()); |
| 192 out.AddFormatted(" ;; external reference (%s)", reference_name); | 192 out.AddFormatted(" ;; external reference (%s)", reference_name); |
| 193 } else if (RelocInfo::IsCodeTarget(rmode)) { | 193 } else if (RelocInfo::IsCodeTarget(rmode)) { |
| 194 out.AddFormatted(" ;; code:"); | 194 out.AddFormatted(" ;; code:"); |
| 195 if (rmode == RelocInfo::CONSTRUCT_CALL) { | |
| 196 out.AddFormatted(" constructor,"); | |
| 197 } | |
| 198 Code* code = Code::GetCodeFromTargetAddress(relocinfo.target_address()); | 195 Code* code = Code::GetCodeFromTargetAddress(relocinfo.target_address()); |
| 199 Code::Kind kind = code->kind(); | 196 Code::Kind kind = code->kind(); |
| 200 if (code->is_inline_cache_stub()) { | 197 if (code->is_inline_cache_stub()) { |
| 201 if (kind == Code::LOAD_IC && | 198 if (kind == Code::LOAD_IC && |
| 202 LoadICState::GetTypeofMode(code->extra_ic_state()) == | 199 LoadICState::GetTypeofMode(code->extra_ic_state()) == |
| 203 NOT_INSIDE_TYPEOF) { | 200 NOT_INSIDE_TYPEOF) { |
| 204 out.AddFormatted(" contextual,"); | 201 out.AddFormatted(" contextual,"); |
| 205 } | 202 } |
| 206 InlineCacheState ic_state = code->ic_state(); | 203 InlineCacheState ic_state = code->ic_state(); |
| 207 out.AddFormatted(" %s, %s", Code::Kind2String(kind), | 204 out.AddFormatted(" %s, %s", Code::Kind2String(kind), |
| (...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 284 | 281 |
| 285 int Disassembler::Decode(Isolate* isolate, std::ostream* os, byte* begin, | 282 int Disassembler::Decode(Isolate* isolate, std::ostream* os, byte* begin, |
| 286 byte* end, Code* code) { | 283 byte* end, Code* code) { |
| 287 return 0; | 284 return 0; |
| 288 } | 285 } |
| 289 | 286 |
| 290 #endif // ENABLE_DISASSEMBLER | 287 #endif // ENABLE_DISASSEMBLER |
| 291 | 288 |
| 292 } // namespace internal | 289 } // namespace internal |
| 293 } // namespace v8 | 290 } // namespace v8 |
| OLD | NEW |