Home
last modified time | relevance | path

Searched refs:JSTaggedNumber (Results 1 – 25 of 62) sorted by relevance

123

/ark/js_runtime/ecmascript/
Djs_tagged_number.h28 class JSTaggedNumber final : public JSTaggedValue {
30 constexpr JSTaggedNumber() = default;
31 explicit JSTaggedNumber(double v) : JSTaggedValue(v) {} in JSTaggedNumber() function
32 constexpr explicit JSTaggedNumber(int v) : JSTaggedValue(v) {} in JSTaggedNumber() function
33 explicit JSTaggedNumber(unsigned int v) : JSTaggedValue(v) {} in JSTaggedNumber() function
34 explicit JSTaggedNumber(JSTaggedValue v) : JSTaggedValue(v.GetRawData()) in JSTaggedNumber() function
39 ~JSTaggedNumber() = default;
40 DEFAULT_COPY_SEMANTIC(JSTaggedNumber);
41 DEFAULT_MOVE_SEMANTIC(JSTaggedNumber);
43 static inline constexpr JSTaggedNumber Exception() in Exception()
[all …]
Djs_tagged_value-inl.h87 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 JSTaggedNumber(0); in ToNumber()
128 return JSTaggedNumber(d); in ToNumber()
132 RETURN_VALUE_IF_ABRUPT_COMPLETION(thread, JSTaggedNumber::Exception()); in ToNumber()
136 …ERROR_AND_RETURN(thread, "Cannot convert a Symbol value to a number", JSTaggedNumber::Exception()); in ToNumber()
139 …ERROR_AND_RETURN(thread, "Cannot convert a BigInt value to a number", JSTaggedNumber::Exception()); in ToNumber()
[all …]
Djs_handle.h152 inline JSTaggedNumber *JSHandle<JSTaggedNumber>::operator->() const
154 return reinterpret_cast<JSTaggedNumber *>(GetAddress());
158 inline JSTaggedNumber *JSHandle<JSTaggedNumber>::operator*() const
160 return reinterpret_cast<JSTaggedNumber *>(GetAddress());
Djs_typed_array.cpp100 JSTaggedNumber numericIndexNumber = JSTaggedValue::ToNumber(thread, numericIndexHandle); in HasProperty()
102 auto eZero = JSTaggedNumber(tNegZero); in HasProperty()
104 if (JSTaggedNumber::SameValue(numericIndexNumber, eZero)) { in HasProperty()
162 JSTaggedNumber numericIndexNumber = JSTaggedValue::ToNumber(thread, numericIndexHandle); in DefineOwnProperty()
164 auto eZero = JSTaggedNumber(tNegZero); in DefineOwnProperty()
166 if (JSTaggedNumber::SameValue(numericIndexNumber, eZero)) { in DefineOwnProperty()
328 JSTaggedNumber indexNumber = JSTaggedValue::ToNumber(thread, indexHandle); in IntegerIndexedElementGet()
330 auto eZero = JSTaggedNumber(tNegZero); in IntegerIndexedElementGet()
332 if (JSTaggedNumber::SameValue(indexNumber, eZero)) { in IntegerIndexedElementGet()
439 JSTaggedNumber numVal = JSTaggedValue::ToNumber(thread, value); in IntegerIndexedElementSet()
[all …]
Djs_array.h33 static JSHandle<JSTaggedValue> ArrayCreate(JSThread *thread, JSTaggedNumber length);
34 static JSHandle<JSTaggedValue> ArrayCreate(JSThread *thread, JSTaggedNumber length,
37 JSTaggedNumber length);
Djs_tagged_value.cpp119 JSTaggedNumber yNumber = ToNumber(thread, y); in Equal()
124 JSTaggedNumber yNumber = ToNumber(thread, y); in Equal()
145 JSTaggedNumber xNumber = ToNumber(thread, x); in Equal()
150 JSTaggedNumber xNumber = ToNumber(thread, x); in Equal()
152 JSTaggedNumber yNumber = ToNumber(thread, y); in Equal()
168 JSTaggedNumber xNumber = ToNumber(thread, x); in Equal()
297 JSTaggedNumber xNumber = ToNumber(thread, x); in Compare()
299 JSTaggedNumber yNumber = ToNumber(thread, y); in Compare()
793 JSTaggedNumber JSTaggedValue::ToIndex(JSThread *thread, const JSHandle<JSTaggedValue> &tagged) in ToIndex()
796 return JSTaggedNumber(tagged.GetTaggedValue()); in ToIndex()
[all …]
Djs_tagged_value.h24 class JSTaggedNumber; variable
152 static JSTaggedNumber ToNumber(JSThread *thread, const JSHandle<JSTaggedValue> &tagged);
156 static JSTaggedNumber ToInteger(JSThread *thread, const JSHandle<JSTaggedValue> &tagged);
168 static JSTaggedNumber ToLength(JSThread *thread, const JSHandle<JSTaggedValue> &tagged);
170 static JSTaggedNumber ToIndex(JSThread *thread, const JSHandle<JSTaggedValue> &tagged);
Djs_bigint.h91 static JSTaggedValue AsUintN(JSThread *thread, JSTaggedNumber &bits, JSHandle<BigInt> bigint);
92 static JSTaggedValue AsintN(JSThread *thread, JSTaggedNumber &bits, JSHandle<BigInt> bigint);
93 static JSTaggedNumber BigIntToNumber(JSThread *thread, JSHandle<BigInt> bigint);
/ark/js_runtime/ecmascript/builtins/
Dbuiltins_math.cpp37 JSTaggedNumber numberValue = JSTaggedValue::ToNumber(thread, msg); in Abs()
55 JSTaggedNumber numberValue = JSTaggedValue::ToNumber(thread, msg); in Acos()
73 JSTaggedNumber numberValue = JSTaggedValue::ToNumber(thread, msg); in Acosh()
90 JSTaggedNumber numberValue = JSTaggedValue::ToNumber(thread, msg); in Asin()
107 JSTaggedNumber numberValue = JSTaggedValue::ToNumber(thread, msg); in Asinh()
125 JSTaggedNumber numberValue = JSTaggedValue::ToNumber(thread, msg); in Atan()
143 JSTaggedNumber numberValue = JSTaggedValue::ToNumber(thread, msg); in Atanh()
162 JSTaggedNumber numberValueY = JSTaggedValue::ToNumber(thread, msgY); in Atan2()
163 JSTaggedNumber numberValueX = JSTaggedValue::ToNumber(thread, msgX); in Atan2()
189 JSTaggedNumber numberValue = JSTaggedValue::ToNumber(thread, msg); in Cbrt()
[all …]
Dbuiltins_number.cpp42 JSTaggedNumber numberValue(0); in NumberConstructor()
55 numberValue = JSTaggedNumber(numeric); in NumberConstructor()
99 double value = JSTaggedNumber(msg.GetTaggedValue()).GetNumber(); in IsInteger()
101 JSTaggedNumber number = JSTaggedValue::ToInteger(thread, msg); in IsInteger()
136 double value = JSTaggedNumber(msg.GetTaggedValue()).GetNumber(); in IsSafeInteger()
138 JSTaggedNumber number = JSTaggedValue::ToInteger(thread, msg); in IsSafeInteger()
225 JSTaggedNumber value = ThisNumberValue(argv); in ToExponential()
231 JSTaggedNumber digitInt = JSTaggedValue::ToInteger(thread, digits); in ToExponential()
273 JSTaggedNumber value = ThisNumberValue(argv); in ToFixed()
278 JSTaggedNumber digitInt = JSTaggedValue::ToInteger(thread, digitArgv); in ToFixed()
[all …]
Dbuiltins_date_time_format.cpp159 JSTaggedNumber xNumber = JSTaggedValue::ToNumber(thread, date); in AnonymousDateTimeFormat()
191 JSTaggedNumber xNumber = JSTaggedValue::ToNumber(thread, date); in FormatToParts()
259 JSTaggedNumber valueX = JSTaggedValue::ToNumber(thread, startDate); in FormatRange()
264 JSTaggedNumber valueY = JSTaggedValue::ToNumber(thread, endDate); in FormatRange()
305 JSTaggedNumber valueX = JSTaggedValue::ToNumber(thread, startDate); in FormatRangeToParts()
310 JSTaggedNumber valueY = JSTaggedValue::ToNumber(thread, endDate); in FormatRangeToParts()
Dbuiltins_dataview.cpp51 JSTaggedNumber offsetNumber = JSTaggedValue::ToNumber(thread, offsetHandle); in DataViewConstructor()
78 JSTaggedNumber byteLen = JSTaggedValue::ToIndex(thread, byteLenHandle); in DataViewConstructor()
317 JSTaggedNumber numberIndex = JSTaggedValue::ToNumber(thread, requestIndex); in GetViewValue()
371 JSTaggedNumber numberIndex = JSTaggedValue::ToIndex(thread, requestIndex); in SetViewValue()
379 JSTaggedNumber numVal = JSTaggedValue::ToNumber(thread, value); in SetViewValue()
Dbuiltins_bigint.cpp53 JSTaggedNumber index = JSTaggedValue::ToIndex(thread, bits); in AsUintN()
71 JSTaggedNumber index = JSTaggedValue::ToIndex(thread, bits); in AsIntN()
141 JSTaggedNumber radixNumber = JSTaggedValue::ToInteger(thread, radixValue); in ToString()
Dbuiltins_array.cpp69 …return JSTaggedValue(JSArray::ArrayCreate(thread, JSTaggedNumber(0), newTarget).GetObject<JSArray>… in ArrayConstructor()
76 …JSHandle<JSObject> newArrayHandle(JSArray::ArrayCreate(thread, JSTaggedNumber(newLen), newTarget)); in ArrayConstructor()
94 if (JSTaggedNumber(len.GetTaggedValue()).GetNumber() != newLen) { in ArrayConstructor()
105 …JSTaggedValue newArray = JSArray::ArrayCreate(thread, JSTaggedNumber(argc), newTarget).GetTaggedVa… in ArrayConstructor()
181 newArray = JSArray::ArrayCreate(thread, JSTaggedNumber(0)).GetTaggedValue(); in From()
264 newArray = JSArray::ArrayCreate(thread, JSTaggedNumber(len)).GetTaggedValue(); in From()
350 newArray = JSArray::ArrayCreate(thread, JSTaggedNumber(argc)); in Of()
406 …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 …]
Dbuiltins_number.h56 static JSTaggedNumber ThisNumberValue(EcmaRuntimeCallInfo *argv);
Dbuiltins_string.cpp135 JSTaggedNumber nextCpVal = JSTaggedValue::ToNumber(thread, nextCpTag); in FromCodePoint()
192 JSTaggedNumber lengthNumber = JSTaggedValue::ToLength(thread, rawLen); in Raw()
251 JSTaggedNumber posVal = JSTaggedValue::ToInteger(thread, posTag); in CharAt()
278 JSTaggedNumber posVal = JSTaggedValue::ToInteger(thread, posTag); in CharCodeAt()
301 JSTaggedNumber posVal = JSTaggedValue::ToNumber(thread, posTag); in CodePointAt()
389 JSTaggedNumber posVal = JSTaggedValue::ToInteger(thread, posTag); in EndsWith()
443 JSTaggedNumber posVal = JSTaggedValue::ToNumber(thread, posTag); in Includes()
489 JSTaggedNumber posVal = JSTaggedValue::ToInteger(thread, posTag); in IndexOf()
544 JSTaggedNumber posVal = JSTaggedValue::ToInteger(thread, posTag); in LastIndexOf()
724 JSTaggedNumber num = JSTaggedValue::ToInteger(thread, countTag); in Repeat()
[all …]
Dbuiltins_relative_time_format.cpp99 JSTaggedNumber temp = JSTaggedValue::ToNumber(thread, value); in Format()
131 JSTaggedNumber temp = JSTaggedValue::ToNumber(thread, value); in FormatToParts()
Dbuiltins_typedarray.cpp219 JSTaggedNumber tLen = JSTaggedValue::ToLength(thread, lenResult); in From()
943 JSTaggedNumber tTargetOffset = JSTaggedValue::ToInteger(thread, GetCallArg(argv, 1)); in Set()
983 JSTaggedNumber tSrcLen = JSTaggedValue::ToLength(thread, lenResult); in Set()
1012 JSTaggedNumber kNumber = JSTaggedValue::ToNumber(thread, kValue); in Set()
1082 JSTaggedNumber kNumber = JSTaggedValue::ToNumber(thread, value); in Set()
1101 JSTaggedNumber kNumber = JSTaggedValue::ToNumber(thread, value); in Set()
1132 JSTaggedNumber tRelativeStart = JSTaggedValue::ToInteger(thread, GetCallArg(argv, 0)); in Slice()
1146 JSTaggedNumber tRelativeEnd = JSTaggedValue::ToInteger(thread, end); in Slice()
1232 JSTaggedNumber kNumber = JSTaggedValue::ToNumber(thread, value); in Slice()
1322 JSTaggedNumber tRelativeBegin = JSTaggedValue::ToInteger(thread, GetCallArg(argv, 0)); in Subarray()
[all …]
Dbuiltins_number_format.cpp148 JSTaggedNumber x = JSTaggedValue::ToNumber(thread, value); in FormatToParts()
199 JSTaggedNumber x = JSTaggedValue::ToNumber(thread, value); in NumberFormatInternalFormatNumber()
/ark/js_runtime/ecmascript/base/
Dtyped_array_helper.cpp61 JSTaggedNumber index = JSTaggedValue::ToIndex(thread, firstArg); in TypedArrayConstructor()
142 JSTaggedNumber lenTemp = in CreateFromOrdinaryObject()
238 JSTaggedNumber numVal = JSTaggedValue::ToNumber(thread, value); in CreateFromTypedArray()
271 JSTaggedNumber index = JSTaggedValue::ToIndex(thread, byteOffset); in CreateFromArrayBuffer()
504 JSTaggedNumber v = JSTaggedValue::ToNumber(thread, testResult); in SortCompare()
536 JSTaggedNumber xNumber = JSTaggedValue::ToNumber(thread, firstValue); in SortCompare()
537 JSTaggedNumber yNumber = JSTaggedValue::ToNumber(thread, secondValue); in SortCompare()
539 auto eZero = JSTaggedNumber(eZeroTemp); in SortCompare()
541 auto pZero = JSTaggedNumber(pZeroTemp); in SortCompare()
542 if (JSTaggedNumber::SameValue(xNumber, eZero) && JSTaggedNumber::SameValue(yNumber, pZero)) { in SortCompare()
[all …]
Darray_helper.cpp93 JSTaggedNumber v = JSTaggedValue::ToNumber(thread, testResult); in SortCompare()
127 JSTaggedNumber len = JSTaggedValue::ToLength(thread, lenResult); in GetLength()
140 JSTaggedNumber len = JSTaggedValue::ToLength(thread, lenResult); in GetArrayLength()
/ark/js_runtime/ecmascript/ic/
Dic_binary_op-inl.h51 JSTaggedNumber taggedValueA0 = JSTaggedValue::ToNumber(thread, primitiveA0); in AddWithTSType()
53 JSTaggedNumber taggedValueA1 = JSTaggedValue::ToNumber(thread, primitiveA1); in AddWithTSType()
110 JSTaggedNumber number0 = JSTaggedValue::ToNumber(thread, leftValue); in SubWithTSType()
112 JSTaggedNumber number1 = JSTaggedValue::ToNumber(thread, rightValue); in SubWithTSType()
141 JSTaggedNumber primitiveA = JSTaggedValue::ToNumber(thread, leftValue); in MulWithTSType()
145 JSTaggedNumber primitiveB = JSTaggedValue::ToNumber(thread, rightValue); in MulWithTSType()
216 JSTaggedNumber leftNumber = JSTaggedValue::ToNumber(thread, leftValue); in ModWithTSType()
219 JSTaggedNumber rightNumber = JSTaggedValue::ToNumber(thread, rightValue); in ModWithTSType()
/ark/js_runtime/ecmascript/base/tests/
Darray_helper_test.cpp124 JSArray *handleArr = JSArray::ArrayCreate(thread, JSTaggedNumber(10)).GetObject<JSArray>(); in HWTEST_F_L0()
141JSTaggedNumber(100.0).GetNumber()); in HWTEST_F_L0()
158 JSArray *handleArr = JSArray::ArrayCreate(thread, JSTaggedNumber(0)).GetObject<JSArray>(); in HWTEST_F_L0()
168JSTaggedNumber(10.0).GetNumber()); in HWTEST_F_L0()
/ark/js_runtime/ecmascript/tests/
Djs_array_test.cpp61 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()
/ark/js_runtime/ecmascript/builtins/tests/
Dbuiltins_array_test.cpp202 … JSArray *arr = JSArray::Cast(JSArray::ArrayCreate(thread, JSTaggedNumber(0))->GetTaggedObject()); in HWTEST_F_L0()
251 …JSArray *arr = JSArray::Cast(JSArray::ArrayCreate(thread, JSTaggedNumber(0)).GetTaggedValue().GetT… in HWTEST_F_L0()
330 …JSArray *arr = JSArray::Cast(JSArray::ArrayCreate(thread, JSTaggedNumber(0)).GetTaggedValue().GetT… in HWTEST_F_L0()
343 JSArray *arr1 = JSArray::ArrayCreate(thread, JSTaggedNumber(0)).GetObject<JSArray>(); in HWTEST_F_L0()
380 …JSArray *arr = JSArray::Cast(JSArray::ArrayCreate(thread, JSTaggedNumber(0)).GetTaggedValue().GetT… in HWTEST_F_L0()
434 …JSArray *arr = JSArray::Cast(JSArray::ArrayCreate(thread, JSTaggedNumber(0)).GetTaggedValue().GetT… in HWTEST_F_L0()
473 …JSArray *arr = JSArray::Cast(JSArray::ArrayCreate(thread, JSTaggedNumber(0)).GetTaggedValue().GetT… in HWTEST_F_L0()
486 JSHandle<JSArray> jsArray(JSArray::ArrayCreate(thread, JSTaggedNumber(0))); in HWTEST_F_L0()
517 …JSArray *arr = JSArray::Cast(JSArray::ArrayCreate(thread, JSTaggedNumber(0)).GetTaggedValue().GetT… in HWTEST_F_L0()
563 …JSArray *arr = JSArray::Cast(JSArray::ArrayCreate(thread, JSTaggedNumber(0)).GetTaggedValue().GetT… in HWTEST_F_L0()
[all …]

123