mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 17:57:35 +00:00
LibJS: Teach Reference to access call frame arguments directly
This commit is contained in:
parent
91fbeeab72
commit
6e0e8a8242
3 changed files with 20 additions and 0 deletions
|
@ -668,6 +668,8 @@ Reference Expression::to_reference(Interpreter&, GlobalObject&) const
|
|||
|
||||
Reference Identifier::to_reference(Interpreter& interpreter, GlobalObject&) const
|
||||
{
|
||||
if (m_argument_index.has_value())
|
||||
return Reference(Reference::CallFrameArgument, m_argument_index.value(), string());
|
||||
return interpreter.vm().get_reference(string());
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue