mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-02-24 00:24:38 +00:00
LibJS: Replace SetLocal instruction usage with Mov
No need for separate instuction to set a local.
This commit is contained in:
committed by
Andreas Kling
parent
46ee2b5f06
commit
caffd485b8
@@ -814,7 +814,7 @@ void Generator::emit_set_variable(JS::Identifier const& identifier, ScopedOperan
|
||||
// Moving a local to itself is a no-op.
|
||||
return;
|
||||
}
|
||||
emit<Bytecode::Op::SetLocal>(identifier.local_variable_index(), value);
|
||||
emit<Bytecode::Op::Mov>(local(identifier.local_variable_index()), value);
|
||||
} else {
|
||||
emit<Bytecode::Op::SetVariable>(intern_identifier(identifier.string()), value, initialization_mode, mode);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user