/arkcompiler/ets_runtime/ecmascript/tests/ |
H A D | js_bigint_test.cpp | 40 JSHandle<BigInt> bigint1 = BigIntHelper::SetBigInt(thread, str1); in HWTEST_F_L0() 41 JSHandle<BigInt> bigint2 = BigIntHelper::SetBigInt(thread, str2); in HWTEST_F_L0() 42 JSHandle<BigInt> bigint3 = BigIntHelper::SetBigInt(thread, str3); in HWTEST_F_L0() 43 JSHandle<BigInt> bigint4 = BigIntHelper::SetBigInt(thread, str4); in HWTEST_F_L0() 44 EXPECT_EQ(BigInt::Compare(bigint1.GetTaggedValue(), bigint1.GetTaggedValue()), ComparisonResult::EQUAL); in HWTEST_F_L0() 45 EXPECT_EQ(BigInt::Compare(bigint3.GetTaggedValue(), bigint2.GetTaggedValue()), ComparisonResult::LESS); in HWTEST_F_L0() 46 EXPECT_EQ(BigInt::Compare(bigint1.GetTaggedValue(), bigint2.GetTaggedValue()), ComparisonResult::LESS); in HWTEST_F_L0() 47 EXPECT_EQ(BigInt::Compare(bigint2.GetTaggedValue(), bigint1.GetTaggedValue()), ComparisonResult::GREAT); in HWTEST_F_L0() 48 EXPECT_EQ(BigInt::Compare(bigint2.GetTaggedValue(), bigint3.GetTaggedValue()), ComparisonResult::GREAT); in HWTEST_F_L0() 49 EXPECT_EQ(BigInt in HWTEST_F_L0() [all...] |
H A D | js_number_format_test.cpp | 149 // format BigInt in HWTEST_F_L0() 151 JSHandle<BigInt> jsBigInt(thread, BigInt::NumberToBigInt(thread, number)); in HWTEST_F_L0()
|
/arkcompiler/ets_runtime/ecmascript/ |
H A D | js_bigint.h | 31 class BigInt : public TaggedObject { class 46 CAST_CHECK(BigInt, IsBigInt); 47 static JSHandle<BigInt> CreateBigint(JSThread *thread, uint32_t size); 53 static JSHandle<BigInt> BitwiseOp(JSThread *thread, Operate op, JSHandle<BigInt> x, JSHandle<BigInt> y); 54 static JSHandle<BigInt> BitwiseAND(JSThread *thread, JSHandle<BigInt> x, JSHandle<BigInt> y); 55 static JSHandle<BigInt> BitwiseXO [all...] |
H A D | js_bigint.cpp | 68 JSHandle<BigInt> BigInt::CreateUint64MaxBigInt(JSThread *thread) in CreateUint64MaxBigInt() 70 JSHandle<BigInt> bigint = CreateBigint(thread, 3); // 3:The number of digits in an object of type BigInt in CreateUint64MaxBigInt() 71 RETURN_HANDLE_IF_ABRUPT_COMPLETION(BigInt, thread); in CreateUint64MaxBigInt() 74 bigint->SetDigit(2, 1); // 2:The number of digits in an object of type BigInt in CreateUint64MaxBigInt() 78 JSHandle<BigInt> BigInt::CreateInt64MaxBigInt(JSThread *thread) in CreateInt64MaxBigInt() 80 JSHandle<BigInt> bigint = CreateBigint(thread, 2); // 2:The number of digits in an object of type BigInt in CreateInt64MaxBigInt() [all...] |
H A D | js_tagged_value.cpp | 67 BigInt *bigint = BigInt::Cast(GetTaggedObject()); in ToBoolean() 119 THROW_TYPE_ERROR_AND_RETURN(thread, "Cannot convert a BigInt value to a number", JSTaggedNumber::Exception()); in ToNumber() 136 THROW_TYPE_ERROR_AND_RETURN(thread, "Cannot convert a undefine or null value to a BigInt", in ToBigInt() 140 return BigInt::Int32ToBigInt(thread, 1).GetTaggedValue(); in ToBigInt() 143 return BigInt::Int32ToBigInt(thread, 0).GetTaggedValue(); in ToBigInt() 151 THROW_TYPE_ERROR_AND_RETURN(thread, "Cannot convert a Number value to a BigInt", JSTaggedNumber::Exception()); in ToBigInt() 158 THROW_SYNTAX_ERROR_AND_RETURN(thread, "Cannot convert string to a BigInt," in ToBigInt() 163 THROW_TYPE_ERROR_AND_RETURN(thread, "Cannot convert a Symbol value to a BigInt", JSTaggedNumber::Exception()); in ToBigInt() 168 THROW_TYPE_ERROR_AND_RETURN(thread, "Cannot convert a Unknown value to a BigInt", JSTaggedNumbe in ToBigInt() [all...] |
H A D | global_env_constants.cpp | 151 factory->NewSEcmaReadOnlyHClass(hClass, BigInt::SIZE, JSType::BIGINT)); in InitSharedRootsClasses() 275 SetConstant(ConstantIndex::UINT64_MAX_BIGINT_INDEX, BigInt::CreateUint64MaxBigInt(thread)); in InitSharedMiscellanious() 276 SetConstant(ConstantIndex::INT64_MAX_BIGINT_INDEX, BigInt::CreateInt64MaxBigInt(thread)); in InitSharedMiscellanious()
|
/arkcompiler/ets_runtime/ecmascript/builtins/tests/ |
H A D | builtins_bigint_test.cpp | 27 using BigInt = ecmascript::BigInt;
79 // new BigInt(123)
89 // new BigInt("456")
110 JSHandle<BigInt> bigIntHandle(thread, result);
in HWTEST_F_L0() 111 JSHandle<EcmaString> resultStr = BigInt::ToString(thread, bigIntHandle);
in HWTEST_F_L0() 126 JSHandle<BigInt> bigIntHandle(thread, result);
in HWTEST_F_L0() 127 JSHandle<EcmaString> resultStr = BigInt::ToString(thread, bigIntHandle);
in HWTEST_F_L0() 142 JSHandle<BigInt> bigIntHandle(thread, result);
in HWTEST_F_L0() 143 JSHandle<EcmaString> resultStr = BigInt in HWTEST_F_L0() [all...] |
/arkcompiler/ets_runtime/ecmascript/builtins/ |
H A D | builtins_bigint.cpp | 32 BUILTINS_API_TRACE(thread, BigInt, Constructor); in BigIntConstructor() 37 THROW_TYPE_ERROR_AND_RETURN(thread, "BigInt is not a constructor", JSTaggedValue::Exception()); in BigIntConstructor() 45 BUILTINS_API_TRACE(thread, BigInt, Constructor); in BigIntConstructorInternal() 53 return BigInt::NumberToBigInt(thread, Primitive); in BigIntConstructorInternal() 63 BUILTINS_API_TRACE(thread, BigInt, AsUintN); in AsUintN() 73 JSHandle<BigInt> jsBigintVal(thread, jsBigint); in AsUintN() 74 // 3. Return a BigInt representing bigint modulo 2bits. in AsUintN() 75 return BigInt::AsUintN(thread, index, jsBigintVal); in AsUintN() 82 BUILTINS_API_TRACE(thread, BigInt, AsIntN); in AsIntN() 92 JSHandle<BigInt> jsBigintVa in AsIntN() [all...] |
H A D | builtins_atomics.cpp | 191 v = JSHandle<BigInt>::Cast(value)->ToInt64(); in Wait() 357 BigInt::BigIntToInt64(thread, value, &val, &lossless); in AtomicReadModifyWriteCase() 364 BigInt::BigIntToUint64(thread, value, &val, &lossless); in AtomicReadModifyWriteCase() 527 return BigInt::Int64ToBigInt(thread, result).GetTaggedValue(); in HandleWithBigInt64() 531 BigInt::BigIntToInt64(thread, newValue, &newVal, &lossless); in HandleWithBigInt64() 537 return BigInt::Int64ToBigInt(thread, result).GetTaggedValue(); in HandleWithBigInt64() 554 return BigInt::Uint64ToBigInt(thread, result).GetTaggedValue(); in HandleWithBigUint64() 558 BigInt::BigIntToUint64(thread, newValue, &newVal, &lossless); in HandleWithBigUint64() 564 return BigInt::Uint64ToBigInt(thread, result).GetTaggedValue(); in HandleWithBigUint64()
|
H A D | builtins_arraybuffer.cpp | 584 return BigInt::Uint64ToBigInt(thread, pTmp).GetTaggedValue(); in GetValueFromBufferForBigInt() 586 return BigInt::Int64ToBigInt(thread, pTmp).GetTaggedValue(); in GetValueFromBufferForBigInt() 679 BigInt::BigIntToUint64(thread, val, reinterpret_cast<uint64_t *>(&value), &lossless); in SetValueInBufferForBigInt() 681 BigInt::BigIntToInt64(thread, val, reinterpret_cast<int64_t *>(&value), &lossless); in SetValueInBufferForBigInt() 703 BigInt::BigIntToUint64(thread, valHandle, reinterpret_cast<uint64_t *>(&value), &lossless); in SetValueInBufferForBigInt() 705 BigInt::BigIntToInt64(thread, valHandle, reinterpret_cast<int64_t *>(&value), &lossless); in SetValueInBufferForBigInt() 918 BigInt::BigIntToUint64(thread, valHandle, reinterpret_cast<uint64_t *>(&value), &lossless); in FastSetValueInBufferForBigInt() 920 BigInt::BigIntToInt64(thread, valHandle, reinterpret_cast<int64_t *>(&value), &lossless); in FastSetValueInBufferForBigInt()
|
/arkcompiler/ets_runtime/test/moduletest/bigint/ |
H A D | bigint.js | 17 * @tc.name:BigInt 18 * @tc.desc:test BigInt 27 BigInt.asUintN(2147483649, -1873965464n); 78 let a = BigInt(9007199254740991); 79 let b = BigInt(0x1fffffffffffff); 80 let c = BigInt(0b11111111111111111111111111111111111111111111111111111); 81 let d = BigInt(9007199254740991); 107 print(BigInt.asUintN(2**32, 42n)); 108 print(BigInt.asIntN(2**32, 42n));
|
/arkcompiler/toolchain/tooling/test/testcases/js/ |
H A D | watch_variable.js | 46 var bigint0 = BigInt(999n); 137 var bigint1 = BigInt(9007199254740991n); 138 var bigint2 = BigInt(9007199254740991); 139 var bigint3 = BigInt("9007199254740991"); 140 var bigint4 = BigInt("0x1fffffffffffff"); 141 var bigint5 = BigInt(0x1fffffffffffff); 142 var bigint6 = BigInt("0b11111111111111111111111111111111111111111111111111111"); 151 var bigint15 = BigInt(0b11111111111111); 152 var bigint16 = BigInt(0); 154 var bigint18 = BigInt(12 [all...] |
H A D | variable_first.js | 43 var bigint0 = BigInt(999n); 134 var bigint1 = BigInt(9007199254740991n); 135 var bigint2 = BigInt(9007199254740991); 136 var bigint3 = BigInt("9007199254740991"); 137 var bigint4 = BigInt("0x1fffffffffffff"); 138 var bigint5 = BigInt(0x1fffffffffffff); 139 var bigint6 = BigInt("0b11111111111111111111111111111111111111111111111111111"); 148 var bigint15 = BigInt(0b11111111111111); 149 var bigint16 = BigInt(0); 151 var bigint18 = BigInt(12 [all...] |
H A D | export_variable_second.js | 41 export var bigint6 = BigInt(99999n); 68 var bigint8 = BigInt(9999n);
|
H A D | module_variable.js | 117 export var bigint0 = BigInt(999n); 149 var bigint1 = BigInt(9999n); 199 var bigint2 = BigInt(9999n);
|
H A D | variable_second.js | 43 var bigint0 = BigInt(999n);
|
/arkcompiler/ets_runtime/test/moduletest/regress/ |
H A D | regress.js | 65 print(BigInt("-0 ") == -0); 67 print(BigInt("-0") == -0); 71 print(BigInt("-0 ") > -1); 73 print(BigInt("-0") > -1); 76 print(BigInt("-0 ") & 1n); 77 print(BigInt("-0") & 1n); 79 var zero = BigInt("-0 "); 81 zero = BigInt("-0");
|
/arkcompiler/ets_runtime/test/moduletest/typedarrayjoin/ |
H A D | typedarrayjoin.js | 51 BigInt.prototype.toString = detachBuffer;
53 BigInt.prototype.toLocaleString = detachBuffer;
50 BigInt.prototype.toString = detachBuffer; global() class
|
/arkcompiler/ets_runtime/test/fuzztest/builtinsarraybuffergetvaluefrombufferforbigint_fuzzer/ |
H A D | builtinsarraybuffergetvaluefrombufferforbigint_fuzzer.cpp | 52 JSHandle<BigInt> bigIntNum = BigInt::Uint32ToBigInt(thread, input); in BuiltinsArrayBufferGetValueFromBufferForBigIntFuzzTest()
|
/arkcompiler/runtime_core/static_core/plugins/ets/tests/interop_js/tests/interfaces/interface_method_returns_value/js_interface/ |
H A D | index.js | 72 return BigInt(exports.INT_VALUE); 132 return BigInt(exports.INT_VALUE); 169 return arg / BigInt(2);
|
/arkcompiler/ets_runtime/ecmascript/stubs/ |
H A D | runtime_stubs-inl.h | 64 JSHandle<BigInt> bigValue(inputVal); in RuntimeInc() 65 return BigInt::BigintAddOne(thread, bigValue).GetTaggedValue(); in RuntimeInc() 76 JSHandle<BigInt> bigValue(inputVal); in RuntimeDec() 77 return BigInt::BigintSubOne(thread, bigValue).GetTaggedValue(); in RuntimeDec() 93 JSHandle<BigInt> bigBaseVale(valBase); in RuntimeExp() 94 JSHandle<BigInt> bigExponentValue(valExponent); in RuntimeExp() 95 return BigInt::Exponentiate(thread, bigBaseVale, bigExponentValue).GetTaggedValue(); in RuntimeExp() 97 THROW_TYPE_ERROR_AND_RETURN(thread, "Cannot mix BigInt and other types, use explicit conversions", in RuntimeExp() 820 JSHandle<BigInt> bigValue(inputVal); in RuntimeNeg() 821 return BigInt in RuntimeNeg() [all...] |
/arkcompiler/ets_runtime/ecmascript/dfx/hprof/tests/js_files/ |
H A D | heapdump.js | 30 let bigInt = BigInt(9007199254740991);
|
/arkcompiler/ets_frontend/ets2panda/lexer/token/ |
H A D | token.h | 102 const util::StringView &BigInt() const in BigInt() function in ark::es2panda::lexer::Token
|
/arkcompiler/ets_frontend/es2panda/lexer/token/ |
H A D | token.h | 88 const util::StringView &BigInt() const in BigInt() function in panda::es2panda::lexer::Token
|
/arkcompiler/ets_runtime/ecmascript/base/ |
H A D | number_helper.cpp | 1157 return BigInt::Int32ToBigInt(thread, 0).GetTaggedValue(); 1166 return BigInt::Int32ToBigInt(thread, 0).GetTaggedValue(); 1185 return BigInt::Int32ToBigInt(thread, 0).GetTaggedValue(); 1211 return BigInt::Int32ToBigInt(thread, 0).GetTaggedValue(); 1227 return BigInt::Uint32ToBigInt(thread, 0).GetTaggedValue();
|