Commit 93c92003 authored by Benedikt Meurer's avatar Benedikt Meurer Committed by Commit Bot

[cleanup] Teach HeapObjectShortPrint() about the context types.

Properly print the new context types in HeapObjectShortPrint() so we see
what kind of context it is, and the number of context slots.

Bug: v8:7570, v8:7588
Change-Id: I43414996fd953f77e140e8750b2dc4923c9bce95
Reviewed-on: https://chromium-review.googlesource.com/986135Reviewed-by: 's avatarYang Guo <yangguo@chromium.org>
Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#52297}
parent fc976f8e
......@@ -3275,6 +3275,34 @@ void HeapObject::HeapObjectShortPrint(std::ostream& os) { // NOLINT
}
os << ">";
} break;
case BLOCK_CONTEXT_TYPE:
os << "<BlockContext[" << FixedArray::cast(this)->length() << "]>";
break;
case CATCH_CONTEXT_TYPE:
os << "<CatchContext[" << FixedArray::cast(this)->length() << "]>";
break;
case DEBUG_EVALUATE_CONTEXT_TYPE:
os << "<DebugEvaluateContext[" << FixedArray::cast(this)->length()
<< "]>";
break;
case EVAL_CONTEXT_TYPE:
os << "<EvalContext[" << FixedArray::cast(this)->length() << "]>";
break;
case FUNCTION_CONTEXT_TYPE:
os << "<FunctionContext[" << FixedArray::cast(this)->length() << "]>";
break;
case MODULE_CONTEXT_TYPE:
os << "<ModuleContext[" << FixedArray::cast(this)->length() << "]>";
break;
case NATIVE_CONTEXT_TYPE:
os << "<NativeContext[" << FixedArray::cast(this)->length() << "]>";
break;
case SCRIPT_CONTEXT_TYPE:
os << "<ScriptContext[" << FixedArray::cast(this)->length() << "]>";
break;
case WITH_CONTEXT_TYPE:
os << "<WithContext[" << FixedArray::cast(this)->length() << "]>";
break;
case HASH_TABLE_TYPE:
os << "<HashTable[" << FixedArray::cast(this)->length() << "]>";
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