From 32cf38b81cf741f8d078bb4d1ae3d5fa62745cd3 Mon Sep 17 00:00:00 2001 From: "mstarzinger@chromium.org" Date: Wed, 28 Nov 2012 15:11:38 +0000 Subject: [PATCH] Improve debug printing of non-strict arguments object. R=verwaest@chromium.org Review URL: https://codereview.chromium.org/11316219 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13079 ce2b1a6d-e550-0410-aec6-3dcde31c8c00 --- src/objects-printer.cc | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/objects-printer.cc b/src/objects-printer.cc index b1118de..9a1a58e 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); 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; } } -- 2.7.4