mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 12:38:12 +00:00
LibJS: Rename VM::get_reference() => resolve_binding()
This function maps to the ResolveBinding operation from the spec, so let's rename it to match.
This commit is contained in:
parent
2b4cab284c
commit
07acdc7be2
3 changed files with 6 additions and 3 deletions
|
@ -392,8 +392,11 @@ Value VM::get_variable(const FlyString& name, GlobalObject& global_object)
|
|||
return value;
|
||||
}
|
||||
|
||||
Reference VM::get_reference(const FlyString& name)
|
||||
// 9.4.2 ResolveBinding ( name [ , env ] ), https://tc39.es/ecma262/#sec-resolvebinding
|
||||
Reference VM::resolve_binding(FlyString const& name)
|
||||
{
|
||||
// FIXME: This implementation of ResolveBinding is non-conforming.
|
||||
|
||||
for (auto* environment_record = lexical_environment(); environment_record && environment_record->outer_environment(); environment_record = environment_record->outer_environment()) {
|
||||
auto possible_match = environment_record->get_from_environment_record(name);
|
||||
if (possible_match.has_value())
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue