Commit 1c096948 authored by Clemens Backes's avatar Clemens Backes Committed by Commit Bot

Fix printing wasm scripts

Various accessors (like {has_eval_from_shared} or {is_wrapped}) are only
allowed on scripts that are not wasm. This currently makes printing wasm
scripts fail.
This CL fixes that by having separate paths for printing wasm scripts vs
non-wasm scripts.

R=jkummerow@chromium.org

Change-Id: I8771ded22999504f2fb2c55bc0a1d95c25e988c3
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2033164Reviewed-by: 's avatarJakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66066}
parent 61e7e22c
...@@ -1986,15 +1986,18 @@ void Script::ScriptPrint(std::ostream& os) { // NOLINT ...@@ -1986,15 +1986,18 @@ void Script::ScriptPrint(std::ostream& os) { // NOLINT
os << "\n - context data: " << Brief(context_data()); os << "\n - context data: " << Brief(context_data());
os << "\n - compilation type: " << compilation_type(); os << "\n - compilation type: " << compilation_type();
os << "\n - line ends: " << Brief(line_ends()); os << "\n - line ends: " << Brief(line_ends());
if (has_eval_from_shared()) { if (type() == TYPE_WASM) {
os << "\n - eval from shared: " << Brief(eval_from_shared()); if (has_wasm_breakpoint_infos()) {
} os << "\n - wasm_breakpoint_infos: " << Brief(wasm_breakpoint_infos());
if (is_wrapped()) { }
os << "\n - wrapped arguments: " << Brief(wrapped_arguments()); } else {
} if (has_eval_from_shared()) {
os << "\n - eval from position: " << eval_from_position(); os << "\n - eval from shared: " << Brief(eval_from_shared());
if (has_wasm_breakpoint_infos()) { }
os << "\n - wasm_breakpoint_infos: " << Brief(wasm_breakpoint_infos()); if (is_wrapped()) {
os << "\n - wrapped arguments: " << Brief(wrapped_arguments());
}
os << "\n - eval from position: " << eval_from_position();
} }
os << "\n - shared function infos: " << Brief(shared_function_infos()); os << "\n - shared function infos: " << Brief(shared_function_infos());
os << "\n"; 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