Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(212)

Unified Diff: runtime/vm/disassembler.cc

Issue 135843006: Improve Code object support in service and observatory (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: runtime/vm/disassembler.cc
diff --git a/runtime/vm/disassembler.cc b/runtime/vm/disassembler.cc
index 780318815df19fa57790b1cf36f2a78146a7cab0..c301c59ef67ed45766a245230e22eb3e1dd6a0f6 100644
--- a/runtime/vm/disassembler.cc
+++ b/runtime/vm/disassembler.cc
@@ -44,11 +44,9 @@ void DisassembleToJSONStream::ConsumeInstruction(char* hex_buffer,
intptr_t human_size,
uword pc) {
uint8_t* pc_ptr = reinterpret_cast<uint8_t*>(pc);
turnidge 2014/01/17 19:30:21 Could use a comment here. "Instructions are repre
Cutch 2014/01/17 21:15:42 Done.
- JSONObject jsobj(&jsarr_);
- jsobj.AddProperty("type", "DisassembledInstruction");
- jsobj.AddPropertyF("pc", "%p", pc_ptr);
- jsobj.AddProperty("hex", hex_buffer);
- jsobj.AddProperty("human", human_buffer);
+ jsarr_.AddValueF("%p", pc_ptr);
+ jsarr_.AddValue(hex_buffer);
+ jsarr_.AddValue(human_buffer);
}
@@ -67,9 +65,9 @@ void DisassembleToJSONStream::Print(const char* format, ...) {
p[i] = ' ';
}
}
turnidge 2014/01/17 19:30:21 Could use a comment here.
Cutch 2014/01/17 21:15:42 Done.
- JSONObject jsobj(&jsarr_);
- jsobj.AddProperty("type", "DisassembledInstructionComment");
- jsobj.AddProperty("comment", p);
+ jsarr_.AddValue("");
+ jsarr_.AddValue("");
+ jsarr_.AddValue(p);
free(p);
}

Powered by Google App Engine
This is Rietveld 408576698