Home
last modified time | relevance | path

Searched refs:BigInt (Results 1 – 21 of 21) sorted by relevance

/ark/js_runtime/ecmascript/
Djs_bigint.h28 class BigInt : public TaggedObject {
40 CAST_CHECK(BigInt, IsBigInt);
41 static JSHandle<BigInt> CreateBigint(JSThread *thread, uint32_t size);
44 static bool Equal(const BigInt *x, const BigInt *y);
48 static void InitializationZero(JSThread *thread, JSHandle<BigInt> bigint);
49 …static JSHandle<BigInt> BitwiseOp(JSThread *thread, Operate op, JSHandle<BigInt> x, JSHandle<BigIn…
50 static JSHandle<BigInt> BitwiseAND(JSThread *thread, JSHandle<BigInt> x, JSHandle<BigInt> y);
51 static JSHandle<BigInt> BitwiseXOR(JSThread *thread, JSHandle<BigInt> x, JSHandle<BigInt> y);
52 static JSHandle<BigInt> BitwiseOR(JSThread *thread, JSHandle<BigInt> x, JSHandle<BigInt> y);
53 … static JSHandle<BigInt> BitwiseSubOne(JSThread *thread, JSHandle<BigInt> bigint, uint32_t maxLen);
[all …]
Djs_bigint.cpp67 JSHandle<BigInt> BigIntHelper::SetBigInt(JSThread *thread, const std::string &numStr, uint32_t curr… in SetBigInt()
75 if (currentRadix != BigInt::BINARY) { in SetBigInt()
76 binaryStr = Conversion(numStr.substr(flag), BigInt::BINARY, currentRadix); in SetBigInt()
81 JSHandle<BigInt> bigint; in SetBigInt()
83 size_t len = binaryStrLen / BigInt::DATEBITS; in SetBigInt()
84 size_t mod = binaryStrLen % BigInt::DATEBITS; in SetBigInt()
88 bigint = BigInt::CreateBigint(thread, len); in SetBigInt()
92 bigint = BigInt::CreateBigint(thread, len); in SetBigInt()
98 BigInt::SetDigit(thread, bigint, index, val); in SetBigInt()
107 for (size_t j = 0; j < BigInt::DATEBITS && i < binaryStrLen; ++j, ++i) { in SetBigInt()
[all …]
Djs_tagged_value-inl.h72 BigInt *bigint = BigInt::Cast(GetTaggedObject()); in ToBoolean()
155 return BigInt::Int32ToBigInt(thread, 1).GetTaggedValue(); in ToBigInt()
158 return BigInt::Int32ToBigInt(thread, 0).GetTaggedValue(); in ToBigInt()
188 JSHandle<BigInt> value(thread, ToBigInt(thread, tagged)); in ToBigInt64()
190 JSHandle<BigInt> exponent = BigInt::Int32ToBigInt(thread, 64); // 64 : bits in ToBigInt64()
191 JSHandle<BigInt> exponentone = BigInt::Int32ToBigInt(thread, 63); // 63 : bits in ToBigInt64()
192 JSHandle<BigInt> base = BigInt::Int32ToBigInt(thread, 2); // 2 : base value in ToBigInt64()
193 JSHandle<BigInt> tVal = BigInt::Exponentiate(thread, base, exponent); in ToBigInt64()
195 JSHandle<BigInt> int64bitVal = BigInt::FloorMod(thread, value, tVal); in ToBigInt64()
196 JSHandle<BigInt> resValue = BigInt::Exponentiate(thread, base, exponentone); in ToBigInt64()
[all …]
Djs_tagged_value.cpp190 return BigInt::Equal(x.GetTaggedValue(), y.GetTaggedValue()); in Equal()
197 return BigInt::Equal(x.GetTaggedValue(), yNumber.GetTaggedValue()); in Equal()
202 return BigInt::Equal(x.GetTaggedValue(), yNumber.GetTaggedValue()); in Equal()
205 JSHandle<BigInt> bigint = JSHandle<BigInt>::Cast(x); in Equal()
206 return BigInt::CompareWithNumber(thread, bigint, y) == ComparisonResult::EQUAL; in Equal()
273 JSHandle<BigInt> bigint = JSHandle<BigInt>::Cast(primX); in Compare()
274 return BigInt::CompareWithNumber(thread, bigint, primY); in Compare()
280 return BigInt::Compare(thread, primX.GetTaggedValue(), bigY.GetTaggedValue()); in Compare()
284 return BigInt::Compare(thread, primX.GetTaggedValue(), bigY.GetTaggedValue()); in Compare()
407 JSHandle<BigInt> taggedValue(tagged); in ToString()
[all …]
Druntime_call_id.h375 V(BigInt, Constructor) \
376 V(BigInt, AsUintN) \
377 V(BigInt, AsIntN) \
378 V(BigInt, ToLocaleString) \
379 V(BigInt, ToString) \
380 V(BigInt, ValueOf) \
381 V(BigInt, ThisBigIntValue) \
Dobject_factory.h100 class BigInt; variable
244 JSHandle<BigInt> NewBigInt();
Djs_number_format.cpp719 JSHandle<BigInt> bigint(thread, x); in FormatNumeric()
720 JSHandle<EcmaString> bigintStr = BigInt::ToString(thread, bigint); in FormatNumeric()
Dglobal_env_constants.cpp74 factory->NewEcmaDynClass(dynClassClass, BigInt::SIZE, JSType::BIGINT)); in InitRootsClass()
Dobject_factory.cpp1805 JSHandle<BigInt> ObjectFactory::NewBigInt() in NewBigInt()
1810 JSHandle<BigInt> obj(thread_, BigInt::Cast(header)); in NewBigInt()
Ddump.cpp480 BigInt::Cast(obj)->Dump(thread, os); in DumpObject()
1041 void BigInt::Dump(JSThread *thread, std::ostream &os) const in Dump()
2454 BigInt::Cast(obj)->DumpForSnapshot(thread, vec); in DumpObject()
2898 void BigInt::DumpForSnapshot([[maybe_unused]] JSThread *thread, in DumpForSnapshot()
/ark/js_runtime/ecmascript/builtins/
Dbuiltins_bigint.cpp26 BUILTINS_API_TRACE(thread, BigInt, Constructor); in BigIntConstructor()
38 return BigInt::NumberToBigInt(thread, Primitive); in BigIntConstructor()
48 BUILTINS_API_TRACE(thread, BigInt, AsUintN); in AsUintN()
57 JSHandle<BigInt> jsBigintVal(thread, jsBigint); in AsUintN()
59 return BigInt::AsUintN(thread, index, jsBigintVal); in AsUintN()
66 BUILTINS_API_TRACE(thread, BigInt, AsIntN); in AsIntN()
75 JSHandle<BigInt> jsBigintVal(thread, jsBigint); in AsIntN()
78 return BigInt::AsintN(thread, index, jsBigintVal); in AsIntN()
85 BUILTINS_API_TRACE(thread, BigInt, ToLocaleString); in ToLocaleString()
129 BUILTINS_API_TRACE(thread, BigInt, ToString); in ToString()
[all …]
Dbuiltins_number.cpp51 JSHandle<BigInt> bigNumericVal(numericVal); in NumberConstructor()
52 numberValue = BigInt::BigIntToNumber(thread, bigNumericVal); in NumberConstructor()
Dbuiltins_math.cpp563 JSHandle<BigInt> bigBaseVale(baseVale); in Pow()
564 JSHandle<BigInt> bigExponentValue(exponentValue); in Pow()
565 return BigInt::Exponentiate(thread, bigBaseVale, bigExponentValue).GetTaggedValue(); in Pow()
/ark/js_runtime/ecmascript/interpreter/
Dslow_runtime_stub.cpp79 JSHandle<BigInt> bigValue(inputVal); in NegDyn()
80 return BigInt::UnaryMinus(thread, bigValue).GetTaggedValue(); in NegDyn()
142 JSHandle<BigInt> bigValue(inputVal); in NotDyn()
143 return BigInt::BitwiseNOT(thread, bigValue).GetTaggedValue(); in NotDyn()
158 JSHandle<BigInt> bigValue(inputVal); in IncDyn()
159 return BigInt::BigintAddOne(thread, bigValue).GetTaggedValue(); in IncDyn()
174 JSHandle<BigInt> bigValue(inputVal); in DecDyn()
175 return BigInt::BigintSubOne(thread, bigValue).GetTaggedValue(); in DecDyn()
244 JSHandle<BigInt> bigLeft(valLeft); in Add2Dyn()
245 JSHandle<BigInt> bigRight(valRight); in Add2Dyn()
[all …]
Dinterpreter-inl.h1607 bool result = BigInt::LessThan(left, right); in RunInternal()
1631 bool result = BigInt::LessThan(left, right) || BigInt::Equal(left, right); in RunInternal()
1656 bool result = BigInt::LessThan(right, left); in RunInternal()
1681 bool result = BigInt::LessThan(right, left) || BigInt::Equal(right, left); in RunInternal()
Dinterpreter_assembly.cpp1412 bool result = BigInt::LessThan(left, right); in HandleLessDynPrefV8()
1443 bool result = BigInt::LessThan(left, right) || BigInt::Equal(left, right); in HandleLessEqDynPrefV8()
1475 bool result = BigInt::LessThan(right, left); in HandleGreaterDynPrefV8()
1507 bool result = BigInt::LessThan(right, left) || BigInt::Equal(right, left); in HandleGreaterEqDynPrefV8()
Dfast_runtime_stub-inl.h129 return JSTaggedValue(BigInt::Equal(left, right)); in FastEqual()
156 return BigInt::Equal(left, right); in FastStrictEqual()
/ark/js_runtime/ecmascript/base/
Dnumber_helper.cpp680 return BigInt::Int32ToBigInt(thread, 0).GetTaggedValue(); in StringToBigInt()
695 return BigInt::Int32ToBigInt(thread, 0).GetTaggedValue(); in StringToBigInt()
714 return BigInt::Int32ToBigInt(thread, 0).GetTaggedValue(); in StringToBigInt()
741 return BigInt::Int32ToBigInt(thread, 0).GetTaggedValue(); in StringToBigInt()
/ark/js_runtime/ecmascript/napi/
Djsnapi.cpp104 using ecmascript::BigInt;
573 JSHandle<BigInt> big = BigInt::Uint64ToBigInt(thread, input); in New()
581 JSHandle<BigInt> big = BigInt::Int64ToBigInt(thread, input); in New()
589 JSHandle<BigInt> big = BigInt::CreateBigWords(thread, sign, size, words); in CreateBigWords()
598 BigInt::BigIntToInt64(thread, bigintVal, cValue, lossless); in BigIntToInt64()
605 BigInt::BigIntToUint64(thread, bigintVal, cValue, lossless); in BigIntToUint64()
610 JSHandle<BigInt> bigintVal(JSNApiHelper::ToJSHandle(this)); in GetWordsArray()
629 JSHandle<BigInt> bigintVal(JSNApiHelper::ToJSHandle(this)); in GetWordsArraySize()
/ark/js_runtime/ecmascript/mem/
Dobject_xray-inl.h344 BigInt::Cast(object)->VisitRangeSlot(visitor); in VisitObjectBody()
/ark/ts2abc/ts2panda/templates/
Dirnodes.ts.erb228 BigInt,