mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-10 01:59:31 +00:00
LibJS/Bytecode: Always resolve this
binding into dedicated register
We already have a dedicated register slot for `this`, so instead of having ResolveThisBinding take a `dst` operand, just write the value directly into the `this` register every time.
This commit is contained in:
parent
9d57b55f24
commit
507f83a615
Notes:
sideshowbarker
2024-07-17 01:27:18 +09:00
Author: https://github.com/awesomekling
Commit: 507f83a615
Pull-request: https://github.com/SerenityOS/serenity/pull/24504
6 changed files with 35 additions and 39 deletions
|
@ -11,7 +11,7 @@ namespace JS::Bytecode {
|
|||
|
||||
ScopedOperandImpl::~ScopedOperandImpl()
|
||||
{
|
||||
if (!m_generator.is_finished() && m_operand.is_register() && m_operand.as_register().index() != 0)
|
||||
if (!m_generator.is_finished() && m_operand.is_register() && m_operand.as_register().index() >= Register::reserved_register_count)
|
||||
m_generator.free_register(m_operand.as_register());
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue