Index: src/objects-printer.cc |
diff --git a/src/objects-printer.cc b/src/objects-printer.cc |
index 7d6ef67a30780135544660dd7cc1d90f9032b299..30b1cc9e118a2d3d3c6a81324dcaf666dce96780 100644 |
--- a/src/objects-printer.cc |
+++ b/src/objects-printer.cc |
@@ -318,7 +318,9 @@ void JSObject::PrintElements(FILE* out) { |
// Don't call GetElementsKind, its validation code can cause the printer to |
// fail when debugging. |
switch (map()->elements_kind()) { |
- case FAST_SMI_ONLY_ELEMENTS: |
+ case FAST_HOLEY_SMI_ELEMENTS: |
+ case FAST_SMI_ELEMENTS: |
+ case FAST_HOLEY_ELEMENTS: |
case FAST_ELEMENTS: { |
// Print in array notation for non-sparse arrays. |
FixedArray* p = FixedArray::cast(elements()); |
@@ -329,16 +331,19 @@ void JSObject::PrintElements(FILE* out) { |
} |
break; |
} |
+ case FAST_HOLEY_DOUBLE_ELEMENTS: |
case FAST_DOUBLE_ELEMENTS: { |
// Print in array notation for non-sparse arrays. |
- FixedDoubleArray* p = FixedDoubleArray::cast(elements()); |
- for (int i = 0; i < p->length(); i++) { |
- if (p->is_the_hole(i)) { |
- PrintF(out, " %d: <the hole>", i); |
- } else { |
- PrintF(out, " %d: %g", i, p->get_scalar(i)); |
+ if (elements()->length() != 0) { |
+ FixedDoubleArray* p = FixedDoubleArray::cast(elements()); |
+ for (int i = 0; i < p->length(); i++) { |
+ if (p->is_the_hole(i)) { |
+ PrintF(out, " %d: <the hole>", i); |
+ } else { |
+ PrintF(out, " %d: %g", i, p->get_scalar(i)); |
+ } |
+ PrintF(out, "\n"); |
} |
- PrintF(out, "\n"); |
} |
break; |
} |