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

Unified Diff: src/objects-printer.cc

Issue 11316219: Improve debug printing of non-strict arguments object. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 8 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: src/objects-printer.cc
diff --git a/src/objects-printer.cc b/src/objects-printer.cc
index b1118de9c476f91f9b706059c516d66b81f7f1f3..9a1a58ef82a91415cbc6719a2632f04a0ea9f3ae 100644
--- a/src/objects-printer.cc
+++ b/src/objects-printer.cc
@@ -384,7 +384,7 @@ void JSObject::PrintElements(FILE* out) {
case EXTERNAL_DOUBLE_ELEMENTS: {
ExternalDoubleArray* p = ExternalDoubleArray::cast(elements());
for (int i = 0; i < p->length(); i++) {
- PrintF(out, " %d: %f\n", i, p->get_scalar(i));
+ PrintF(out, " %d: %f\n", i, p->get_scalar(i));
}
break;
}
@@ -393,11 +393,16 @@ void JSObject::PrintElements(FILE* out) {
break;
case NON_STRICT_ARGUMENTS_ELEMENTS: {
FixedArray* p = FixedArray::cast(elements());
+ PrintF(out, " parameter map:");
for (int i = 2; i < p->length(); i++) {
- PrintF(out, " %d: ", i);
+ PrintF(out, " %d:", i - 2);
Toon Verwaest 2012/11/28 13:20:54 Magic constants ftw. If there is a k-version of th
p->get(i)->ShortPrint(out);
- PrintF(out, "\n");
}
+ PrintF(out, "\n context: ");
+ p->get(0)->ShortPrint(out);
+ PrintF(out, "\n arguments: ");
+ p->get(1)->ShortPrint(out);
+ PrintF(out, "\n");
break;
}
}
« 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