Home
last modified time | relevance | path

Searched refs:GetNumber (Results 1 – 25 of 53) sorted by relevance

123

/ark/js_runtime/ecmascript/
Djs_tagged_number.h68 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()
Djs_tagged_value-inl.h221 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()
Dtagged_dictionary.h111 return a.GetNumber() < b.GetNumber(); in CompKey()
Djs_tagged_value.cpp91 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()
Djs_date.cpp531 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/
Dbuiltins_math.cpp56 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 …]
Dbuiltins_number.cpp99 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 …]
Dbuiltins_date_time_format.cpp157 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()
Dbuiltins_date.cpp60 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()
Dbuiltins_relative_time_format.cpp101 x = temp.GetNumber(); in Format()
133 x = temp.GetNumber(); in FormatToParts()
Dbuiltins_dataview.cpp54 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/
Djs_typed_array_test.cpp378 …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 …]
Decma_module_test.cpp79 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 …]
Dtagged_value_test.cpp204 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 …]
Djs_array_iterator_test.cpp86 …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/
Dic_compare_op.cpp39 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 …]
Dic_binary_op-inl.h55 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/
Dts_type.cpp83 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/
Dstub_tests.cpp173 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/
Darray_helper.cpp95 double value = v.GetNumber(); in SortCompare()
129 return len.GetNumber(); in GetLength()
142 return len.GetNumber(); in GetArrayLength()
Djson_stringifier.h77 return a->GetNumber() < b->GetNumber(); in CompareNumber()
Dtyped_array_helper.cpp63 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/
Dbuiltins_base_test.cpp160 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()
Darray_helper_test.cpp141 … JSTaggedNumber(100.0).GetNumber()); in HWTEST_F_L0()
168 … JSTaggedNumber(10.0).GetNumber()); in HWTEST_F_L0()
Djson_parser_test.cpp65 EXPECT_EQ(result2->GetNumber(), 1234); in HWTEST_F_L0()
96 EXPECT_EQ(result2->GetNumber(), 1234); in HWTEST_F_L0()

123