[maglev] Ensure generator arguments are tagged

Bug: v8:7700
Change-Id: I08cea127fcb8a2d1adf1667d0953888e035e3e46
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3876242
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: Victor Gomes <victorgomes@chromium.org>
Auto-Submit: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Victor Gomes <victorgomes@chromium.org>
Cr-Commit-Position: refs/heads/main@{#83000}
This commit is contained in:
Leszek Swirski 2022-09-06 16:02:00 +02:00 committed by V8 LUCI CQ
parent 80df17b74a
commit 9734c2b74f
2 changed files with 4 additions and 4 deletions

View File

@ -110,9 +110,9 @@ void MaglevGraphBuilder::SetArgument(int i, ValueNode* value) {
current_interpreter_frame_.set(reg, value);
}
ValueNode* MaglevGraphBuilder::GetArgument(int i) const {
ValueNode* MaglevGraphBuilder::GetTaggedArgument(int i) {
interpreter::Register reg = interpreter::Register::FromParameterIndex(i);
return current_interpreter_frame_.get(reg);
return GetTaggedValue(reg);
}
void MaglevGraphBuilder::BuildRegisterFrameInitialization() {
@ -2897,7 +2897,7 @@ void MaglevGraphBuilder::VisitSuspendGenerator() {
input_count, context, generator, suspend_id, iterator_.current_offset());
int arg_index = 0;
for (int i = 1 /* skip receiver */; i < parameter_count(); ++i) {
node->set_parameters_and_registers(arg_index++, GetArgument(i));
node->set_parameters_and_registers(arg_index++, GetTaggedArgument(i));
}
const compiler::BytecodeLivenessState* liveness = GetOutLiveness();
for (int i = 0; i < args.register_count(); ++i) {

View File

@ -54,7 +54,7 @@ class MaglevGraphBuilder {
void StartPrologue();
void SetArgument(int i, ValueNode* value);
ValueNode* GetArgument(int i) const;
ValueNode* GetTaggedArgument(int i);
void BuildRegisterFrameInitialization();
BasicBlock* EndPrologue();