[liftoff] Enable more code comments in release builds

Most Liftoff code comments are generated by the {NextInstruction}
function. That code was inside an "#ifdef DEBUG" block so far, because
previously code comments were only enabled in debug builds anyway. Now
that we have the separate v8_code_comments gn arg, they can also be
enabled in release builds.
Hence remove the "#if DEBUG" such that code comments are also output in
release mode.

This should not introduce any compile time regressions since both macros
are no-ops in official builds.

R=ahaas@chromium.org

Change-Id: I0bdd11534620072ccf0ff959c7f7d658aa75717b
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2985243
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/master@{#75382}
This commit is contained in:
Clemens Backes 2021-06-24 18:38:47 +02:00 committed by V8 LUCI CQ
parent 243dad8fbe
commit 895e00c5bc

View File

@ -1055,14 +1055,12 @@ class LiftoffCompiler {
// {EmitDebuggingInfo} stays outlined.
if (V8_UNLIKELY(for_debugging_)) EmitDebuggingInfo(decoder, opcode);
TraceCacheState(decoder);
#ifdef DEBUG
SLOW_DCHECK(__ ValidateCacheState());
if (WasmOpcodes::IsPrefixOpcode(opcode)) {
opcode = decoder->read_prefixed_opcode<Decoder::kFullValidation>(
decoder->pc());
}
CODE_COMMENT(WasmOpcodes::OpcodeName(opcode));
#endif
CODE_COMMENT(WasmOpcodes::OpcodeName(
WasmOpcodes::IsPrefixOpcode(opcode)
? decoder->read_prefixed_opcode<Decoder::kFullValidation>(
decoder->pc())
: opcode));
}
void EmitBreakpoint(FullDecoder* decoder) {