mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 16:07:46 +00:00
LibJS: Rename strict_eq() to is_strictly_equal()
This got turned into a proper AO with a new name recently.
See: 19d7ca4
This commit is contained in:
parent
bc5a04f798
commit
c7ff89891c
6 changed files with 12 additions and 12 deletions
|
@ -806,7 +806,7 @@ JS_DEFINE_NATIVE_FUNCTION(ArrayPrototype::index_of)
|
|||
return {};
|
||||
|
||||
// ii. Let same be IsStrictlyEqual(searchElement, elementK).
|
||||
auto same = strict_eq(search_element, element_k);
|
||||
auto same = is_strictly_equal(search_element, element_k);
|
||||
|
||||
// iii. If same is true, return 𝔽(k).
|
||||
if (same)
|
||||
|
@ -1302,7 +1302,7 @@ JS_DEFINE_NATIVE_FUNCTION(ArrayPrototype::last_index_of)
|
|||
return {};
|
||||
|
||||
// ii. Let same be IsStrictlyEqual(searchElement, elementK).
|
||||
auto same = strict_eq(search_element, element_k);
|
||||
auto same = is_strictly_equal(search_element, element_k);
|
||||
|
||||
// iii. If same is true, return 𝔽(k).
|
||||
if (same)
|
||||
|
|
|
@ -451,7 +451,7 @@ JS_DEFINE_NATIVE_FUNCTION(TypedArrayPrototype::index_of)
|
|||
if (k_present) {
|
||||
auto element_k = typed_array->get(k);
|
||||
|
||||
if (strict_eq(search_element, element_k))
|
||||
if (is_strictly_equal(search_element, element_k))
|
||||
return Value(k);
|
||||
}
|
||||
}
|
||||
|
@ -499,7 +499,7 @@ JS_DEFINE_NATIVE_FUNCTION(TypedArrayPrototype::last_index_of)
|
|||
if (k_present) {
|
||||
auto element_k = typed_array->get(k);
|
||||
|
||||
if (strict_eq(search_element, element_k))
|
||||
if (is_strictly_equal(search_element, element_k))
|
||||
return Value(k);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1405,7 +1405,7 @@ bool same_value_non_numeric(Value lhs, Value rhs)
|
|||
}
|
||||
|
||||
// 7.2.15 IsStrictlyEqual ( x, y ), https://tc39.es/ecma262/#sec-isstrictlyequal
|
||||
bool strict_eq(Value lhs, Value rhs)
|
||||
bool is_strictly_equal(Value lhs, Value rhs)
|
||||
{
|
||||
if (!same_type_for_equality(lhs, rhs))
|
||||
return false;
|
||||
|
@ -1430,7 +1430,7 @@ bool abstract_eq(GlobalObject& global_object, Value lhs, Value rhs)
|
|||
auto& vm = global_object.vm();
|
||||
|
||||
if (same_type_for_equality(lhs, rhs))
|
||||
return strict_eq(lhs, rhs);
|
||||
return is_strictly_equal(lhs, rhs);
|
||||
|
||||
if (lhs.is_nullish() && rhs.is_nullish())
|
||||
return true;
|
||||
|
|
|
@ -371,7 +371,7 @@ Value instance_of(GlobalObject&, Value lhs, Value rhs);
|
|||
Value ordinary_has_instance(GlobalObject&, Value lhs, Value rhs);
|
||||
|
||||
bool abstract_eq(GlobalObject&, Value lhs, Value rhs);
|
||||
bool strict_eq(Value lhs, Value rhs);
|
||||
bool is_strictly_equal(Value lhs, Value rhs);
|
||||
bool same_value(Value lhs, Value rhs);
|
||||
bool same_value_zero(Value lhs, Value rhs);
|
||||
bool same_value_non_numeric(Value lhs, Value rhs);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue