/ark/js_runtime/ecmascript/ |
D | js_tagged_number.h | 68 return base::NumberHelper::DoubleToInt(GetNumber(), base::INT16_BITS); in ToInt16() 78 return base::NumberHelper::DoubleToInt(GetNumber(), base::INT8_BITS); in ToInt8() 102 return JSTaggedNumber(GetNumber() - number.GetNumber()); 116 return JSTaggedNumber(GetNumber() * number.GetNumber()); 145 return GetNumber() != number.GetNumber(); 151 double xValue = x.GetNumber(); in SameValue() 152 double yValue = y.GetNumber(); in SameValue()
|
D | js_tagged_value-inl.h | 221 return JSTaggedNumber(base::NumberHelper::TruncateDouble(number.GetNumber())); in ToInteger() 228 return base::NumberHelper::DoubleToInt(number.GetNumber(), base::INT32_BITS); in ToInt32() 241 return base::NumberHelper::DoubleToInt(number.GetNumber(), base::INT16_BITS); in ToInt16() 254 return base::NumberHelper::DoubleToInt(number.GetNumber(), base::INT8_BITS); in ToInt8() 267 double d = number.GetNumber(); in ToUint8Clamp() 282 if (len.GetNumber() < 0.0) { in ToLength() 285 if (len.GetNumber() > SAFE_NUMBER) { in ToLength() 994 return GetNumber(); in ExtractNumber()
|
D | tagged_dictionary.h | 111 return a.GetNumber() < b.GetNumber(); in CompKey()
|
D | js_tagged_value.cpp | 91 double doubleValue = GetNumber(); in WithinInt32() 121 return StrictNumberEquals(x->ExtractNumber(), yNumber.GetNumber()); in Equal() 126 return StrictNumberEquals(x->ExtractNumber(), yNumber.GetNumber()); in Equal() 147 return StrictNumberEquals(xNumber.GetNumber(), y->ExtractNumber()); in Equal() 154 return StrictNumberEquals(xNumber.GetNumber(), yNumber.GetNumber()); in Equal() 301 return StrictNumberCompare(xNumber.GetNumber(), yNumber.GetNumber()); in Compare() 806 double len = base::NumberHelper::TruncateDouble(integerIndex.GetNumber()); in ToIndex()
|
D | js_date.cpp | 531 year = yearValue.GetNumber(); in UTC() 548 month = res.GetNumber(); in UTC() 555 date = res.GetNumber(); in UTC() 562 hours = res.GetNumber(); in UTC() 569 minutes = res.GetNumber(); in UTC() 576 seconds = res.GetNumber(); in UTC() 583 ms = res.GetNumber(); in UTC() 979 double temp = res.GetNumber(); in SetDateValue()
|
/ark/js_runtime/ecmascript/builtins/ |
D | builtins_math.cpp | 56 double value = numberValue.GetNumber(); in Acos() 74 double value = numberValue.GetNumber(); in Acosh() 91 double value = numberValue.GetNumber(); in Asin() 108 double value = numberValue.GetNumber(); in Asinh() 126 double value = numberValue.GetNumber(); in Atan() 144 double value = numberValue.GetNumber(); in Atanh() 164 double valueY = numberValueY.GetNumber(); in Atan2() 165 double valueX = numberValueX.GetNumber(); in Atan2() 190 double value = numberValue.GetNumber(); in Cbrt() 208 double value = numberValue.GetNumber(); in Ceil() [all …]
|
D | builtins_number.cpp | 99 double value = JSTaggedNumber(msg.GetTaggedValue()).GetNumber(); in IsInteger() 104 result = (value == number.GetNumber()); in IsInteger() 136 double value = JSTaggedNumber(msg.GetTaggedValue()).GetNumber(); in IsSafeInteger() 141 result = (value == number.GetNumber()) && std::abs(value) <= base::MAX_SAFE_INTEGER; in IsSafeInteger() 235 double values = value.GetNumber(); in ToExponential() 254 double fraction = digitInt.GetNumber(); in ToExponential() 285 double digit = digitInt.GetNumber(); in ToFixed() 291 double valueNumber = value.GetNumber(); in ToFixed() 371 double valueNumber = value.GetNumber(); in ToPrecision() 385 double digit = digitInt.GetNumber(); in ToPrecision() [all …]
|
D | builtins_date_time_format.cpp | 157 x = JSDate::Now().GetNumber(); in AnonymousDateTimeFormat() 161 x = xNumber.GetNumber(); in AnonymousDateTimeFormat() 189 x = JSDate::Now().GetNumber(); in FormatToParts() 193 x = xNumber.GetNumber(); in FormatToParts() 261 double x = valueX.GetNumber(); in FormatRange() 266 double y = valueY.GetNumber(); in FormatRange() 307 double x = valueX.GetNumber(); in FormatRangeToParts() 312 double y = valueY.GetNumber(); in FormatRangeToParts()
|
D | builtins_date.cpp | 60 timeValue = JSTaggedValue(val.GetNumber()); in DateConstructor() 75 double temp = res.GetNumber(); in DateConstructor() 147 double number = res.GetNumber(); in SetTime() 249 double x = value.GetNumber(); in ToLocaleString() 312 double x = value.GetNumber(); in ToLocaleDateString() 375 double x = value.GetNumber(); in ToLocaleTimeString()
|
D | builtins_relative_time_format.cpp | 101 x = temp.GetNumber(); in Format() 133 x = temp.GetNumber(); in FormatToParts()
|
D | builtins_dataview.cpp | 54 int32_t offsetInt = base::NumberHelper::DoubleInRangeInt32(offsetNumber.GetNumber()); in DataViewConstructor() 320 int32_t indexInt = base::NumberHelper::DoubleInRangeInt32(numberIndex.GetNumber()); in GetViewValue() 374 int64_t index = base::NumberHelper::DoubleInRangeInt32(numberIndex.GetNumber()); in SetViewValue()
|
/ark/js_runtime/ecmascript/tests/ |
D | js_typed_array_test.cpp | 378 …EXPECT_EQ(cVecOpResult.at(i).GetValue().GetTaggedValue().GetNumber(), std::numeric_limits<int8_t>:… in HWTEST_F_L0() 443 EXPECT_NE(value1, opResult1.GetValue().GetTaggedValue().GetNumber()); in HWTEST_F_L0() 444 EXPECT_NE(value2, opResult2.GetValue().GetTaggedValue().GetNumber()); in HWTEST_F_L0() 445 EXPECT_NE(value3, opResult3.GetValue().GetTaggedValue().GetNumber()); in HWTEST_F_L0() 446 EXPECT_NE(value4, opResult4.GetValue().GetTaggedValue().GetNumber()); in HWTEST_F_L0() 447 EXPECT_EQ(127, opResult1.GetValue().GetTaggedValue().GetNumber()); in HWTEST_F_L0() 448 EXPECT_EQ(-128, opResult2.GetValue().GetTaggedValue().GetNumber()); in HWTEST_F_L0() 449 EXPECT_EQ(13, opResult3.GetValue().GetTaggedValue().GetNumber()); in HWTEST_F_L0() 450 EXPECT_EQ(13, opResult4.GetValue().GetTaggedValue().GetNumber()); in HWTEST_F_L0() 477 …EXPECT_EQ(cVecOpResult.at(i).GetValue().GetTaggedValue().GetNumber(), std::numeric_limits<uint8_t>… in HWTEST_F_L0() [all …]
|
D | ecma_module_test.cpp | 79 EXPECT_EQ(handleEcmaModule->GetItem(thread, handleTagValItemName)->GetNumber(), intItemValue); in HWTEST_F_L0() 101 EXPECT_EQ(handleEcmaModule->GetItem(thread, handleTagValItemName)->GetNumber(), intItemValue); in HWTEST_F_L0() 212 …andle<EcmaModule>::Cast(handleTagValEcmaModuleGet1)->GetItem(thread, handleItemName1)->GetNumber(), in HWTEST_F_L0() 214 …andle<EcmaModule>::Cast(handleTagValEcmaModuleGet2)->GetItem(thread, handleItemName2)->GetNumber(), in HWTEST_F_L0() 259 ->GetItem(thread, handleTagValItemName1)->GetNumber(), intItemValue1); in HWTEST_F_L0() 261 ->GetItem(thread, handleTagValItemName2)->GetNumber(), intItemValue2); in HWTEST_F_L0() 266 ->GetItem(thread, handleTagValItemName2)->GetNumber(), intItemValue2); in HWTEST_F_L0() 386 …moduleManager->GetModuleItem(thread, handleTagValEcmaModule1, handleTagValItemName11)->GetNumber(), in HWTEST_F_L0() 388 …moduleManager->GetModuleItem(thread, handleTagValEcmaModule1, handleTagValItemName12)->GetNumber(), in HWTEST_F_L0() 397 …moduleManager->GetModuleItem(thread, handleTagValEcmaModule1, handleTagValItemName11)->GetNumber(), in HWTEST_F_L0() [all …]
|
D | tagged_value_test.cpp | 204 EXPECT_EQ(result.GetNumber(), 100); in HWTEST_F_L0() 208 EXPECT_EQ(result.GetNumber(), (double)100.0); in HWTEST_F_L0() 212 EXPECT_TRUE(std::isnan(result.GetNumber())); in HWTEST_F_L0() 216 EXPECT_TRUE(std::isnan(result.GetNumber())); in HWTEST_F_L0() 220 EXPECT_EQ(result.GetNumber(), 0); in HWTEST_F_L0() 224 EXPECT_EQ(result.GetNumber(), 0); in HWTEST_F_L0() 228 EXPECT_EQ(result.GetNumber(), 1); in HWTEST_F_L0() 232 EXPECT_EQ(result.GetNumber(), 1234); in HWTEST_F_L0() 236 EXPECT_EQ(result.GetNumber(), 10); in HWTEST_F_L0() 240 EXPECT_EQ(result.GetNumber(), 9); in HWTEST_F_L0() [all …]
|
D | js_array_iterator_test.cpp | 86 …JSArray::FastGetPropertyByValue(thread, JSHandle<JSTaggedValue>(handleJSArrayTo1), i)->GetNumber(), in HWTEST_F_L0() 96 …JSArray::FastGetPropertyByValue(thread, JSHandle<JSTaggedValue>(handleJSArrayTo2), i)->GetNumber(), in HWTEST_F_L0()
|
/ark/js_runtime/ecmascript/ic/ |
D | ic_compare_op.cpp | 39 leftDouble = left.GetNumber(); in EqualWithIC() 40 rightDouble = right.GetNumber(); in EqualWithIC() 53 rightDouble = JSTaggedValue::ToNumber(thread, rightHandle).GetNumber(); in EqualWithIC() 55 leftDouble = leftHandle.GetTaggedValue().GetNumber(); in EqualWithIC() 66 leftDouble = left.GetNumber(); in EqualWithIC() 111 leftDouble = JSTaggedValue::ToNumber(thread, leftHandle).GetNumber(); in EqualWithIC() 241 rightDouble = JSTaggedValue::ToNumber(thread, rightHandle).GetNumber(); in Compare() 243 leftDouble = leftHandle.GetTaggedValue().GetNumber(); in Compare() 248 leftDouble = left.GetNumber(); in Compare() 288 leftDouble = JSTaggedValue::ToNumber(thread, leftHandle).GetNumber(); in Compare() [all …]
|
D | ic_binary_op-inl.h | 55 double a0Double = taggedValueA0.GetNumber(); in AddWithTSType() 56 double a1Double = taggedValueA1.GetNumber(); in AddWithTSType() 134 return JSTaggedValue(left.GetNumber() * right.GetNumber()); in MulWithTSType() 218 double dLeft = leftNumber.GetNumber(); in ModWithTSType() 221 double dRight = rightNumber.GetNumber(); in ModWithTSType()
|
/ark/js_runtime/ecmascript/ts_types/ |
D | ts_type.cpp | 83 int argUnionA = unionArrayA->Get(unionAIndex).GetNumber(); in IsEqual() 86 int argUnionB = unionArrayB->Get(unionBIndex).GetNumber(); in IsEqual() 114 int localId = propTypeInfo->GetTypeId(index).GetNumber(); in SearchProperty() 148 localId = instanceTypeInfo->GetTypeId(index).GetNumber(); in SearchProperty() 166 localId = prototypeTypeInfo->GetTypeId(index).GetNumber(); in SearchProperty()
|
/ark/js_runtime/ecmascript/compiler/tests/ |
D | stub_tests.cpp | 173 LOG_ECMA(INFO) << "res for FastAdd(1, 1) = " << resA.GetNumber(); in HWTEST_F_L0() 174 LOG_ECMA(INFO) << "res for FastAdd(2, 2) = " << resB.GetNumber(); in HWTEST_F_L0() 175 LOG_ECMA(INFO) << "res for FastAdd(11, 11) = " << resC.GetNumber(); in HWTEST_F_L0() 176 EXPECT_EQ(resA.GetNumber(), JSTaggedValue(2).GetNumber()); in HWTEST_F_L0() 177 EXPECT_EQ(resB.GetNumber(), JSTaggedValue(4).GetNumber()); in HWTEST_F_L0() 178 EXPECT_EQ(resC.GetNumber(), JSTaggedValue(22).GetNumber()); in HWTEST_F_L0() 205 LOG_ECMA(INFO) << "res for FastSub(2, 1) = " << resA.GetNumber(); in HWTEST_F_L0() 206 LOG_ECMA(INFO) << "res for FastSub(7, 2) = " << resB.GetNumber(); in HWTEST_F_L0() 207 LOG_ECMA(INFO) << "res for FastSub(11, 11) = " << resC.GetNumber(); in HWTEST_F_L0() 233 LOG_ECMA(INFO) << "res for FastMul(-2, 1) = " << std::dec << resA.GetNumber(); in HWTEST_F_L0() [all …]
|
/ark/js_runtime/ecmascript/base/ |
D | array_helper.cpp | 95 double value = v.GetNumber(); in SortCompare() 129 return len.GetNumber(); in GetLength() 142 return len.GetNumber(); in GetArrayLength()
|
D | json_stringifier.h | 77 return a->GetNumber() < b->GetNumber(); in CompareNumber()
|
D | typed_array_helper.cpp | 63 elementLength = static_cast<int32_t>(index.GetNumber()); in TypedArrayConstructor() 145 double len = lenTemp.GetNumber(); in CreateFromOrdinaryObject() 273 auto offset = static_cast<int32_t>(index.GetNumber()); in CreateFromArrayBuffer() 286 newLength = static_cast<int32_t>(index.GetNumber()); in CreateFromArrayBuffer() 506 double value = v.GetNumber(); in SortCompare()
|
/ark/js_runtime/ecmascript/base/tests/ |
D | builtins_base_test.cpp | 160 EXPECT_EQ(BuiltinsBase::GetTaggedDouble(1.1100).GetNumber(), 1.1100); in HWTEST_F_L0() 161 EXPECT_EQ(BuiltinsBase::GetTaggedDouble(9.1200).GetNumber(), 9.1200); in HWTEST_F_L0()
|
D | array_helper_test.cpp | 141 … JSTaggedNumber(100.0).GetNumber()); in HWTEST_F_L0() 168 … JSTaggedNumber(10.0).GetNumber()); in HWTEST_F_L0()
|
D | json_parser_test.cpp | 65 EXPECT_EQ(result2->GetNumber(), 1234); in HWTEST_F_L0() 96 EXPECT_EQ(result2->GetNumber(), 1234); in HWTEST_F_L0()
|