add object Printer for JSArrayIterator
BUG=v8:5635 R=mlippautz@chromium.org, bmeurer@chromium.org Review-Url: https://codereview.chromium.org/2508433002 Cr-Commit-Position: refs/heads/master@{#41006}
This commit is contained in:
parent
c3a60837c0
commit
45bd43b8af
@ -103,6 +103,44 @@ void HeapObject::HeapObjectPrint(std::ostream& os) { // NOLINT
|
||||
TYPED_ARRAYS(PRINT_FIXED_TYPED_ARRAY)
|
||||
#undef PRINT_FIXED_TYPED_ARRAY
|
||||
|
||||
case JS_TYPED_ARRAY_KEY_ITERATOR_TYPE:
|
||||
case JS_FAST_ARRAY_KEY_ITERATOR_TYPE:
|
||||
case JS_GENERIC_ARRAY_KEY_ITERATOR_TYPE:
|
||||
case JS_INT8_ARRAY_KEY_VALUE_ITERATOR_TYPE:
|
||||
case JS_UINT8_ARRAY_KEY_VALUE_ITERATOR_TYPE:
|
||||
case JS_INT16_ARRAY_KEY_VALUE_ITERATOR_TYPE:
|
||||
case JS_UINT16_ARRAY_KEY_VALUE_ITERATOR_TYPE:
|
||||
case JS_INT32_ARRAY_KEY_VALUE_ITERATOR_TYPE:
|
||||
case JS_UINT32_ARRAY_KEY_VALUE_ITERATOR_TYPE:
|
||||
case JS_FLOAT32_ARRAY_KEY_VALUE_ITERATOR_TYPE:
|
||||
case JS_FLOAT64_ARRAY_KEY_VALUE_ITERATOR_TYPE:
|
||||
case JS_UINT8_CLAMPED_ARRAY_KEY_VALUE_ITERATOR_TYPE:
|
||||
case JS_FAST_SMI_ARRAY_KEY_VALUE_ITERATOR_TYPE:
|
||||
case JS_FAST_HOLEY_SMI_ARRAY_KEY_VALUE_ITERATOR_TYPE:
|
||||
case JS_FAST_ARRAY_KEY_VALUE_ITERATOR_TYPE:
|
||||
case JS_FAST_HOLEY_ARRAY_KEY_VALUE_ITERATOR_TYPE:
|
||||
case JS_FAST_DOUBLE_ARRAY_KEY_VALUE_ITERATOR_TYPE:
|
||||
case JS_FAST_HOLEY_DOUBLE_ARRAY_KEY_VALUE_ITERATOR_TYPE:
|
||||
case JS_GENERIC_ARRAY_KEY_VALUE_ITERATOR_TYPE:
|
||||
case JS_INT8_ARRAY_VALUE_ITERATOR_TYPE:
|
||||
case JS_UINT8_ARRAY_VALUE_ITERATOR_TYPE:
|
||||
case JS_INT16_ARRAY_VALUE_ITERATOR_TYPE:
|
||||
case JS_UINT16_ARRAY_VALUE_ITERATOR_TYPE:
|
||||
case JS_INT32_ARRAY_VALUE_ITERATOR_TYPE:
|
||||
case JS_UINT32_ARRAY_VALUE_ITERATOR_TYPE:
|
||||
case JS_FLOAT32_ARRAY_VALUE_ITERATOR_TYPE:
|
||||
case JS_FLOAT64_ARRAY_VALUE_ITERATOR_TYPE:
|
||||
case JS_UINT8_CLAMPED_ARRAY_VALUE_ITERATOR_TYPE:
|
||||
case JS_FAST_SMI_ARRAY_VALUE_ITERATOR_TYPE:
|
||||
case JS_FAST_HOLEY_SMI_ARRAY_VALUE_ITERATOR_TYPE:
|
||||
case JS_FAST_ARRAY_VALUE_ITERATOR_TYPE:
|
||||
case JS_FAST_HOLEY_ARRAY_VALUE_ITERATOR_TYPE:
|
||||
case JS_FAST_DOUBLE_ARRAY_VALUE_ITERATOR_TYPE:
|
||||
case JS_FAST_HOLEY_DOUBLE_ARRAY_VALUE_ITERATOR_TYPE:
|
||||
case JS_GENERIC_ARRAY_VALUE_ITERATOR_TYPE:
|
||||
JSArrayIterator::cast(this)->JSArrayIteratorPrint(os);
|
||||
break;
|
||||
|
||||
case FILLER_TYPE:
|
||||
os << "filler";
|
||||
break;
|
||||
@ -953,6 +991,26 @@ void JSTypedArray::JSTypedArrayPrint(std::ostream& os) { // NOLINT
|
||||
JSObjectPrintBody(os, this, !WasNeutered());
|
||||
}
|
||||
|
||||
void JSArrayIterator::JSArrayIteratorPrint(std::ostream& os) { // NOLING
|
||||
JSObjectPrintHeader(os, this, "JSArrayIterator");
|
||||
|
||||
InstanceType instance_type = map()->instance_type();
|
||||
std::string type;
|
||||
if (instance_type <= LAST_ARRAY_KEY_ITERATOR_TYPE) {
|
||||
type = "keys";
|
||||
} else if (instance_type <= LAST_ARRAY_KEY_VALUE_ITERATOR_TYPE) {
|
||||
type = "entries";
|
||||
} else {
|
||||
type = "values";
|
||||
}
|
||||
|
||||
os << "\n - type = " << type;
|
||||
os << "\n - object = " << Brief(object());
|
||||
os << "\n - index = " << Brief(index());
|
||||
|
||||
JSObjectPrintBody(os, this);
|
||||
}
|
||||
|
||||
void JSFixedArrayIterator::JSFixedArrayIteratorPrint(
|
||||
std::ostream& os) { // NOLINT
|
||||
JSObjectPrintHeader(os, this, "JSFixedArrayIterator");
|
||||
|
Loading…
Reference in New Issue
Block a user