| Index: runtime/vm/disassembler.cc
|
| diff --git a/runtime/vm/disassembler.cc b/runtime/vm/disassembler.cc
|
| index 780318815df19fa57790b1cf36f2a78146a7cab0..044e1000247fbd6b2c144ac0d25272c2139fbc28 100644
|
| --- a/runtime/vm/disassembler.cc
|
| +++ b/runtime/vm/disassembler.cc
|
| @@ -44,11 +44,13 @@ void DisassembleToJSONStream::ConsumeInstruction(char* hex_buffer,
|
| intptr_t human_size,
|
| uword pc) {
|
| uint8_t* pc_ptr = reinterpret_cast<uint8_t*>(pc);
|
| - JSONObject jsobj(&jsarr_);
|
| - jsobj.AddProperty("type", "DisassembledInstruction");
|
| - jsobj.AddPropertyF("pc", "%p", pc_ptr);
|
| - jsobj.AddProperty("hex", hex_buffer);
|
| - jsobj.AddProperty("human", human_buffer);
|
| + // Instructions are represented as three consecutive values in a JSON array.
|
| + // All three are strings. The first is the address of the instruction,
|
| + // the second is the hex string of the code, and the final is a human
|
| + // readable string.
|
| + jsarr_.AddValueF("%p", pc_ptr);
|
| + jsarr_.AddValue(hex_buffer);
|
| + jsarr_.AddValue(human_buffer);
|
| }
|
|
|
|
|
| @@ -67,9 +69,12 @@ void DisassembleToJSONStream::Print(const char* format, ...) {
|
| p[i] = ' ';
|
| }
|
| }
|
| - JSONObject jsobj(&jsarr_);
|
| - jsobj.AddProperty("type", "DisassembledInstructionComment");
|
| - jsobj.AddProperty("comment", p);
|
| + // Instructions are represented as three consecutive values in a JSON array.
|
| + // All three are strings. Comments only use the third slot. See above comment
|
| + // for more information.
|
| + jsarr_.AddValue("");
|
| + jsarr_.AddValue("");
|
| + jsarr_.AddValue(p);
|
| free(p);
|
| }
|
|
|
|
|