mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 04:17:35 +00:00
LibJS: Rename Reference methods to match the spec
- get -> get_value (GetValue in the spec) - put -> put_value (PutValue in the spec) Also add spec links. :^)
This commit is contained in:
parent
bce7fdba81
commit
7b28fa99ba
3 changed files with 13 additions and 11 deletions
|
@ -11,7 +11,8 @@
|
|||
|
||||
namespace JS {
|
||||
|
||||
void Reference::put(GlobalObject& global_object, Value value)
|
||||
// 6.2.4.6 PutValue ( V, W ), https://tc39.es/ecma262/#sec-putvalue
|
||||
void Reference::put_value(GlobalObject& global_object, Value value)
|
||||
{
|
||||
auto& vm = global_object.vm();
|
||||
|
||||
|
@ -71,7 +72,8 @@ void Reference::throw_reference_error(GlobalObject& global_object)
|
|||
vm.throw_exception<ReferenceError>(global_object, ErrorType::UnknownIdentifier, m_name.to_string_or_symbol().to_display_string());
|
||||
}
|
||||
|
||||
Value Reference::get(GlobalObject& global_object, bool throw_if_undefined)
|
||||
// 6.2.4.5 GetValue ( V ), https://tc39.es/ecma262/#sec-getvalue
|
||||
Value Reference::get_value(GlobalObject& global_object, bool throw_if_undefined)
|
||||
{
|
||||
if (is_unresolvable()) {
|
||||
throw_reference_error(global_object);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue