Commit 74004dbf authored by Michael Starzinger's avatar Michael Starzinger Committed by Commit Bot

[wasm] Actually print WasmModuleObject on debug printing.

R=titzer@chromium.org

Change-Id: If3d6843b7e7542799d8be5a9ecea9ad2f96a8c5a
Reviewed-on: https://chromium-review.googlesource.com/1181021Reviewed-by: 's avatarBen Titzer <titzer@chromium.org>
Commit-Queue: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#55213}
parent af4cf8d1
......@@ -189,10 +189,12 @@ void HeapObject::HeapObjectPrint(std::ostream& os) { // NOLINT
// TODO(titzer): debug printing for more wasm objects
case WASM_GLOBAL_TYPE:
case WASM_MEMORY_TYPE:
case WASM_MODULE_TYPE:
case WASM_TABLE_TYPE:
JSObject::cast(this)->JSObjectPrint(os);
break;
case WASM_MODULE_TYPE:
WasmModuleObject::cast(this)->WasmModuleObjectPrint(os);
break;
case WASM_INSTANCE_TYPE:
WasmInstanceObject::cast(this)->WasmInstanceObjectPrint(os);
break;
......@@ -1766,14 +1768,17 @@ void WasmExportedFunctionData::WasmExportedFunctionDataPrint(
}
void WasmModuleObject::WasmModuleObjectPrint(std::ostream& os) { // NOLINT
JSObjectPrintHeader(os, this, "WasmModuleObject");
JSObjectPrintBody(os, this);
HeapObject::PrintHeader(os, "WasmModuleObject");
os << "\n - module: " << module();
os << "\n - native module: " << native_module();
os << "\n - export wrappers: " << Brief(export_wrappers());
os << "\n - script: " << Brief(script());
os << "\n - asm_js_offset_table: " << Brief(asm_js_offset_table());
os << "\n - breakpoint_infos: " << Brief(breakpoint_infos());
if (has_asm_js_offset_table()) {
os << "\n - asm_js_offset_table: " << Brief(asm_js_offset_table());
}
if (has_breakpoint_infos()) {
os << "\n - breakpoint_infos: " << Brief(breakpoint_infos());
}
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