Commit 81841073 authored by Clemens Backes's avatar Clemens Backes Committed by V8 LUCI CQ

[liftoff] Add a few more code comments

Add a code comment for checking the maximum number of steps, and
disambiguate the different types of breakpoints.

R=thibaudm@chromium.org

Change-Id: I9be40461554948a61e81b3f9953cfc4475e52e54
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2985400
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Reviewed-by: 's avatarThibaud Michaud <thibaudm@chromium.org>
Cr-Commit-Position: refs/heads/master@{#75383}
parent 895e00c5
......@@ -990,6 +990,7 @@ class LiftoffCompiler {
}
}
if (has_breakpoint) {
CODE_COMMENT("breakpoint");
EmitBreakpoint(decoder);
// Once we emitted an unconditional breakpoint, we don't need to check
// function entry breaks any more.
......@@ -1023,12 +1024,14 @@ class LiftoffCompiler {
// removed. Adding a dead breakpoint here ensures that the source
// position exists, and that the offset to the return address is the
// same as in the old code.
CODE_COMMENT("dead breakpoint");
Label cont;
__ emit_jump(&cont);
EmitBreakpoint(decoder);
__ bind(&cont);
}
if (V8_UNLIKELY(max_steps_ != nullptr)) {
CODE_COMMENT("check max steps");
LiftoffRegList pinned;
LiftoffRegister max_steps = __ GetUnusedRegister(kGpReg, {});
pinned.set(max_steps);
......@@ -1064,7 +1067,6 @@ class LiftoffCompiler {
}
void EmitBreakpoint(FullDecoder* decoder) {
CODE_COMMENT("breakpoint");
DCHECK(for_debugging_);
source_position_table_builder_.AddPosition(
__ pc_offset(), SourcePosition(decoder->position()), true);
......
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