1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 14:28:12 +00:00

LibJS: Improve ResolveBinding + add GetIdentifierReference

ResolveBinding now matches the spec, while the non-conforming parts
are moved to GetIdentifierReference.

Implementing this properly requires variable bindings.
This commit is contained in:
Andreas Kling 2021-07-02 21:54:56 +02:00
parent 4b87dd5c5c
commit fd43d1e205
3 changed files with 36 additions and 9 deletions

View file

@ -713,9 +713,9 @@ Reference Expression::to_reference(Interpreter&, GlobalObject&) const
return {};
}
Reference Identifier::to_reference(Interpreter& interpreter, GlobalObject& global_object) const
Reference Identifier::to_reference(Interpreter& interpreter, GlobalObject&) const
{
return interpreter.vm().resolve_binding(global_object, string());
return interpreter.vm().resolve_binding(string());
}
Reference MemberExpression::to_reference(Interpreter& interpreter, GlobalObject& global_object) const