/arkcompiler/ets_runtime/ecmascript/tests/ |
D | js_bigint_test.cpp | 64 JSHandle<BigInt> bigint1 = BigIntHelper::SetBigInt(thread, str1); in HWTEST_F_L0() 65 JSHandle<BigInt> bigint2 = BigIntHelper::SetBigInt(thread, str2); in HWTEST_F_L0() 66 JSHandle<BigInt> bigint3 = BigIntHelper::SetBigInt(thread, str3); in HWTEST_F_L0() 67 JSHandle<BigInt> bigint4 = BigIntHelper::SetBigInt(thread, str4); in HWTEST_F_L0() 68 …EXPECT_EQ(BigInt::Compare(bigint1.GetTaggedValue(), bigint1.GetTaggedValue()), ComparisonResult::E… in HWTEST_F_L0() 69 …EXPECT_EQ(BigInt::Compare(bigint3.GetTaggedValue(), bigint2.GetTaggedValue()), ComparisonResult::L… in HWTEST_F_L0() 70 …EXPECT_EQ(BigInt::Compare(bigint1.GetTaggedValue(), bigint2.GetTaggedValue()), ComparisonResult::L… in HWTEST_F_L0() 71 …EXPECT_EQ(BigInt::Compare(bigint2.GetTaggedValue(), bigint1.GetTaggedValue()), ComparisonResult::G… in HWTEST_F_L0() 72 …EXPECT_EQ(BigInt::Compare(bigint2.GetTaggedValue(), bigint3.GetTaggedValue()), ComparisonResult::G… in HWTEST_F_L0() 73 …EXPECT_EQ(BigInt::Compare(bigint3.GetTaggedValue(), bigint4.GetTaggedValue()), ComparisonResult::L… in HWTEST_F_L0() [all …]
|
D | js_serializer_test.cpp | 814 JSHandle<BigInt> bigInt1 = BigIntHelper::SetBigInt(thread, str1); in BigIntTest() 815 JSHandle<BigInt> bigInt2 = BigIntHelper::SetBigInt(thread, str2); in BigIntTest() 816 JSHandle<BigInt> bigInt3 = BigIntHelper::SetBigInt(thread, str3); in BigIntTest() 817 JSHandle<BigInt> bigInt4 = BigInt::Uint32ToBigInt(thread, 0); // 0 : test case in BigIntTest() 818 JSHandle<BigInt> bigInt5 = BigIntHelper::SetBigInt(thread, str4, BigInt::DECIMAL); in BigIntTest() 819 JSHandle<BigInt> bigInt6 = BigInt::Uint64ToBigInt(thread, ULLONG_MAX); in BigIntTest() 820 JSHandle<BigInt> bigInt7 = BigInt::Uint64ToBigInt(thread, UINT_MAX); in BigIntTest() 821 … JSHandle<BigInt> bigInt8 = BigInt::Uint32ToBigInt(thread, std::numeric_limits<uint32_t>::max()); in BigIntTest() 822 … JSHandle<BigInt> bigInt9 = BigInt::Uint32ToBigInt(thread, std::numeric_limits<uint32_t>::min()); in BigIntTest() 823 JSHandle<BigInt> bigInt10 = BigInt::Int64ToBigInt(thread, LLONG_MAX); in BigIntTest() [all …]
|
/arkcompiler/ets_frontend/ets2panda/test/runtime/ets/ |
D | BigInt.ets | 17 assert new BigInt("10").operatorBitwiseAnd(new BigInt("2")).toString().equals("2"); 18 assert new BigInt("256").operatorBitwiseAnd(new BigInt("1")).toString().equals("0"); 19 …assert new BigInt("3124378143267041203423").operatorBitwiseAnd(new BigInt("43621978")).toString().… 20 assert new BigInt("256").operatorBitwiseAnd(new BigInt("256")).toString().equals("256"); 21 assert new BigInt("12345678").operatorBitwiseAnd(new BigInt("1234")).toString().equals("66"); 25 assert new BigInt("10").operatorBitwiseOr(new BigInt("2")).toString().equals("10"); 26 assert new BigInt("256").operatorBitwiseOr(new BigInt("1")).toString().equals("257"); 27 assert new BigInt("256").operatorBitwiseOr(new BigInt("256")).toString().equals("256"); 28 …assert new BigInt("3124378143267041203423").operatorBitwiseOr(new BigInt("43621978")).toString().e… 29 … assert new BigInt("12345678").operatorBitwiseOr(new BigInt("1234")).toString().equals("12346846"); [all …]
|
/arkcompiler/ets_runtime/ecmascript/ |
D | js_bigint.h | 31 class BigInt : public TaggedObject { 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<BigIn… 54 static JSHandle<BigInt> BitwiseAND(JSThread *thread, JSHandle<BigInt> x, JSHandle<BigInt> y); 55 static JSHandle<BigInt> BitwiseXOR(JSThread *thread, JSHandle<BigInt> x, JSHandle<BigInt> y); 56 static JSHandle<BigInt> BitwiseOR(JSThread *thread, JSHandle<BigInt> x, JSHandle<BigInt> y); 57 … static JSHandle<BigInt> BitwiseSubOne(JSThread *thread, JSHandle<BigInt> bigint, uint32_t maxLen); 58 static JSHandle<BigInt> BitwiseAddOne(JSThread *thread, JSHandle<BigInt> bigint); 59 static JSHandle<EcmaString> ToString(JSThread *thread, JSHandle<BigInt> bigint, [all …]
|
D | js_bigint.cpp | 68 JSHandle<BigInt> BigInt::GetUint64MaxBigint(JSThread *thread) in GetUint64MaxBigint() 70 JSHandle<BigInt> bigint = CreateBigint(thread, 3); in GetUint64MaxBigint() 71 RETURN_HANDLE_IF_ABRUPT_COMPLETION(BigInt, thread); in GetUint64MaxBigint() 78 JSHandle<BigInt> BigInt::GetInt64MaxBigint(JSThread *thread) in GetInt64MaxBigint() 80 JSHandle<BigInt> bigint = CreateBigint(thread, 2); in GetInt64MaxBigint() 81 RETURN_HANDLE_IF_ABRUPT_COMPLETION(BigInt, thread); in GetInt64MaxBigint() 87 JSHandle<BigInt> BigIntHelper::SetBigInt(JSThread *thread, const CString &numStr, uint32_t currentR… in SetBigInt() 95 if (currentRadix != BigInt::BINARY) { in SetBigInt() 96 binaryStr = Conversion(numStr.substr(flag), BigInt::BINARY, currentRadix); in SetBigInt() 101 JSHandle<BigInt> bigint; in SetBigInt() [all …]
|
D | js_tagged_value-inl.h | 70 BigInt *bigint = BigInt::Cast(GetTaggedObject()); in ToBoolean() 143 return BigInt::Int32ToBigInt(thread, 1).GetTaggedValue(); in ToBigInt() 146 return BigInt::Int32ToBigInt(thread, 0).GetTaggedValue(); in ToBigInt() 176 JSHandle<BigInt> value(thread, ToBigInt(thread, tagged)); in ToBigInt64() 178 JSHandle<BigInt> tVal = BigInt::GetUint64MaxBigint(thread); in ToBigInt64() 180 JSHandle<BigInt> int64bitVal = BigInt::FloorMod(thread, value, tVal); in ToBigInt64() 181 JSHandle<BigInt> resValue = BigInt::GetInt64MaxBigint(thread); in ToBigInt64() 183 if (!BigInt::LessThan(int64bitVal.GetTaggedValue(), resValue.GetTaggedValue())) { in ToBigInt64() 184 return BigInt::Subtract(thread, int64bitVal, tVal).GetTaggedValue(); in ToBigInt64() 192 JSHandle<BigInt> value(thread, ToBigInt(thread, tagged)); in ToBigUint64() [all …]
|
/arkcompiler/runtime_core/static_core/plugins/ets/stdlib/escompat/ |
D | BigInt.ets | 19 * `bigint` is an alias for type `BigInt` 21 export type bigint = BigInt; 26 * BigInt class stub 28 export class BigInt { 58 let bigint = new BigInt(d.toString()); 64 let bigint = new BigInt(d.toString()); 70 let bigint = new BigInt(d.toString()); 76 let bigint = new BigInt(d.toString()); 82 let bigint = new BigInt(d.toString()); 93 throw new Error("BigInt.constructor(boolean): not implemented") [all …]
|
/arkcompiler/ets_runtime/ecmascript/builtins/tests/ |
D | builtins_bigint_test.cpp | 27 using BigInt = ecmascript::BigInt; typedef 117 JSHandle<BigInt> bigIntHandle(thread, result); in HWTEST_F_L0() 118 JSHandle<EcmaString> resultStr = BigInt::ToString(thread, bigIntHandle); in HWTEST_F_L0() 141 JSHandle<BigInt> bigIntHandle(thread, result); in HWTEST_F_L0() 142 JSHandle<EcmaString> resultStr = BigInt::ToString(thread, bigIntHandle); in HWTEST_F_L0() 165 JSHandle<BigInt> bigIntHandle(thread, result); in HWTEST_F_L0() 166 JSHandle<EcmaString> resultStr = BigInt::ToString(thread, bigIntHandle); in HWTEST_F_L0() 189 JSHandle<BigInt> bigIntHandle(thread, result); in HWTEST_F_L0() 190 JSHandle<EcmaString> resultStr = BigInt::ToString(thread, bigIntHandle); in HWTEST_F_L0() 210 JSHandle<BigInt> bigIntHandle(thread, result1); in HWTEST_F_L0() [all …]
|
/arkcompiler/ets_runtime/ecmascript/builtins/ |
D | builtins_bigint.cpp | 33 BUILTINS_API_TRACE(thread, BigInt, Constructor); in BigIntConstructor() 45 return BigInt::NumberToBigInt(thread, Primitive); in BigIntConstructor() 55 BUILTINS_API_TRACE(thread, BigInt, AsUintN); in AsUintN() 64 JSHandle<BigInt> jsBigintVal(thread, jsBigint); in AsUintN() 66 return BigInt::AsUintN(thread, index, jsBigintVal); in AsUintN() 73 BUILTINS_API_TRACE(thread, BigInt, AsIntN); in AsIntN() 82 JSHandle<BigInt> jsBigintVal(thread, jsBigint); in AsIntN() 85 return BigInt::AsintN(thread, index, jsBigintVal); in AsIntN() 92 BUILTINS_API_TRACE(thread, BigInt, ToLocaleString); in ToLocaleString() 156 BUILTINS_API_TRACE(thread, BigInt, ToString); in ToString() [all …]
|
/arkcompiler/ets_runtime/test/moduletest/bigint/ |
D | bigint.js | 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/ |
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(123e45); [all …]
|
D | export_variable_second.js | 41 export var bigint6 = BigInt(99999n); 68 var bigint8 = BigInt(9999n);
|
/arkcompiler/runtime_core/static_core/plugins/ets/tests/ets_func_tests/spec/bigint/ |
D | bigint-arithmetic-add-2-operands-BigInt-1.ets | 17 desc: 3.7.1 Integer Types and Operations. BigInt operations 22 let x1: BigInt = new BigInt(123456789123456789123456789n); 24 let z : BigInt = x1 + x2
|
D | bigint-arithmetic-mul-2-operands-BigInt-1.ets | 17 desc: 3.7.1 Integer Types and Operations. BigInt operations 23 let x2: BigInt = 123456789123456789123456789n; 24 let z : BigInt = x1 * x2
|
D | bigint-arithmetic-div-2-operands-BigInt-1.ets | 17 desc: 3.7.1 Integer Types and Operations. BigInt operations 23 let x2: BigInt = 123456789123456789123456789n; 24 let z : BigInt = x1 / x2
|
D | bigint-arithmetic-add-2-operands-BigInt.ets | 17 desc: 3.7.1 Integer Types and Operations. BigInt operations 22 let x1: BigInt = new BigInt(123456789123456789123456789n);
|
D | bigint-arithmetic-sub-2-BigInt-1.ets | 17 desc: 3.7.1 Integer Types and Operations. BigInt operations 23 let x2: BigInt = 123456789123456789123456789n; 24 let z : BigInt = x1 - x2
|
D | bigint-arithmetic-div-2-operands-BigInt.ets | 17 desc: 3.7.1 Integer Types and Operations. BigInt operations 23 let x2: BigInt = 123456789123456789123456789n;
|
D | bigint-arithmetic-mul-2-operands-BigInt.ets | 17 desc: 3.7.1 Integer Types and Operations. BigInt operations 23 let x2: BigInt = 123456789123456789123456789n;
|
/arkcompiler/ets_runtime/test/moduletest/regress/ |
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_frontend/test262/ |
D | es2015_tests.txt | 4281 built-ins/TypedArray/prototype/buffer/BigInt/detached-buffer.js 4282 built-ins/TypedArray/prototype/buffer/BigInt/return-buffer.js 4293 built-ins/TypedArray/prototype/byteLength/BigInt/detached-buffer.js 4294 built-ins/TypedArray/prototype/byteLength/BigInt/return-bytelength.js 4304 built-ins/TypedArray/prototype/byteOffset/BigInt/detached-buffer.js 4305 built-ins/TypedArray/prototype/byteOffset/BigInt/return-byteoffset.js 4316 built-ins/TypedArray/prototype/copyWithin/BigInt/coerced-values-end.js 4317 built-ins/TypedArray/prototype/copyWithin/BigInt/coerced-values-start.js 4318 built-ins/TypedArray/prototype/copyWithin/BigInt/coerced-values-target.js 4319 built-ins/TypedArray/prototype/copyWithin/BigInt/detached-buffer.js [all …]
|
D | es2023_tests.txt | 25 built-ins/TypedArray/prototype/findLast/BigInt/predicate-call-parameters.js 26 built-ins/TypedArray/prototype/findLast/BigInt/return-abrupt-from-predicate-call.js 27 built-ins/TypedArray/prototype/findLast/BigInt/predicate-call-changes-value.js 28 built-ins/TypedArray/prototype/findLast/BigInt/return-undefined-if-predicate-returns-false-value.js 29 built-ins/TypedArray/prototype/findLast/BigInt/predicate-may-detach-buffer.js 30 built-ins/TypedArray/prototype/findLast/BigInt/predicate-call-this-strict.js 31 built-ins/TypedArray/prototype/findLast/BigInt/predicate-not-called-on-empty-array.js 32 built-ins/TypedArray/prototype/findLast/BigInt/return-abrupt-from-this-out-of-bounds.js 33 built-ins/TypedArray/prototype/findLast/BigInt/predicate-is-not-callable-throws.js 34 built-ins/TypedArray/prototype/findLast/BigInt/detached-buffer.js [all …]
|
/arkcompiler/runtime_core/static_core/tests/tests-u-runner/test-lists/ets-func-tests/ |
D | ets-func-tests-excluded-JIT-REPEATS.txt | 6 spec/bigint/bigint-arithmetic-sub-2-BigInt.ets 10 spec/bigint/bigint-arithmetic-sub-2-BigInt-1.ets 37 spec/bigint/bigint-arithmetic-div-2-operands-BigInt-1.ets 39 spec/bigint/bigint-arithmetic-div-2-operands-BigInt.ets 59 spec/bigint/bigint-arithmetic-mul-2-operands-BigInt-1.ets 60 spec/bigint/bigint-arithmetic-mul-2-operands-BigInt.ets 66 spec/bigint/bigint-arithmetic-add-2-operands-BigInt.ets 71 spec/bigint/bigint-arithmetic-add-2-operands-BigInt-1.ets
|
/arkcompiler/ets_runtime/test/moduletest/typedarrayjoin/ |
D | typedarrayjoin.js | 64 BigInt.prototype.toString = detachBuffer; class 66 BigInt.prototype.toLocaleString = detachBuffer;
|
/arkcompiler/ets_runtime/test/fuzztest/builtinsarraybuffergetvaluefrombufferforbigint_fuzzer/ |
D | builtinsarraybuffergetvaluefrombufferforbigint_fuzzer.cpp | 50 JSHandle<BigInt> bigIntNum = BigInt::Uint32ToBigInt(thread, input); in BuiltinsArrayBufferGetValueFromBufferForBigIntFuzzTest()
|