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
parent 432be2c8
...@@ -384,7 +384,7 @@ void JSObject::PrintElements(FILE* out) { ...@@ -384,7 +384,7 @@ void JSObject::PrintElements(FILE* out) {
case EXTERNAL_DOUBLE_ELEMENTS: { case EXTERNAL_DOUBLE_ELEMENTS: {
ExternalDoubleArray* p = ExternalDoubleArray::cast(elements()); ExternalDoubleArray* p = ExternalDoubleArray::cast(elements());
for (int i = 0; i < p->length(); i++) { 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; break;
} }
...@@ -393,11 +393,16 @@ void JSObject::PrintElements(FILE* out) { ...@@ -393,11 +393,16 @@ void JSObject::PrintElements(FILE* out) {
break; break;
case NON_STRICT_ARGUMENTS_ELEMENTS: { case NON_STRICT_ARGUMENTS_ELEMENTS: {
FixedArray* p = FixedArray::cast(elements()); FixedArray* p = FixedArray::cast(elements());
PrintF(out, " parameter map:");
for (int i = 2; i < p->length(); i++) { for (int i = 2; i < p->length(); i++) {
PrintF(out, " %d: ", i); PrintF(out, " %d:", i - 2);
p->get(i)->ShortPrint(out); 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; break;
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment