|
@@ -843,7 +843,7 @@ ThrowCompletionOr<FunctionObject*> Value::get_method(GlobalObject& global_object
|
|
// 13.10 Relational Operators, https://tc39.es/ecma262/#sec-relational-operators
|
|
// 13.10 Relational Operators, https://tc39.es/ecma262/#sec-relational-operators
|
|
Value greater_than(GlobalObject& global_object, Value lhs, Value rhs)
|
|
Value greater_than(GlobalObject& global_object, Value lhs, Value rhs)
|
|
{
|
|
{
|
|
- TriState relation = abstract_relation(global_object, false, lhs, rhs);
|
|
|
|
|
|
+ TriState relation = is_less_than(global_object, false, lhs, rhs);
|
|
if (relation == TriState::Unknown)
|
|
if (relation == TriState::Unknown)
|
|
return Value(false);
|
|
return Value(false);
|
|
return Value(relation == TriState::True);
|
|
return Value(relation == TriState::True);
|
|
@@ -852,7 +852,7 @@ Value greater_than(GlobalObject& global_object, Value lhs, Value rhs)
|
|
// 13.10 Relational Operators, https://tc39.es/ecma262/#sec-relational-operators
|
|
// 13.10 Relational Operators, https://tc39.es/ecma262/#sec-relational-operators
|
|
Value greater_than_equals(GlobalObject& global_object, Value lhs, Value rhs)
|
|
Value greater_than_equals(GlobalObject& global_object, Value lhs, Value rhs)
|
|
{
|
|
{
|
|
- TriState relation = abstract_relation(global_object, true, lhs, rhs);
|
|
|
|
|
|
+ TriState relation = is_less_than(global_object, true, lhs, rhs);
|
|
if (relation == TriState::Unknown || relation == TriState::True)
|
|
if (relation == TriState::Unknown || relation == TriState::True)
|
|
return Value(false);
|
|
return Value(false);
|
|
return Value(true);
|
|
return Value(true);
|
|
@@ -861,7 +861,7 @@ Value greater_than_equals(GlobalObject& global_object, Value lhs, Value rhs)
|
|
// 13.10 Relational Operators, https://tc39.es/ecma262/#sec-relational-operators
|
|
// 13.10 Relational Operators, https://tc39.es/ecma262/#sec-relational-operators
|
|
Value less_than(GlobalObject& global_object, Value lhs, Value rhs)
|
|
Value less_than(GlobalObject& global_object, Value lhs, Value rhs)
|
|
{
|
|
{
|
|
- TriState relation = abstract_relation(global_object, true, lhs, rhs);
|
|
|
|
|
|
+ TriState relation = is_less_than(global_object, true, lhs, rhs);
|
|
if (relation == TriState::Unknown)
|
|
if (relation == TriState::Unknown)
|
|
return Value(false);
|
|
return Value(false);
|
|
return Value(relation == TriState::True);
|
|
return Value(relation == TriState::True);
|
|
@@ -870,7 +870,7 @@ Value less_than(GlobalObject& global_object, Value lhs, Value rhs)
|
|
// 13.10 Relational Operators, https://tc39.es/ecma262/#sec-relational-operators
|
|
// 13.10 Relational Operators, https://tc39.es/ecma262/#sec-relational-operators
|
|
Value less_than_equals(GlobalObject& global_object, Value lhs, Value rhs)
|
|
Value less_than_equals(GlobalObject& global_object, Value lhs, Value rhs)
|
|
{
|
|
{
|
|
- TriState relation = abstract_relation(global_object, false, lhs, rhs);
|
|
|
|
|
|
+ TriState relation = is_less_than(global_object, false, lhs, rhs);
|
|
if (relation == TriState::Unknown || relation == TriState::True)
|
|
if (relation == TriState::Unknown || relation == TriState::True)
|
|
return Value(false);
|
|
return Value(false);
|
|
return Value(true);
|
|
return Value(true);
|
|
@@ -1492,7 +1492,7 @@ bool is_loosely_equal(GlobalObject& global_object, Value lhs, Value rhs)
|
|
}
|
|
}
|
|
|
|
|
|
// 7.2.13 IsLessThan ( x, y, LeftFirst ), https://tc39.es/ecma262/#sec-islessthan
|
|
// 7.2.13 IsLessThan ( x, y, LeftFirst ), https://tc39.es/ecma262/#sec-islessthan
|
|
-TriState abstract_relation(GlobalObject& global_object, bool left_first, Value lhs, Value rhs)
|
|
|
|
|
|
+TriState is_less_than(GlobalObject& global_object, bool left_first, Value lhs, Value rhs)
|
|
{
|
|
{
|
|
Value x_primitive;
|
|
Value x_primitive;
|
|
Value y_primitive;
|
|
Value y_primitive;
|