1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 21:57:43 +00:00

LibJS: Rename virtuals in EnvironmentRecord

This patch makes the following renames:

- get_from_scope() => get_from_environment_record()
- put_to_scope() => put_into_environment_record()
- delete_from_scope() => delete_from_environment_record()
This commit is contained in:
Andreas Kling 2021-06-21 23:41:38 +02:00
parent 5edd259b0a
commit d407f247b7
10 changed files with 32 additions and 31 deletions

View file

@ -328,7 +328,7 @@ JS_DEFINE_NATIVE_FUNCTION(GlobalObject::parse_int)
return Value(sign * number);
}
Optional<Variable> GlobalObject::get_from_scope(const FlyString& name) const
Optional<Variable> GlobalObject::get_from_environment_record(FlyString const& name) const
{
auto value = get(name);
if (value.is_empty())
@ -336,12 +336,12 @@ Optional<Variable> GlobalObject::get_from_scope(const FlyString& name) const
return Variable { value, DeclarationKind::Var };
}
void GlobalObject::put_to_scope(const FlyString& name, Variable variable)
void GlobalObject::put_into_environment_record(FlyString const& name, Variable variable)
{
put(name, variable.value);
}
bool GlobalObject::delete_from_scope(FlyString const& name)
bool GlobalObject::delete_from_environment_record(FlyString const& name)
{
return delete_property(name);
}