mirror of
https://github.com/zebrajr/ladybird.git
synced 2025-12-06 00:19:53 +01:00
LibJS: Store NewObject result directly in preferred dst if possible
This avoids a Mov after every object literal.
This commit is contained in:
parent
900f209b34
commit
5ea45da15f
|
|
@ -1129,7 +1129,7 @@ Bytecode::CodeGenerationErrorOr<Optional<ScopedOperand>> ObjectExpression::gener
|
||||||
{
|
{
|
||||||
Bytecode::Generator::SourceLocationScope scope(generator, *this);
|
Bytecode::Generator::SourceLocationScope scope(generator, *this);
|
||||||
|
|
||||||
auto object = generator.allocate_register();
|
auto object = choose_dst(generator, preferred_dst);
|
||||||
|
|
||||||
generator.emit<Bytecode::Op::NewObject>(object);
|
generator.emit<Bytecode::Op::NewObject>(object);
|
||||||
if (m_properties.is_empty())
|
if (m_properties.is_empty())
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user