[maglev] Fix debug-pos-offset in GeneratorStore

When creating the generator object, Ignition includes the
header object size.
The uses of debug-pos-offset, such as isolate.cc:AppendAsyncFrame,
expect that.

Bug: v8:7700
Change-Id: Idbe31802ac3ad6cbac7c5f7f7bd731132c358b61
Fixed: chromium:1387883
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4042664
Commit-Queue: Victor Gomes <victorgomes@chromium.org>
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Auto-Submit: Victor Gomes <victorgomes@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84390}
This commit is contained in:
Victor Gomes 2022-11-21 12:43:34 +01:00 committed by V8 LUCI CQ
parent 1d90a41cf2
commit 5171527f11

View File

@ -4683,8 +4683,10 @@ void MaglevGraphBuilder::VisitSuspendGenerator() {
int input_count = parameter_count_without_receiver() + args.register_count() +
GeneratorStore::kFixedInputCount;
int debug_pos_offset = iterator_.current_offset() +
(BytecodeArray::kHeaderSize - kHeapObjectTag);
GeneratorStore* node = CreateNewNode<GeneratorStore>(
input_count, context, generator, suspend_id, iterator_.current_offset());
input_count, context, generator, suspend_id, debug_pos_offset);
int arg_index = 0;
for (int i = 1 /* skip receiver */; i < parameter_count(); ++i) {
node->set_parameters_and_registers(arg_index++, GetTaggedArgument(i));