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

LibJS: Remove implicit wrapping/unwrapping of completion records

This is an editorial change in the ECMA-262 spec, with similar changes
in some proposals.

See:
- 7575f74
- df899eb
- 9eb5a12
- c81f527
This commit is contained in:
Linus Groh 2022-05-02 20:54:39 +02:00
parent 15f32379bb
commit 9f3f3b0864
88 changed files with 792 additions and 735 deletions

View file

@ -50,7 +50,7 @@ static Optional<PropertyDescriptor> string_get_own_property(StringObject const&
if (property_key.is_symbol())
return {};
// 2. Let index be ! CanonicalNumericIndexString(P).
// 2. Let index be CanonicalNumericIndexString(P).
auto index = canonical_numeric_index_string(property_key, CanonicalIndexMode::IgnoreNumericRoundtrip);
// 3. If index is undefined, return undefined.
@ -94,7 +94,7 @@ ThrowCompletionOr<Optional<PropertyDescriptor>> StringObject::internal_get_own_p
if (descriptor.has_value())
return descriptor;
// 3. Return ! StringGetOwnProperty(S, P).
// 3. Return StringGetOwnProperty(S, P).
return string_get_own_property(*this, property_key);
}
@ -103,7 +103,7 @@ ThrowCompletionOr<bool> StringObject::internal_define_own_property(PropertyKey c
{
VERIFY(property_key.is_valid());
// 1. Let stringDesc be ! StringGetOwnProperty(S, P).
// 1. Let stringDesc be StringGetOwnProperty(S, P).
auto string_descriptor = string_get_own_property(*this, property_key);
// 2. If stringDesc is not undefined, then
@ -111,7 +111,7 @@ ThrowCompletionOr<bool> StringObject::internal_define_own_property(PropertyKey c
// a. Let extensible be S.[[Extensible]].
auto extensible = m_is_extensible;
// b. Return ! IsCompatiblePropertyDescriptor(extensible, Desc, stringDesc).
// b. Return IsCompatiblePropertyDescriptor(extensible, Desc, stringDesc).
return is_compatible_property_descriptor(extensible, property_descriptor, string_descriptor);
}