/arkcompiler/ets_runtime/ecmascript/ic/ |
D | ic_compare_op.cpp | 222 ComparisonResult CompareOp::Compare(JSThread *thread, JSTaggedValue left, in Compare() 228 ComparisonResult ret = ComparisonResult::UNDEFINED; in Compare() 241 RETURN_VALUE_IF_ABRUPT_COMPLETION(thread, ComparisonResult::UNDEFINED); in Compare() 258 RETURN_VALUE_IF_ABRUPT_COMPLETION(thread, ComparisonResult::UNDEFINED); in Compare() 276 ret = ComparisonResult::LESS; in Compare() 278 ret = ComparisonResult::EQUAL; in Compare() 280 ret = ComparisonResult::GREAT; in Compare() 288 RETURN_VALUE_IF_ABRUPT_COMPLETION(thread, ComparisonResult::UNDEFINED); in Compare() 297 RETURN_VALUE_IF_ABRUPT_COMPLETION(thread, ComparisonResult::UNDEFINED); in Compare() 308 RETURN_VALUE_IF_ABRUPT_COMPLETION(thread, ComparisonResult::UNDEFINED); in Compare() [all …]
|
D | ic_compare_op.h | 62 static ComparisonResult Compare(JSThread *thread, JSTaggedValue left,
|
/arkcompiler/ets_runtime/ecmascript/ |
D | js_bigint.cpp | 790 ComparisonResult BigInt::Compare(const JSTaggedValue &x, const JSTaggedValue &y) in Compare() 797 ComparisonResult BigInt::Compare(const BigInt *x, const BigInt *y) in Compare() 802 return xSign ? ComparisonResult::LESS : ComparisonResult::GREAT; in Compare() 804 ComparisonResult compar = AbsolutelyCompare(x, y); in Compare() 805 if (xSign && compar != ComparisonResult::EQUAL) { in Compare() 806 return compar == ComparisonResult::LESS ? ComparisonResult::GREAT : ComparisonResult::LESS; in Compare() 813 return Compare(x, y) == ComparisonResult::LESS; in LessThan() 820 return Compare(x, y) == ComparisonResult::LESS; in LessThan() 1154 ComparisonResult BigInt::AbsolutelyCompare(const BigInt *x, const BigInt *y) in AbsolutelyCompare() 1159 return ComparisonResult::GREAT; in AbsolutelyCompare() [all …]
|
D | tagged_tree.h | 134 …inline static ComparisonResult EntryCompare(JSThread *thread, const JSHandle<JSTaggedValue> valueX, in EntryCompare() 148 RETURN_VALUE_IF_ABRUPT_COMPLETION(thread, ComparisonResult::UNDEFINED); in EntryCompare() 151 RETURN_VALUE_IF_ABRUPT_COMPLETION(thread, ComparisonResult::UNDEFINED); in EntryCompare() 158 RETURN_VALUE_IF_ABRUPT_COMPLETION(thread, ComparisonResult::UNDEFINED); in EntryCompare() 161 …W_TYPE_ERROR_AND_RETURN(thread, "CompareFn has illegal return value", ComparisonResult::UNDEFINED); in EntryCompare() 165 return compareResult > 0 ? ComparisonResult::GREAT : in EntryCompare() 166 … (compareResult < 0 ? ComparisonResult::LESS : ComparisonResult::EQUAL); in EntryCompare() 376 …inline static ComparisonResult OrdinayEntryCompare(JSThread *thread, const JSHandle<JSTaggedValue>… in OrdinayEntryCompare() 384 return ComparisonResult::LESS; in OrdinayEntryCompare() 387 return ComparisonResult::EQUAL; in OrdinayEntryCompare() [all …]
|
D | tagged_tree.cpp | 314 ComparisonResult res; in FindEntry() 318 if (res == ComparisonResult::EQUAL) { in FindEntry() 320 } else if (res == ComparisonResult::LESS) { in FindEntry() 373 ComparisonResult res; in Insert() 377 if (res == ComparisonResult::EQUAL) { in Insert() 380 } else if (res == ComparisonResult::LESS) { in Insert() 397 if (res != ComparisonResult::LESS) { in Insert() 430 ComparisonResult res; in GetLowerKey() 434 if (res == ComparisonResult::GREAT) { in GetLowerKey() 453 ComparisonResult res; in GetHigherKey() [all …]
|
D | js_bigint.h | 29 enum class ComparisonResult; variable 91 static ComparisonResult Compare(const JSTaggedValue &x, const JSTaggedValue &y); 118 …static ComparisonResult CompareWithNumber(JSHandle<BigInt> bigint, JSHandle<JSTaggedValue> number); 172 static ComparisonResult Compare(const BigInt *x, const BigInt *y); 173 static ComparisonResult AbsolutelyCompare(const BigInt *x, const BigInt *y);
|
D | js_tagged_value.cpp | 226 return BigInt::CompareWithNumber(bigint, y) == ComparisonResult::EQUAL; in Equal() 272 ComparisonResult JSTaggedValue::Compare(JSThread *thread, const JSHandle<JSTaggedValue> &x, in Compare() 281 RETURN_VALUE_IF_ABRUPT_COMPLETION(thread, ComparisonResult::UNDEFINED); in Compare() 283 RETURN_VALUE_IF_ABRUPT_COMPLETION(thread, ComparisonResult::UNDEFINED); in Compare() 289 return ComparisonResult::LESS; in Compare() 292 return ComparisonResult::EQUAL; in Compare() 294 return ComparisonResult::GREAT; in Compare() 303 return ComparisonResult::UNDEFINED; in Compare() 308 RETURN_VALUE_IF_ABRUPT_COMPLETION(thread, ComparisonResult::UNDEFINED); in Compare() 313 ComparisonResult res = Compare(thread, primY, primX); in Compare() [all …]
|
D | js_tagged_value-inl.h | 388 ComparisonResult result = Compare(thread, x, y); in Less() 389 return result == ComparisonResult::LESS; in Less() 440 inline ComparisonResult JSTaggedValue::StrictNumberCompare(double x, double y) in StrictNumberCompare() 443 return ComparisonResult::UNDEFINED; in StrictNumberCompare() 446 return ComparisonResult::LESS; in StrictNumberCompare() 449 return ComparisonResult::GREAT; in StrictNumberCompare() 451 return ComparisonResult::EQUAL; in StrictNumberCompare()
|
D | js_array.cpp | 452 ComparisonResult res = JSTaggedValue::Compare(thread, vv, value); in IncludeInSortedValue() 453 if (res == ComparisonResult::EQUAL) { in IncludeInSortedValue() 455 } else if (res == ComparisonResult::LESS) { in IncludeInSortedValue()
|
D | js_tagged_value.h | 45 enum class ComparisonResult { enum 697 static ComparisonResult Compare(JSThread *thread, const JSHandle<JSTaggedValue> &x, 699 static ComparisonResult StrictNumberCompare(double x, double y);
|
/arkcompiler/ets_runtime/ecmascript/base/ |
D | array_helper.cpp | 117 ComparisonResult compareResult = JSTaggedValue::Compare(thread, xValueHandle, yValueHandle); in SortCompare() 118 if (compareResult == ComparisonResult::GREAT) { in SortCompare() 121 if (compareResult == ComparisonResult::LESS) { in SortCompare()
|
D | typed_array_helper.cpp | 634 ComparisonResult compareResult = JSTaggedValue::Compare(thread, firstValue, secondValue); in SortCompare() 640 if (compareResult == ComparisonResult::LESS) { in SortCompare() 643 if (compareResult == ComparisonResult::GREAT) { in SortCompare() 661 ComparisonResult compareResult = JSTaggedValue::Compare(thread, firstValue, secondValue); in SortCompare() 662 if (compareResult == ComparisonResult::LESS) { in SortCompare() 665 if (compareResult == ComparisonResult::GREAT) { in SortCompare()
|
/arkcompiler/ets_runtime/ecmascript/tests/ |
D | js_bigint_test.cpp | 68 …EXPECT_EQ(BigInt::Compare(bigint1.GetTaggedValue(), bigint1.GetTaggedValue()), ComparisonResult::E… in HWTEST_F_L0() 69 …EXPECT_EQ(BigInt::Compare(bigint3.GetTaggedValue(), bigint2.GetTaggedValue()), ComparisonResult::L… in HWTEST_F_L0() 70 …EXPECT_EQ(BigInt::Compare(bigint1.GetTaggedValue(), bigint2.GetTaggedValue()), ComparisonResult::L… in HWTEST_F_L0() 71 …EXPECT_EQ(BigInt::Compare(bigint2.GetTaggedValue(), bigint1.GetTaggedValue()), ComparisonResult::G… in HWTEST_F_L0() 72 …EXPECT_EQ(BigInt::Compare(bigint2.GetTaggedValue(), bigint3.GetTaggedValue()), ComparisonResult::G… in HWTEST_F_L0() 73 …EXPECT_EQ(BigInt::Compare(bigint3.GetTaggedValue(), bigint4.GetTaggedValue()), ComparisonResult::L… in HWTEST_F_L0() 74 …EXPECT_EQ(BigInt::Compare(bigint4.GetTaggedValue(), bigint3.GetTaggedValue()), ComparisonResult::G… in HWTEST_F_L0() 77 …EXPECT_EQ(BigInt::Compare(zero.GetTaggedValue(), bigint1.GetTaggedValue()), ComparisonResult::LESS… in HWTEST_F_L0() 78 …EXPECT_EQ(BigInt::Compare(bigint1.GetTaggedValue(), zero.GetTaggedValue()), ComparisonResult::GREA… in HWTEST_F_L0() 79 … EXPECT_EQ(BigInt::Compare(zero.GetTaggedValue(), zero.GetTaggedValue()), ComparisonResult::EQUAL); in HWTEST_F_L0() [all …]
|
D | tagged_tree_test.cpp | 91 ComparisonResult res = ComparisonResult::UNDEFINED; in TestCompareFunction() 97 return res == ComparisonResult::GREAT ? in TestCompareFunction() 98 … JSTaggedValue(1) : (res == ComparisonResult::LESS ? JSTaggedValue(-1) : JSTaggedValue(0)); in TestCompareFunction() 151 ComparisonResult result = TaggedTree<T>::EntryCompare(thread, leftKey, indexKey, tree); in IsVaildRBTree() 152 if (tree->GetParent(ileft) != index || result != ComparisonResult::LESS) { in IsVaildRBTree() 160 ComparisonResult result = TaggedTree<T>::EntryCompare(thread, rightKey, indexKey, tree); in IsVaildRBTree() 161 if (tree->GetParent(iright) != index || result != ComparisonResult::GREAT) { in IsVaildRBTree()
|
/arkcompiler/ets_runtime/ecmascript/containers/tests/ |
D | containers_treeset_test.cpp | 101 ComparisonResult res = ComparisonResult::UNDEFINED; in TestCompareFunction() 107 return res == ComparisonResult::GREAT ? in TestCompareFunction() 108 … JSTaggedValue(1) : (res == ComparisonResult::LESS ? JSTaggedValue(-1) : JSTaggedValue(0)); in TestCompareFunction()
|
D | containers_treemap_test.cpp | 104 ComparisonResult res = ComparisonResult::UNDEFINED; in TestCompareFunction() 110 return res == ComparisonResult::GREAT ? in TestCompareFunction() 111 … JSTaggedValue(1) : (res == ComparisonResult::LESS ? JSTaggedValue(-1) : JSTaggedValue(0)); in TestCompareFunction()
|
/arkcompiler/ets_runtime/ecmascript/stubs/ |
D | runtime_stubs-inl.h | 1452 bool ret = JSTaggedValue::Compare(thread, left, right) == ComparisonResult::LESS; in RuntimeLess() 1460 bool ret = JSTaggedValue::Compare(thread, left, right) <= ComparisonResult::EQUAL; in RuntimeLessEq() 1468 bool ret = JSTaggedValue::Compare(thread, left, right) == ComparisonResult::GREAT; in RuntimeGreater() 1476 ComparisonResult comparison = JSTaggedValue::Compare(thread, left, right); in RuntimeGreaterEq() 1477 bool ret = (comparison == ComparisonResult::GREAT) || (comparison == ComparisonResult::EQUAL); in RuntimeGreaterEq()
|
/arkcompiler/ets_runtime/ecmascript/interpreter/ |
D | interpreter-inl.h | 1807 bool ret = JSTaggedValue::StrictNumberCompare(valueA, valueB) == ComparisonResult::LESS; in RunInternal() 1831 … bool ret = JSTaggedValue::StrictNumberCompare(valueA, valueB) <= ComparisonResult::EQUAL; in RunInternal() 1856 … bool ret = JSTaggedValue::StrictNumberCompare(valueA, valueB) == ComparisonResult::GREAT; in RunInternal() 1880 ComparisonResult comparison = JSTaggedValue::StrictNumberCompare(valueA, valueB); in RunInternal() 1881 … bool ret = (comparison == ComparisonResult::GREAT) || (comparison == ComparisonResult::EQUAL); in RunInternal()
|
D | interpreter_assembly.cpp | 1129 bool ret = JSTaggedValue::StrictNumberCompare(valueA, valueB) == ComparisonResult::LESS; in HandleLessImm8V8() 1161 bool ret = JSTaggedValue::StrictNumberCompare(valueA, valueB) <= ComparisonResult::EQUAL; in HandleLesseqImm8V8() 1194 bool ret = JSTaggedValue::StrictNumberCompare(valueA, valueB) == ComparisonResult::GREAT; in HandleGreaterImm8V8() 1226 ComparisonResult comparison = JSTaggedValue::StrictNumberCompare(valueA, valueB); in HandleGreatereqImm8V8() 1227 … bool ret = (comparison == ComparisonResult::GREAT) || (comparison == ComparisonResult::EQUAL); in HandleGreatereqImm8V8()
|