mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-07 00:56:14 +00:00
LibJS: Handle Calls argument range during EliminateLoads pass
Otherwise we could forget to emit stores those registers, thinking that they are only directly accessed.
This commit is contained in:
committed by
Andreas Kling
parent
f52e3e540f
commit
b26dad3d62
@@ -20,6 +20,10 @@ static NonnullOwnPtr<BasicBlock> eliminate_loads(BasicBlock const& block, size_t
|
||||
Op::NewArray const& array_instruction = static_cast<Op::NewArray const&>(*it);
|
||||
if (size_t element_count = array_instruction.element_count())
|
||||
array_ranges.set_range<true, false>(array_instruction.start().index(), element_count);
|
||||
} else if ((*it).type() == Instruction::Type::Call) {
|
||||
auto const& call_instruction = static_cast<Op::Call const&>(*it);
|
||||
if (size_t element_count = call_instruction.argument_count())
|
||||
array_ranges.set_range<true, false>(call_instruction.first_argument().index(), element_count);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user