Commit 0298ece6 authored by Camillo Bruni's avatar Camillo Bruni Committed by V8 LUCI CQ

[diagnostics] Improve Context printing

- Print extension and type
- Clarify elements printing

Change-Id: Ie5d5fb60e20bb2f5bfee4e438a4dec52b3b27d13
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3186435
Auto-Submit: Camillo Bruni <cbruni@chromium.org>
Commit-Queue: Maya Lekova <mslekova@chromium.org>
Reviewed-by: 's avatarMaya Lekova <mslekova@chromium.org>
Cr-Commit-Position: refs/heads/main@{#77093}
parent 0a8bccfd
......@@ -821,10 +821,15 @@ namespace {
void PrintContextWithHeader(std::ostream& os, Context context,
const char* type) {
context.PrintHeader(os, type);
os << "\n - length: " << context.length();
os << "\n - type: " << context.map().instance_type();
os << "\n - scope_info: " << Brief(context.scope_info());
os << "\n - previous: " << Brief(context.unchecked_previous());
os << "\n - native_context: " << Brief(context.native_context());
if (context.scope_info().HasContextExtensionSlot()) {
os << "\n - extension: " << context.extension();
}
os << "\n - length: " << context.length();
os << "\n - elements:";
PrintFixedArrayElements(os, context);
os << "\n";
}
......
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