[wasm] Actually print WasmModuleObject on debug printing.

R=titzer@chromium.org

Change-Id: If3d6843b7e7542799d8be5a9ecea9ad2f96a8c5a
Reviewed-on: https://chromium-review.googlesource.com/1181021
Reviewed-by: Ben Titzer <titzer@chromium.org>
Commit-Queue: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#55213}
This commit is contained in:
Michael Starzinger 2018-08-20 13:34:45 +02:00 committed by Commit Bot
parent af4cf8d150
commit 74004dbf3d

View File

@ -189,10 +189,12 @@ void HeapObject::HeapObjectPrint(std::ostream& os) { // NOLINT
// TODO(titzer): debug printing for more wasm objects // TODO(titzer): debug printing for more wasm objects
case WASM_GLOBAL_TYPE: case WASM_GLOBAL_TYPE:
case WASM_MEMORY_TYPE: case WASM_MEMORY_TYPE:
case WASM_MODULE_TYPE:
case WASM_TABLE_TYPE: case WASM_TABLE_TYPE:
JSObject::cast(this)->JSObjectPrint(os); JSObject::cast(this)->JSObjectPrint(os);
break; break;
case WASM_MODULE_TYPE:
WasmModuleObject::cast(this)->WasmModuleObjectPrint(os);
break;
case WASM_INSTANCE_TYPE: case WASM_INSTANCE_TYPE:
WasmInstanceObject::cast(this)->WasmInstanceObjectPrint(os); WasmInstanceObject::cast(this)->WasmInstanceObjectPrint(os);
break; break;
@ -1766,14 +1768,17 @@ void WasmExportedFunctionData::WasmExportedFunctionDataPrint(
} }
void WasmModuleObject::WasmModuleObjectPrint(std::ostream& os) { // NOLINT void WasmModuleObject::WasmModuleObjectPrint(std::ostream& os) { // NOLINT
JSObjectPrintHeader(os, this, "WasmModuleObject"); HeapObject::PrintHeader(os, "WasmModuleObject");
JSObjectPrintBody(os, this);
os << "\n - module: " << module(); os << "\n - module: " << module();
os << "\n - native module: " << native_module(); os << "\n - native module: " << native_module();
os << "\n - export wrappers: " << Brief(export_wrappers()); os << "\n - export wrappers: " << Brief(export_wrappers());
os << "\n - script: " << Brief(script()); os << "\n - script: " << Brief(script());
os << "\n - asm_js_offset_table: " << Brief(asm_js_offset_table()); if (has_asm_js_offset_table()) {
os << "\n - breakpoint_infos: " << Brief(breakpoint_infos()); os << "\n - asm_js_offset_table: " << Brief(asm_js_offset_table());
}
if (has_breakpoint_infos()) {
os << "\n - breakpoint_infos: " << Brief(breakpoint_infos());
}
os << "\n"; os << "\n";
} }