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

Unified Diff: runtime/vm/disassembler_ia32.cc

Issue 8491061: More info in disassembled code (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 9 years, 1 month 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/disassembler_ia32.cc
===================================================================
--- runtime/vm/disassembler_ia32.cc (revision 1469)
+++ runtime/vm/disassembler_ia32.cc (working copy)
@@ -394,8 +394,24 @@
// Try to print as heap object or stub name
if (!Isolate::Current()->heap()->CodeContains(addr) &&
Isolate::Current()->heap()->Contains(addr - kHeapObjectTag)) {
+ Object& obj = Object::Handle(reinterpret_cast<RawObject*>(addr));
+ if (obj.IsArray()) {
+ const Array& arr = Array::CheckedHandle(obj.raw());
siva 2011/11/12 01:11:55 You have already checked it is an array above so w
+ intptr_t len = arr.Length();
+ if (len > 5) len = 5; // At max print first 5 elements.
siva 2011/11/12 01:11:55 Print a max of 5 elements.
+ Print(" Array[");
+ int i = 0;
+ while (i < len) {
+ obj = arr.At(i);
+ if (i > 0) Print(", ");
+ Print(obj.ToCString());
+ i++;
+ }
+ if (i < arr.Length()) Print(", ...");
+ Print("]");
+ return;
+ }
Print(" '");
- const Object& obj = Object::Handle(reinterpret_cast<RawObject*>(addr));
Print(obj.ToCString());
Print("'");
} else {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698