mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-04-21 03:55:24 +00: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
Notes:
github-actions[bot]
2025-03-27 19:51:10 +00:00
Author: https://github.com/awesomekling Commit: https://github.com/LadybirdBrowser/ladybird/commit/5ea45da15f5 Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/4122 Reviewed-by: https://github.com/LucasChollet
1 changed files with 1 additions and 1 deletions
|
@ -1129,7 +1129,7 @@ Bytecode::CodeGenerationErrorOr<Optional<ScopedOperand>> ObjectExpression::gener
|
|||
{
|
||||
Bytecode::Generator::SourceLocationScope scope(generator, *this);
|
||||
|
||||
auto object = generator.allocate_register();
|
||||
auto object = choose_dst(generator, preferred_dst);
|
||||
|
||||
generator.emit<Bytecode::Op::NewObject>(object);
|
||||
if (m_properties.is_empty())
|
||||
|
|
Loading…
Add table
Reference in a new issue