/arkcompiler/ets_runtime/ecmascript/tests/ |
D | js_tagged_number_test.cpp | 55 JSTaggedNumber number1(123); in HWTEST_F_L0() 56 JSTaggedNumber number2(-123); in HWTEST_F_L0() 57 JSTaggedNumber result = number1 - number2; in HWTEST_F_L0() 60 JSTaggedNumber number7(INT32_MAX); in HWTEST_F_L0() 61 JSTaggedNumber number8(-INT32_MAX); in HWTEST_F_L0() 63 EXPECT_EQ(result, JSTaggedNumber(static_cast<double>(4294967294))); in HWTEST_F_L0() 65 JSTaggedNumber number3(static_cast<double>(123.456)); in HWTEST_F_L0() 66 JSTaggedNumber number4(static_cast<double>(-123.456)); in HWTEST_F_L0() 68 EXPECT_EQ(result, JSTaggedNumber(static_cast<double>(246.912))); in HWTEST_F_L0() 70 JSTaggedNumber number5(NAN_VALUE); in HWTEST_F_L0() [all …]
|
D | template_map_test.cpp | 94 JSHandle<JSTaggedValue> tempMapKey(JSArray::ArrayCreate(thread, JSTaggedNumber(0))); in HWTEST_F_L0() 95 JSHandle<JSTaggedValue> tempMapKey1(JSArray::ArrayCreate(thread, JSTaggedNumber(1))); in HWTEST_F_L0() 297 JSHandle<JSTaggedValue> tempMapKey(JSArray::ArrayCreate(thread, JSTaggedNumber(i))); in HWTEST_F_L0() 326 JSHandle<JSTaggedValue> tempMapKey(JSArray::ArrayCreate(thread, JSTaggedNumber(i))); in HWTEST_F_L0() 353 JSHandle<JSTaggedValue> tempMapKey(JSArray::ArrayCreate(thread, JSTaggedNumber(i))); in HWTEST_F_L0() 359 JSHandle<JSTaggedValue> tempMapKey(JSArray::ArrayCreate(thread, JSTaggedNumber(i))); in HWTEST_F_L0()
|
D | js_array_test.cpp | 61 JSArray *arr = JSArray::ArrayCreate(thread, JSTaggedNumber(0)).GetObject<JSArray>(); in HWTEST_F_L0() 66 JSArray *arr2 = JSArray::ArrayCreate(thread, JSTaggedNumber(10)).GetObject<JSArray>(); in HWTEST_F_L0() 75 JSArray *arr = JSArray::ArrayCreate(thread, JSTaggedNumber(0)).GetObject<JSArray>(); in HWTEST_F_L0() 80 …JSArray *arr2 = JSArray::Cast(JSArray::ArraySpeciesCreate(thread, obj, JSTaggedNumber(10)).GetTagg… in HWTEST_F_L0() 91 JSArray *arr = JSArray::ArrayCreate(thread, JSTaggedNumber(0)).GetObject<JSArray>(); in HWTEST_F_L0()
|
/arkcompiler/ets_runtime/ecmascript/ |
D | js_tagged_number.h | 29 class JSTaggedNumber final : public JSTaggedValue { 31 constexpr JSTaggedNumber() = default; 32 explicit JSTaggedNumber(double v) : JSTaggedValue(v) {} in JSTaggedNumber() function 33 constexpr explicit JSTaggedNumber(int v) : JSTaggedValue(v) {} in JSTaggedNumber() function 34 explicit JSTaggedNumber(unsigned int v) : JSTaggedValue(v) {} in JSTaggedNumber() function 35 explicit JSTaggedNumber(JSTaggedValue v) : JSTaggedValue(v.GetRawData()) in JSTaggedNumber() function 40 ~JSTaggedNumber() = default; 41 DEFAULT_COPY_SEMANTIC(JSTaggedNumber); 42 DEFAULT_MOVE_SEMANTIC(JSTaggedNumber); 44 static inline constexpr JSTaggedNumber Exception() in Exception() [all …]
|
D | js_tagged_value-inl.h | 87 inline JSTaggedNumber JSTaggedValue::ToNumber(JSThread *thread, const JSHandle<JSTaggedValue> &tagg… in ToNumber() 90 return JSTaggedNumber(tagged.GetTaggedValue()); in ToNumber() 96 return JSTaggedNumber(base::NAN_VALUE); in ToNumber() 99 return JSTaggedNumber(1); in ToNumber() 103 return JSTaggedNumber(0); in ToNumber() 115 RETURN_VALUE_IF_ABRUPT_COMPLETION(thread, JSTaggedNumber::Exception()); in ToNumber() 119 …ERROR_AND_RETURN(thread, "Cannot convert a Symbol value to a number", JSTaggedNumber::Exception()); in ToNumber() 122 …ERROR_AND_RETURN(thread, "Cannot convert a BigInt value to a number", JSTaggedNumber::Exception()); in ToNumber() 124 …RROR_AND_RETURN(thread, "Cannot convert a Unknown value to a number", JSTaggedNumber::Exception()); in ToNumber() 149 …ERROR_AND_RETURN(thread, "Cannot convert a Number value to a BigInt", JSTaggedNumber::Exception()); in ToBigInt() [all …]
|
D | js_typed_array.cpp | 101 JSTaggedNumber numericIndexNumber = JSTaggedValue::ToNumber(thread, numericIndexHandle); in HasProperty() 104 auto eZero = JSTaggedNumber(tNegZero); in HasProperty() 106 if (JSTaggedNumber::SameValue(numericIndexNumber, eZero)) { in HasProperty() 165 JSTaggedNumber numericIndexNumber = JSTaggedValue::ToNumber(thread, numericIndexHandle); in DefineOwnProperty() 168 auto eZero = JSTaggedNumber(tNegZero); in DefineOwnProperty() 170 if (JSTaggedNumber::SameValue(numericIndexNumber, eZero)) { in DefineOwnProperty() 393 JSTaggedNumber indexNumber = JSTaggedValue::ToNumber(thread, indexHandle); in IntegerIndexedElementGet() 395 auto eZero = JSTaggedNumber(tNegZero); in IntegerIndexedElementGet() 397 if (JSTaggedNumber::SameValue(indexNumber, eZero)) { in IntegerIndexedElementGet() 602 JSTaggedNumber JSTypedArray::NonEcmaObjectToNumber(JSThread *thread, const JSTaggedValue tagged) in NonEcmaObjectToNumber() [all …]
|
D | js_array.h | 33 static JSHandle<JSTaggedValue> ArrayCreate(JSThread *thread, JSTaggedNumber length, 35 static JSHandle<JSTaggedValue> ArrayCreate(JSThread *thread, JSTaggedNumber length, 39 JSTaggedNumber length);
|
D | js_tagged_value.cpp | 138 JSTaggedNumber yNumber = ToNumber(thread, y); in Equal() 143 JSTaggedNumber yNumber = ToNumber(thread, y); in Equal() 165 JSTaggedNumber xNumber = ToNumber(thread, x); in Equal() 170 JSTaggedNumber xNumber = ToNumber(thread, x); in Equal() 172 JSTaggedNumber yNumber = ToNumber(thread, y); in Equal() 188 JSTaggedNumber xNumber = ToNumber(thread, x); in Equal() 322 JSTaggedNumber xNumber = ToNumber(thread, x); in Compare() 324 JSTaggedNumber yNumber = ToNumber(thread, y); in Compare() 975 JSTaggedNumber JSTaggedValue::ToIndex(JSThread *thread, const JSHandle<JSTaggedValue> &tagged) in ToIndex() 978 return JSTaggedNumber(tagged.GetTaggedValue()); in ToIndex() [all …]
|
D | js_tagged_value.h | 27 class JSTaggedNumber; variable 412 static JSTaggedNumber ToNumber(JSThread *thread, const JSHandle<JSTaggedValue> &tagged); 416 static JSTaggedNumber ToInteger(JSThread *thread, const JSHandle<JSTaggedValue> &tagged); 429 static JSTaggedNumber ToLength(JSThread *thread, const JSHandle<JSTaggedValue> &tagged); 431 static JSTaggedNumber ToIndex(JSThread *thread, const JSHandle<JSTaggedValue> &tagged); 432 static JSTaggedNumber StringToDouble(JSTaggedValue tagged);
|
/arkcompiler/ets_runtime/ecmascript/builtins/ |
D | builtins_number.cpp | 49 JSTaggedNumber numberValue(0); in NumberConstructor() 61 numberValue = JSTaggedNumber(numericVal.GetTaggedValue()); in NumberConstructor() 105 double value = JSTaggedNumber(msg.GetTaggedValue()).GetNumber(); in IsInteger() 107 JSTaggedNumber number = JSTaggedValue::ToInteger(thread, msg); in IsInteger() 143 double value = JSTaggedNumber(msg.GetTaggedValue()).GetNumber(); in IsSafeInteger() 145 JSTaggedNumber number = JSTaggedValue::ToInteger(thread, msg); in IsSafeInteger() 217 JSTaggedNumber value = ThisNumberValue(thread, argv); in ToExponential() 223 JSTaggedNumber digitInt = JSTaggedValue::ToInteger(thread, digits); in ToExponential() 265 JSTaggedNumber value = ThisNumberValue(thread, argv); in ToFixed() 270 JSTaggedNumber digitInt = JSTaggedValue::ToInteger(thread, digitArgv); in ToFixed() [all …]
|
D | builtins_math.cpp | 36 JSTaggedNumber numberValue = JSTaggedValue::ToNumber(thread, msg); in Abs() 55 JSTaggedNumber numberValue = JSTaggedValue::ToNumber(thread, msg); in Acos() 74 JSTaggedNumber numberValue = JSTaggedValue::ToNumber(thread, msg); in Acosh() 92 JSTaggedNumber numberValue = JSTaggedValue::ToNumber(thread, msg); in Asin() 110 JSTaggedNumber numberValue = JSTaggedValue::ToNumber(thread, msg); in Asinh() 129 JSTaggedNumber numberValue = JSTaggedValue::ToNumber(thread, msg); in Atan() 148 JSTaggedNumber numberValue = JSTaggedValue::ToNumber(thread, msg); in Atanh() 168 JSTaggedNumber numberValueY = JSTaggedValue::ToNumber(thread, msgY); in Atan2() 170 JSTaggedNumber numberValueX = JSTaggedValue::ToNumber(thread, msgX); in Atan2() 197 JSTaggedNumber numberValue = JSTaggedValue::ToNumber(thread, msg); in Cbrt() [all …]
|
D | builtins_date_time_format.cpp | 166 JSTaggedNumber xNumber = JSTaggedValue::ToNumber(thread, date); in AnonymousDateTimeFormat() 199 JSTaggedNumber xNumber = JSTaggedValue::ToNumber(thread, date); in FormatToParts() 274 JSTaggedNumber valueX = JSTaggedValue::ToNumber(thread, startDate); in FormatRange() 279 JSTaggedNumber valueY = JSTaggedValue::ToNumber(thread, endDate); in FormatRange() 321 JSTaggedNumber valueX = JSTaggedValue::ToNumber(thread, startDate); in FormatRangeToParts() 326 JSTaggedNumber valueY = JSTaggedValue::ToNumber(thread, endDate); in FormatRangeToParts()
|
D | builtins_number.h | 56 static JSTaggedNumber ThisNumberValue(JSThread *thread, EcmaRuntimeCallInfo *argv);
|
D | builtins_array.cpp | 69 return JSArray::ArrayCreate(thread, JSTaggedNumber(0), newTarget).GetTaggedValue(); in ArrayConstructor() 76 …JSHandle<JSObject> newArrayHandle(JSArray::ArrayCreate(thread, JSTaggedNumber(newLen), newTarget)); in ArrayConstructor() 95 if (JSTaggedNumber(len.GetTaggedValue()).GetNumber() != newLen) { in ArrayConstructor() 106 …JSTaggedValue newArray = JSArray::ArrayCreate(thread, JSTaggedNumber(argc), newTarget).GetTaggedVa… in ArrayConstructor() 188 newArray = JSArray::ArrayCreate(thread, JSTaggedNumber(0)).GetTaggedValue(); in From() 276 …newArray = JSArray::ArrayCreate(thread, JSTaggedNumber(static_cast<double>(len))).GetTaggedValue(); in From() 366 newArray = JSArray::ArrayCreate(thread, JSTaggedNumber(argc)); in Of() 422 …JSTaggedValue newArray = JSArray::ArraySpeciesCreate(thread, thisObjHandle, JSTaggedNumber(arrayLe… in Concat() 540 JSTaggedNumber targetTemp = JSTaggedValue::ToInteger(thread, GetCallArg(argv, 0)); in CopyWithin() 552 JSTaggedNumber start_t = JSTaggedValue::ToInteger(thread, GetCallArg(argv, 1)); in CopyWithin() [all …]
|
D | builtins_sharedarraybuffer.cpp | 46 JSTaggedNumber lenNum = JSTaggedValue::ToIndex(thread, lengthHandle); in SharedArrayBufferConstructor() 185 JSTaggedNumber relativeStart = JSTaggedValue::ToInteger(thread, startHandle); in Slice() 203 JSTaggedNumber relativeEnd = JSTaggedValue::ToInteger(thread, endHandle); in Slice()
|
D | builtins_bigint.cpp | 60 JSTaggedNumber index = JSTaggedValue::ToIndex(thread, bits); in AsUintN() 78 JSTaggedNumber index = JSTaggedValue::ToIndex(thread, bits); in AsIntN() 168 JSTaggedNumber radixNumber = JSTaggedValue::ToInteger(thread, radixValue); in ToString()
|
D | builtins_string.cpp | 143 JSTaggedNumber nextCpVal = JSTaggedValue::ToNumber(thread, nextCpTag); in FromCodePoint() 202 JSTaggedNumber lengthNumber = JSTaggedValue::ToLength(thread, rawLen); in Raw() 262 JSTaggedNumber posVal = JSTaggedValue::ToInteger(thread, posTag); in CharAt() 293 JSTaggedNumber posVal = JSTaggedValue::ToInteger(thread, posTag); in CharCodeAt() 318 JSTaggedNumber posVal = JSTaggedValue::ToNumber(thread, posTag); in CodePointAt() 404 JSTaggedNumber posVal = JSTaggedValue::ToInteger(thread, posTag); in EndsWith() 445 JSTaggedNumber posVal = JSTaggedValue::ToNumber(thread, posTag); in Includes() 479 JSTaggedNumber posVal = JSTaggedValue::ToInteger(thread, posTag); in IndexOf() 511 JSTaggedNumber posVal = JSTaggedValue::ToInteger(thread, posTag); in LastIndexOf() 794 JSTaggedNumber num = JSTaggedValue::ToInteger(thread, countTag); in Repeat() [all …]
|
D | builtins_relative_time_format.cpp | 106 JSTaggedNumber temp = JSTaggedValue::ToNumber(thread, value); in Format() 139 JSTaggedNumber temp = JSTaggedValue::ToNumber(thread, value); in FormatToParts()
|
/arkcompiler/ets_runtime/ecmascript/base/tests/ |
D | array_helper_test.cpp | 124 JSArray *handleArr = JSArray::ArrayCreate(thread, JSTaggedNumber(10)).GetObject<JSArray>(); in HWTEST_F_L0() 141 … JSTaggedNumber(100.0).GetNumber()); in HWTEST_F_L0() 158 JSArray *handleArr = JSArray::ArrayCreate(thread, JSTaggedNumber(0)).GetObject<JSArray>(); in HWTEST_F_L0() 168 … JSTaggedNumber(10.0).GetNumber()); in HWTEST_F_L0()
|
/arkcompiler/ets_runtime/ecmascript/base/ |
D | typed_array_helper.cpp | 62 JSTaggedNumber index = JSTaggedValue::ToIndex(thread, firstArg); in TypedArrayConstructor() 172 JSTaggedNumber lenTemp = in CreateFromOrdinaryObject() 316 JSTaggedNumber index = JSTaggedValue::ToIndex(thread, byteOffset); in CreateFromArrayBuffer() 613 JSTaggedNumber v = JSTaggedValue::ToNumber(thread, testResult); in SortCompare() 646 JSTaggedNumber xNumber = JSTaggedValue::ToNumber(thread, firstValue); in SortCompare() 648 JSTaggedNumber yNumber = JSTaggedValue::ToNumber(thread, secondValue); in SortCompare() 651 auto eZero = JSTaggedNumber(eZeroTemp); in SortCompare() 653 auto pZero = JSTaggedNumber(pZeroTemp); in SortCompare() 654 … if (JSTaggedNumber::SameValue(xNumber, eZero) && JSTaggedNumber::SameValue(yNumber, pZero)) { in SortCompare() 657 … if (JSTaggedNumber::SameValue(xNumber, pZero) && JSTaggedNumber::SameValue(yNumber, eZero)) { in SortCompare()
|
D | array_helper.cpp | 98 JSTaggedNumber v = JSTaggedValue::ToNumber(thread, testResult); in SortCompare() 138 JSTaggedNumber len = JSTaggedValue::ToLength(thread, lenResult); in GetLength() 151 JSTaggedNumber len = JSTaggedValue::ToLength(thread, lenResult); in GetArrayLength() 235 JSTaggedNumber targetIndexTemp = JSTaggedValue::ToNumber(thread, targetIndexHandle); in FlattenIntoArray()
|
D | atomic_helper.cpp | 69 JSTaggedNumber accessIndex = JSTaggedValue::ToIndex(thread, requestIndex); in ValidateAtomicAccess() 112 JSTaggedNumber integerValue = JSTaggedValue::ToInteger(thread, value); in AtomicStore()
|
/arkcompiler/ets_runtime/ecmascript/ic/ |
D | ic_binary_op.h | 58 JSTaggedNumber taggedValueA0 = JSTaggedValue::ToNumber(thread, primitiveA0); in AddWithTSType() 60 JSTaggedNumber taggedValueA1 = JSTaggedValue::ToNumber(thread, primitiveA1); in AddWithTSType() 123 JSTaggedNumber number0 = JSTaggedValue::ToNumber(thread, leftValue); in SubWithTSType() 125 JSTaggedNumber number1 = JSTaggedValue::ToNumber(thread, rightValue); in SubWithTSType() 154 JSTaggedNumber primitiveA = JSTaggedValue::ToNumber(thread, leftValue); in MulWithTSType() 158 JSTaggedNumber primitiveB = JSTaggedValue::ToNumber(thread, rightValue); in MulWithTSType() 232 JSTaggedNumber leftNumber = JSTaggedValue::ToNumber(thread, leftValue); in ModWithTSType() 235 JSTaggedNumber rightNumber = JSTaggedValue::ToNumber(thread, rightValue); in ModWithTSType()
|
/arkcompiler/ets_runtime/ecmascript/builtins/tests/ |
D | builtins_array_test.cpp | 127 … JSArray::Cast(JSArray::ArrayCreate(thread, JSTaggedNumber(0)).GetTaggedValue().GetTaggedObject()); in TestFlatMapFunc() 266 … JSArray *arr = JSArray::Cast(JSArray::ArrayCreate(thread, JSTaggedNumber(0))->GetTaggedObject()); in HWTEST_F_L0() 315 …JSArray *arr = JSArray::Cast(JSArray::ArrayCreate(thread, JSTaggedNumber(0)).GetTaggedValue().GetT… in HWTEST_F_L0() 394 …JSArray *arr = JSArray::Cast(JSArray::ArrayCreate(thread, JSTaggedNumber(0)).GetTaggedValue().GetT… in HWTEST_F_L0() 407 JSArray *arr1 = JSArray::ArrayCreate(thread, JSTaggedNumber(0)).GetObject<JSArray>(); in HWTEST_F_L0() 444 …JSArray *arr = JSArray::Cast(JSArray::ArrayCreate(thread, JSTaggedNumber(0)).GetTaggedValue().GetT… in HWTEST_F_L0() 498 …JSArray *arr = JSArray::Cast(JSArray::ArrayCreate(thread, JSTaggedNumber(0)).GetTaggedValue().GetT… in HWTEST_F_L0() 537 …JSArray *arr = JSArray::Cast(JSArray::ArrayCreate(thread, JSTaggedNumber(0)).GetTaggedValue().GetT… in HWTEST_F_L0() 550 JSHandle<JSArray> jsArray(JSArray::ArrayCreate(thread, JSTaggedNumber(0))); in HWTEST_F_L0() 581 …JSArray *arr = JSArray::Cast(JSArray::ArrayCreate(thread, JSTaggedNumber(0)).GetTaggedValue().GetT… in HWTEST_F_L0() [all …]
|
D | builtins_list_format_test.cpp | 146 JSArray *arr = JSArray::ArrayCreate(thread, JSTaggedNumber(0)).GetObject<JSArray>(); in HWTEST_F_L0() 184 JSArray *arr = JSArray::ArrayCreate(thread, JSTaggedNumber(0)).GetObject<JSArray>(); in HWTEST_F_L0() 220 JSArray *arr = JSArray::ArrayCreate(thread, JSTaggedNumber(0)).GetObject<JSArray>(); in HWTEST_F_L0() 252 JSArray *arr = JSArray::ArrayCreate(thread, JSTaggedNumber(0)).GetObject<JSArray>(); in HWTEST_F_L0() 311 JSArray *arr = JSArray::ArrayCreate(thread, JSTaggedNumber(0)).GetObject<JSArray>(); in HWTEST_F_L0() 350 JSArray *arr = JSArray::ArrayCreate(thread, JSTaggedNumber(0)).GetObject<JSArray>(); in HWTEST_F_L0() 389 JSArray *arr = JSArray::ArrayCreate(thread, JSTaggedNumber(0)).GetObject<JSArray>(); in HWTEST_F_L0() 427 JSArray *arr = JSArray::ArrayCreate(thread, JSTaggedNumber(0)).GetObject<JSArray>(); in HWTEST_F_L0()
|