| 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 <memory> | 7 #include <memory> |
| 8 | 8 |
| 9 #include "src/code-stubs.h" | 9 #include "src/code-stubs.h" |
| 10 #include "src/codegen.h" | 10 #include "src/codegen.h" |
| (...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 194 out.AddFormatted(" ;; object: %s", obj_name.get()); | 194 out.AddFormatted(" ;; object: %s", obj_name.get()); |
| 195 } else if (rmode == RelocInfo::EXTERNAL_REFERENCE) { | 195 } else if (rmode == RelocInfo::EXTERNAL_REFERENCE) { |
| 196 const char* reference_name = ref_encoder.NameOfAddress( | 196 const char* reference_name = ref_encoder.NameOfAddress( |
| 197 isolate, relocinfo.target_external_reference()); | 197 isolate, relocinfo.target_external_reference()); |
| 198 out.AddFormatted(" ;; external reference (%s)", reference_name); | 198 out.AddFormatted(" ;; external reference (%s)", reference_name); |
| 199 } else if (RelocInfo::IsCodeTarget(rmode)) { | 199 } else if (RelocInfo::IsCodeTarget(rmode)) { |
| 200 out.AddFormatted(" ;; code:"); | 200 out.AddFormatted(" ;; code:"); |
| 201 Code* code = Code::GetCodeFromTargetAddress(relocinfo.target_address()); | 201 Code* code = Code::GetCodeFromTargetAddress(relocinfo.target_address()); |
| 202 Code::Kind kind = code->kind(); | 202 Code::Kind kind = code->kind(); |
| 203 if (code->is_inline_cache_stub()) { | 203 if (code->is_inline_cache_stub()) { |
| 204 if (kind == Code::LOAD_GLOBAL_IC && | |
| 205 LoadGlobalICState::GetTypeofMode(code->extra_ic_state()) == | |
| 206 INSIDE_TYPEOF) { | |
| 207 out.AddFormatted(" inside typeof,"); | |
| 208 } | |
| 209 out.AddFormatted(" %s", Code::Kind2String(kind)); | 204 out.AddFormatted(" %s", Code::Kind2String(kind)); |
| 210 if (!IC::ICUseVector(kind)) { | 205 if (!IC::ICUseVector(kind)) { |
| 211 InlineCacheState ic_state = IC::StateFromCode(code); | 206 InlineCacheState ic_state = IC::StateFromCode(code); |
| 212 out.AddFormatted(" %s", Code::ICState2String(ic_state)); | 207 out.AddFormatted(" %s", Code::ICState2String(ic_state)); |
| 213 } | 208 } |
| 214 } else if (kind == Code::STUB || kind == Code::HANDLER) { | 209 } else if (kind == Code::STUB || kind == Code::HANDLER) { |
| 215 // Get the STUB key and extract major and minor key. | 210 // Get the STUB key and extract major and minor key. |
| 216 uint32_t key = code->stub_key(); | 211 uint32_t key = code->stub_key(); |
| 217 uint32_t minor_key = CodeStub::MinorKeyFromKey(key); | 212 uint32_t minor_key = CodeStub::MinorKeyFromKey(key); |
| 218 CodeStub::Major major_key = CodeStub::GetMajorKey(code); | 213 CodeStub::Major major_key = CodeStub::GetMajorKey(code); |
| (...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 285 | 280 |
| 286 int Disassembler::Decode(Isolate* isolate, std::ostream* os, byte* begin, | 281 int Disassembler::Decode(Isolate* isolate, std::ostream* os, byte* begin, |
| 287 byte* end, Code* code) { | 282 byte* end, Code* code) { |
| 288 return 0; | 283 return 0; |
| 289 } | 284 } |
| 290 | 285 |
| 291 #endif // ENABLE_DISASSEMBLER | 286 #endif // ENABLE_DISASSEMBLER |
| 292 | 287 |
| 293 } // namespace internal | 288 } // namespace internal |
| 294 } // namespace v8 | 289 } // namespace v8 |
| OLD | NEW |