| Index: runtime/vm/disassembler.cc
|
| diff --git a/runtime/vm/disassembler.cc b/runtime/vm/disassembler.cc
|
| index d1ff765dfe1a76c726cc981367ef4f318dd60b30..a735289c94cd9b83e89607469f9bce426cd6e805 100644
|
| --- a/runtime/vm/disassembler.cc
|
| +++ b/runtime/vm/disassembler.cc
|
| @@ -26,6 +26,7 @@ void DisassembleToStdout::ConsumeInstruction(const Code& code,
|
| intptr_t hex_size,
|
| char* human_buffer,
|
| intptr_t human_size,
|
| + Object* object,
|
| uword pc) {
|
| static const int kHexColumnWidth = 23;
|
| uint8_t* pc_ptr = reinterpret_cast<uint8_t*>(pc);
|
| @@ -37,6 +38,9 @@ void DisassembleToStdout::ConsumeInstruction(const Code& code,
|
| }
|
| }
|
| THR_Print("%s", human_buffer);
|
| + if (object != NULL) {
|
| + THR_Print(" %s", object->ToCString());
|
| + }
|
| THR_Print("\n");
|
| }
|
|
|
| @@ -54,6 +58,7 @@ void DisassembleToJSONStream::ConsumeInstruction(const Code& code,
|
| intptr_t hex_size,
|
| char* human_buffer,
|
| intptr_t human_size,
|
| + Object* object,
|
| uword pc) {
|
| // Instructions are represented as four consecutive values in a JSON array.
|
| // The first is the address of the instruction, the second is the hex string,
|
| @@ -63,9 +68,8 @@ void DisassembleToJSONStream::ConsumeInstruction(const Code& code,
|
| jsarr_.AddValue(hex_buffer);
|
| jsarr_.AddValue(human_buffer);
|
|
|
| - Object& object = Object::Handle();
|
| - if (DecodeLoadObjectFromPoolOrThread(pc, code, &object)) {
|
| - jsarr_.AddValue(object);
|
| + if (object != NULL) {
|
| + jsarr_.AddValue(*object);
|
| } else {
|
| jsarr_.AddValueNull(); // Not a reference to null.
|
| }
|
| @@ -97,33 +101,6 @@ void DisassembleToJSONStream::Print(const char* format, ...) {
|
| }
|
|
|
|
|
| -class FindAddrVisitor : public FindObjectVisitor {
|
| - public:
|
| - explicit FindAddrVisitor(uword addr) : addr_(addr) { }
|
| - virtual ~FindAddrVisitor() { }
|
| -
|
| - virtual uword filter_addr() const { return addr_; }
|
| -
|
| - // Check if object matches find condition.
|
| - virtual bool FindObject(RawObject* obj) const {
|
| - return obj == reinterpret_cast<RawObject*>(addr_);
|
| - }
|
| -
|
| - private:
|
| - const uword addr_;
|
| -
|
| - DISALLOW_COPY_AND_ASSIGN(FindAddrVisitor);
|
| -};
|
| -
|
| -
|
| -bool Disassembler::CanFindOldObject(uword addr) {
|
| - FindAddrVisitor visitor(addr);
|
| - NoSafepointScope no_safepoint;
|
| - return Dart::vm_isolate()->heap()->FindOldObject(&visitor) != Object::null()
|
| - || Isolate::Current()->heap()->FindOldObject(&visitor) != Object::null();
|
| -}
|
| -
|
| -
|
| void Disassembler::Disassemble(uword start,
|
| uword end,
|
| DisassemblyFormatter* formatter,
|
| @@ -168,16 +145,18 @@ void Disassembler::Disassemble(uword start,
|
| }
|
| }
|
| int instruction_length;
|
| + Object* object;
|
| DecodeInstruction(hex_buffer,
|
| sizeof(hex_buffer),
|
| human_buffer,
|
| sizeof(human_buffer),
|
| - &instruction_length, pc);
|
| + &instruction_length, code, &object, pc);
|
| formatter->ConsumeInstruction(code,
|
| hex_buffer,
|
| sizeof(hex_buffer),
|
| human_buffer,
|
| sizeof(human_buffer),
|
| + object,
|
| pc);
|
| pc += instruction_length;
|
| }
|
|
|