diff options
Diffstat (limited to 'deps/v8/src/disassembler.cc')
-rw-r--r-- | deps/v8/src/disassembler.cc | 27 |
1 files changed, 16 insertions, 11 deletions
diff --git a/deps/v8/src/disassembler.cc b/deps/v8/src/disassembler.cc index 243abf079c..368c3a89c1 100644 --- a/deps/v8/src/disassembler.cc +++ b/deps/v8/src/disassembler.cc @@ -28,7 +28,7 @@ #include "v8.h" #include "code-stubs.h" -#include "codegen-inl.h" +#include "codegen.h" #include "debug.h" #include "deoptimizer.h" #include "disasm.h" @@ -65,24 +65,24 @@ class V8NameConverter: public disasm::NameConverter { Code* code() const { return code_; } private: Code* code_; + + EmbeddedVector<char, 128> v8_buffer_; }; const char* V8NameConverter::NameOfAddress(byte* pc) const { - static v8::internal::EmbeddedVector<char, 128> buffer; - - const char* name = Builtins::Lookup(pc); + const char* name = Isolate::Current()->builtins()->Lookup(pc); if (name != NULL) { - OS::SNPrintF(buffer, "%s (%p)", name, pc); - return buffer.start(); + OS::SNPrintF(v8_buffer_, "%s (%p)", name, pc); + return v8_buffer_.start(); } if (code_ != NULL) { int offs = static_cast<int>(pc - code_->instruction_start()); // print as code offset, if it seems reasonable if (0 <= offs && offs < code_->instruction_size()) { - OS::SNPrintF(buffer, "%d (%p)", offs, pc); - return buffer.start(); + OS::SNPrintF(v8_buffer_, "%d (%p)", offs, pc); + return v8_buffer_.start(); } } @@ -115,6 +115,7 @@ static int DecodeIt(FILE* f, NoHandleAllocation ha; AssertNoAllocation no_alloc; ExternalReferenceEncoder ref_encoder; + Heap* heap = HEAP; v8::internal::EmbeddedVector<char, 128> decode_buffer; v8::internal::EmbeddedVector<char, kOutBufferSize> out_buffer; @@ -256,8 +257,8 @@ static int DecodeIt(FILE* f, } else if (kind == Code::STUB) { // Reverse lookup required as the minor key cannot be retrieved // from the code object. - Object* obj = Heap::code_stubs()->SlowReverseLookup(code); - if (obj != Heap::undefined_value()) { + Object* obj = heap->code_stubs()->SlowReverseLookup(code); + if (obj != heap->undefined_value()) { ASSERT(obj->IsSmi()); // Get the STUB key and extract major and minor key. uint32_t key = Smi::cast(obj)->value(); @@ -281,7 +282,11 @@ static int DecodeIt(FILE* f, } else { out.AddFormatted(" %s", Code::Kind2String(kind)); } - } else if (rmode == RelocInfo::RUNTIME_ENTRY) { + if (rmode == RelocInfo::CODE_TARGET_WITH_ID) { + out.AddFormatted(" (id = %d)", static_cast<int>(relocinfo.data())); + } + } else if (rmode == RelocInfo::RUNTIME_ENTRY && + Isolate::Current()->deoptimizer_data() != NULL) { // A runtime entry reloinfo might be a deoptimization bailout. Address addr = relocinfo.target_address(); int id = Deoptimizer::GetDeoptimizationId(addr, Deoptimizer::EAGER); |