mirror of
https://github.com/RGBCube/serenity
synced 2025-05-16 20:05:07 +00:00
LibJS/Bytecode: Add support for new.target
This commit is contained in:
parent
fd235d8a06
commit
eac5534ce4
5 changed files with 46 additions and 0 deletions
|
@ -358,6 +358,12 @@ ThrowCompletionOr<void> ResolveThisBinding::execute_impl(Bytecode::Interpreter&
|
|||
return {};
|
||||
}
|
||||
|
||||
ThrowCompletionOr<void> GetNewTarget::execute_impl(Bytecode::Interpreter& interpreter) const
|
||||
{
|
||||
interpreter.accumulator() = interpreter.vm().get_new_target();
|
||||
return {};
|
||||
}
|
||||
|
||||
void Jump::replace_references_impl(BasicBlock const& from, BasicBlock const& to)
|
||||
{
|
||||
if (m_true_target.has_value() && &m_true_target->block() == &from)
|
||||
|
@ -976,4 +982,9 @@ String ResolveThisBinding::to_string_impl(Bytecode::Executable const&) const
|
|||
return "ResolveThisBinding"sv;
|
||||
}
|
||||
|
||||
String GetNewTarget::to_string_impl(Bytecode::Executable const&) const
|
||||
{
|
||||
return "GetNewTarget"sv;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue