Home
last modified time | relevance | path

Searched refs:base (Results 1 – 25 of 205) sorted by relevance

123456789

/ark/js_runtime/ecmascript/builtins/tests/
Dbuiltins_number_test.cpp107 ecmaRuntimeCallInfo->SetCallArg(0, JSTaggedValue(base::MAX_VALUE)); in HWTEST_F_L0()
134 ecmaRuntimeCallInfo->SetCallArg(0, JSTaggedValue(base::NAN_VALUE)); in HWTEST_F_L0()
147 ecmaRuntimeCallInfo->SetCallArg(0, JSTaggedValue(base::POSITIVE_INFINITY)); in HWTEST_F_L0()
412 … ASSERT_EQ(base::NumberHelper::StringToDouble(sp.begin(), sp.end(), 0, base::IGNORE_TRAILING), 0); in HWTEST_F_L0()
415 … ASSERT_EQ(base::NumberHelper::StringToDouble(sp.begin(), sp.end(), 0, base::IGNORE_TRAILING), 0); in HWTEST_F_L0()
418 … ASSERT_EQ(base::NumberHelper::StringToDouble(sp.begin(), sp.end(), 0, base::IGNORE_TRAILING), 0); in HWTEST_F_L0()
421 … ASSERT_EQ(base::NumberHelper::StringToDouble(sp.begin(), sp.end(), 0, base::IGNORE_TRAILING), 0); in HWTEST_F_L0()
424 …ASSERT_EQ(base::NumberHelper::StringToDouble(sp.begin(), sp.end(), 0, base::IGNORE_TRAILING), 0.4); in HWTEST_F_L0()
427 … ASSERT_EQ(base::NumberHelper::StringToDouble(sp.begin(), sp.end(), 0, base::IGNORE_TRAILING), 10); in HWTEST_F_L0()
430 …ASSERT_EQ(base::NumberHelper::StringToDouble(sp.begin(), sp.end(), 0, base::IGNORE_TRAILING), 1000… in HWTEST_F_L0()
[all …]
Dbuiltins_math_test.cpp28 using namespace panda::ecmascript::base;
125 JSTaggedValue expect = BuiltinsBase::GetTaggedDouble(base::NAN_VALUE); in HWTEST_F_L0()
132 const double testValue = base::MAX_VALUE + 1; in HWTEST_F_L0()
141 JSTaggedValue expect = BuiltinsBase::GetTaggedDouble(base::MAX_VALUE); in HWTEST_F_L0()
148 const double testValue = base::MIN_VALUE + 1; in HWTEST_F_L0()
164 const double testValue = base::POSITIVE_INFINITY + 1; in HWTEST_F_L0()
173 JSTaggedValue expect = BuiltinsBase::GetTaggedDouble(base::POSITIVE_INFINITY); in HWTEST_F_L0()
180 const double testValue = -base::POSITIVE_INFINITY - 1; in HWTEST_F_L0()
189 JSTaggedValue expect = BuiltinsBase::GetTaggedDouble(base::POSITIVE_INFINITY); in HWTEST_F_L0()
196 const double testValue = base::NAN_VALUE; in HWTEST_F_L0()
[all …]
/ark/js_runtime/ecmascript/compiler/llvm/
Dllvm_stackmap_parser.cpp67 uintptr_t base = 0; in PrintCallSiteInfo() local
87 if (base == derived) { in PrintCallSiteInfo()
88 LOG_ECMA(INFO) << std::hex << "visit base:" << base << " base Value: " << in PrintCallSiteInfo()
89 *reinterpret_cast<uintptr_t *>(base); in PrintCallSiteInfo()
91 LOG_ECMA(INFO) << std::hex << "push base:" << base << " base Value: " << in PrintCallSiteInfo()
92 *reinterpret_cast<uintptr_t *>(base) << " derived:" << derived; in PrintCallSiteInfo()
95 base = reinterpret_cast<uintptr_t>(address); in PrintCallSiteInfo()
112 uintptr_t base = 0; in CollectStackMapSlots() local
131 if (base == derived) { in CollectStackMapSlots()
132 baseSet.emplace(base); in CollectStackMapSlots()
[all …]
/ark/js_runtime/ecmascript/mem/
Dmem_controller.h133 static double CalculateAverageSpeed(const base::GCRingBuffer<BytesAndDuration, LENGTH> &buffer);
134 static double CalculateAverageSpeed(const base::GCRingBuffer<BytesAndDuration, LENGTH> &buffer,
159 base::GCRingBuffer<BytesAndDuration, LENGTH> recordedMarkCompacts_;
160 base::GCRingBuffer<BytesAndDuration, LENGTH> recordedNewSpaceAllocations_;
161 base::GCRingBuffer<BytesAndDuration, LENGTH> recordedOldSpaceAllocations_;
162 base::GCRingBuffer<BytesAndDuration, LENGTH> recordedNonmovableSpaceAllocations_;
163 base::GCRingBuffer<BytesAndDuration, LENGTH> recordedCodeSpaceAllocations_;
165 base::GCRingBuffer<BytesAndDuration, LENGTH> recordedConcurrentMarks_;
166 base::GCRingBuffer<BytesAndDuration, LENGTH> recordedSemiConcurrentMarks_;
167 base::GCRingBuffer<double, LENGTH> recordedSurvivalRates_;
/ark/js_runtime/ecmascript/builtins/
Dbuiltins_errors.h23 class BuiltinsError : public base::BuiltinsBase {
32 class BuiltinsRangeError : public base::BuiltinsBase {
40 class BuiltinsReferenceError : public base::BuiltinsBase {
48 class BuiltinsTypeError : public base::BuiltinsBase {
58 class BuiltinsURIError : public base::BuiltinsBase {
66 class BuiltinsSyntaxError : public base::BuiltinsBase {
74 class BuiltinsEvalError : public base::BuiltinsBase {
Dbuiltins_string.cpp101 std::u16string u16str = base::StringHelper::Utf16ToU16String(&codePointValue, 1); in FromCharCode()
110 …std::u16string nextU16str = base::StringHelper::Utf16ToU16String(valueTable.data(), argLength - 1); in FromCharCode()
111 u16str = base::StringHelper::Append(u16str, nextU16str); in FromCharCode()
151 std::u16string nextU16str1 = base::StringHelper::Utf16ToU16String(&cu1, 1); in FromCodePoint()
152 std::u16string nextU16str2 = base::StringHelper::Utf16ToU16String(&cu2, 1); in FromCodePoint()
153 u16str = base::StringHelper::Append(u16str, nextU16str1); in FromCodePoint()
154 u16str = base::StringHelper::Append(u16str, nextU16str2); in FromCodePoint()
158 std::u16string nextU16str = base::StringHelper::Utf16ToU16String(&u16tCp, 1); in FromCodePoint()
159 u16str = base::StringHelper::Append(u16str, nextU16str); in FromCodePoint()
210 … u16str += base::StringHelper::Utf16ToU16String(nextSeg->GetDataUtf16(), nextSeg->GetLength()); in Raw()
[all …]
Dbuiltins_math.cpp26 using NumberHelper = base::NumberHelper;
27 using RandomGenerator = base::RandomGenerator;
57 double result = base::NAN_VALUE; in Acos()
75 double result = base::NAN_VALUE; in Acosh()
92 double result = base::NAN_VALUE; in Asin()
109 double result = base::NAN_VALUE; in Asinh()
127 double result = base::NAN_VALUE; in Atan()
145 double result = base::NAN_VALUE; in Atanh()
161 double result = base::NAN_VALUE; in Atan2()
191 double result = base::NAN_VALUE; in Cbrt()
[all …]
Dbuiltins_number.cpp32 using NumberHelper = base::NumberHelper;
141 result = (value == number.GetNumber()) && std::abs(value) <= base::MAX_SAFE_INTEGER; in IsSafeInteger()
155 return GetTaggedDouble(base::NAN_VALUE); in ParseFloat()
164 …size_t len = base::utf_helper::Utf16ToUtf8Size(numberString->GetDataUtf16(), numberString->GetLeng… in ParseFloat()
166 len = base::utf_helper::ConvertRegionUtf16ToUtf8(numberString->GetDataUtf16(), buf.data(), in ParseFloat()
175 return BuiltinsBase::GetTaggedDouble(base::NAN_VALUE); in ParseFloat()
177 double result = NumberHelper::StringToDouble(str.begin(), str.end(), 0, base::IGNORE_TRAILING); in ParseFloat()
203 …size_t len = base::utf_helper::Utf16ToUtf8Size(numberString->GetDataUtf16(), numberString->GetLeng… in ParseInt()
205 len = base::utf_helper::ConvertRegionUtf16ToUtf8(numberString->GetDataUtf16(), buf.data(), in ParseInt()
258 if (fraction < base::MIN_FRACTION || fraction > base::MAX_FRACTION) { in ToExponential()
[all …]
Dbuiltins_global.cpp31 using NumberHelper = base::NumberHelper;
32 using StringHelper = base::StringHelper;
222 … if (cc >= base::utf_helper::DECODE_TRAIL_LOW && cc <= base::utf_helper::DECODE_TRAIL_HIGH) { in Encode()
236 if (cc < base::utf_helper::DECODE_LEAD_LOW || cc > base::utf_helper::DECODE_LEAD_HIGH) { in Encode()
244 … if (kc < base::utf_helper::DECODE_TRAIL_LOW || kc > base::utf_helper::DECODE_TRAIL_HIGH) { in Encode()
248 vv = base::utf_helper::UTF16Decode(cc, kc); in Encode()
434 if (!base::utf_helper::IsValidUTF8(oct)) { in Decode()
439 if (vv < base::utf_helper::DECODE_SECOND_FACTOR) { in Decode()
447 uint16_t lv = (((vv - base::utf_helper::DECODE_SECOND_FACTOR) & BIT16_MASK) + in Decode()
448 base::utf_helper::DECODE_TRAIL_LOW); in Decode()
[all …]
Dbuiltins_json.cpp40 …JSHandle<JSObject> syntaxError = factory->GetJSError(base::ErrorType::SYNTAX_ERROR, "arg is empty"… in Parse()
49 panda::ecmascript::base::JsonParser<uint8_t> parser(thread); in Parse()
52 panda::ecmascript::base::JsonParser<uint16_t> parser(thread); in Parse()
71 … result = base::Internalize::InternalizeJsonProperty(thread, root, rootName, callbackfnHandle); in Parse()
101 panda::ecmascript::base::JsonStringifier stringifier(thread); in Stringify()
Dbuiltins_string_iterator.cpp67 if (position + 1 == len || first < base::utf_helper::DECODE_LEAD_LOW || in Next()
68 first > base::utf_helper::DECODE_LEAD_HIGH) { in Next()
78 … if (second < base::utf_helper::DECODE_TRAIL_LOW || second > base::utf_helper::DECODE_TRAIL_HIGH) { in Next()
Dbuiltins_ark_tools.cpp20 using StringHelper = base::StringHelper;
30 LOG(ERROR, RUNTIME) << ": " << base::StringHelper::ToStdString(*str); in ObjectDump()
Dbuiltins_bigint.cpp137 double radix = base::DECIMAL; in ToString()
146 if (radix < base::MIN_RADIX || radix > base::MAX_RADIX) { in ToString()
151 if (radix == base::DECIMAL) { in ToString()
/ark/js_runtime/ecmascript/
Djs_tagged_number.h58 return base::NumberHelper::DoubleToInt(GetDouble(), base::INT32_BITS); in ToInt32()
68 return base::NumberHelper::DoubleToInt(GetNumber(), base::INT16_BITS); in ToInt16()
78 return base::NumberHelper::DoubleToInt(GetNumber(), base::INT8_BITS); in ToInt8()
88 return base::NumberHelper::NumberToString(thread, *this); in ToString()
Dframes.h274 OptimizedFrameBase base; variable
280 … return MEMBER_OFFSET(OptimizedFrame, callsiteSp) - MEMBER_OFFSET(OptimizedFrame, base.prevFp); in GetCallsiteSpToFpDelta()
285 - MEMBER_OFFSET(OptimizedFrame, base.prevFp)); in GetFrameFromSp()
289 return base.prevFp; in GetPrevFrameFp()
298 OptimizedFrameBase base; variable
308 MEMBER_OFFSET(OptimizedEntryFrame, base.prevFp); in GetInterpreterFrameFpToFpDelta()
314 MEMBER_OFFSET(OptimizedEntryFrame, base.prevFp)); in GetFrameFromSp()
360 InterpretedFrameBase base; member
363 return base.prev; in GetPrevFrameFp()
Djs_tagged_value-inl.h96 return JSTaggedNumber(base::NAN_VALUE); in ToNumber()
119 size_t len = base::utf_helper::Utf16ToUtf8Size(strObj->GetDataUtf16(), strLen) - 1; in ToNumber()
121 …len = base::utf_helper::ConvertRegionUtf16ToUtf8(strObj->GetDataUtf16(), buf.data(), strLen, len, … in ToNumber()
126 double d = base::NumberHelper::StringToDouble(str.begin(), str.end(), 0, in ToNumber()
127base::ALLOW_BINARY + base::ALLOW_OCTAL + base::ALLOW_HEX); in ToNumber()
169 … JSHandle<JSTaggedValue> value(thread, base::NumberHelper::StringToBigInt(thread, primValue)); in ToBigInt()
192 JSHandle<BigInt> base = BigInt::Int32ToBigInt(thread, 2); // 2 : base value in ToBigInt64() local
193 JSHandle<BigInt> tVal = BigInt::Exponentiate(thread, base, exponent); in ToBigInt64()
196 JSHandle<BigInt> resValue = BigInt::Exponentiate(thread, base, exponentone); in ToBigInt64()
210 JSHandle<BigInt> base = BigInt::Int32ToBigInt(thread, 2); // 2 : base value in ToBigUint64() local
[all …]
Djs_date.cpp23 using NumberHelper = base::NumberHelper;
123 return base::NAN_VALUE; in MakeTime()
145 return base::NAN_VALUE; in MakeDay()
155 return base::NAN_VALUE; in MakeDate()
165 return base::NAN_VALUE; in TimeClip()
488 JSHandle<JSTaggedValue> msg = base::BuiltinsBase::GetCallArg(argv, 0); in Parse()
501 return JSTaggedValue(base::NAN_VALUE); in Parse()
527 JSHandle<JSTaggedValue> yearArg = base::BuiltinsBase::GetCallArg(argv, 0); in UTC()
539 year = base::NAN_VALUE; in UTC()
545 JSHandle<JSTaggedValue> value = base::BuiltinsBase::GetCallArg(argv, index); in UTC()
[all …]
Decma_exceptions.cpp36 SetException(jsThread, *factory->GetJSError(base::ErrorType::REFERENCE_ERROR, msg)); in ThrowException()
41 SetException(jsThread, *factory->GetJSError(base::ErrorType::TYPE_ERROR, msg)); in ThrowException()
/ark/js_runtime/ecmascript/base/
Dnumber_helper.cpp29 namespace panda::ecmascript::base { namespace
67 if (base::utf_helper::ConvertRegionUtf8ToUtf16(*ptr, &c, end - *ptr, 1, 0) <= 0) { in GotoNonspace()
124 … ss << std::setiosflags(std::ios::scientific) << std::setprecision(base::MAX_PRECISION) << number; in DoubleToExponential()
364 std::string base = scientificStr.substr(0, indexOfE); in NumberToString() local
366 base = base.substr(0, base.find_last_not_of('0') + 1); in NumberToString()
367 int k = static_cast<int>(base.size()) - 1; in NumberToString()
370 base.erase(1, 1); in NumberToString()
375 base += std::string(n - k, '0'); in NumberToString()
380 base.insert(n, 1, '.'); in NumberToString()
386 base.erase(1, 1); in NumberToString()
[all …]
/ark/js_runtime/ecmascript/tooling/
DBUILD.gn39 "base/pt_events.cpp",
40 "base/pt_json.cpp",
41 "base/pt_params.cpp",
42 "base/pt_returns.cpp",
43 "base/pt_script.cpp",
44 "base/pt_types.cpp",
/ark/runtime_core/runtime/core/
Dcore_itable_builder.h25 void Build([[maybe_unused]] ClassLinker *class_linker, [[maybe_unused]] Class *base, in Build() argument
28 ASSERT(base->IsObjectClass()); in Build()
29 ASSERT(base->GetITable().Size() == 0); in Build()
/ark/runtime_core/verification/cflow/
Dcflow_common.cpp24 PandaString OffsetAsHexStr(const void *base, const void *ptr) in OffsetAsHexStr() argument
26 …fset = static_cast<uint32_t>(reinterpret_cast<uintptr_t>(ptr) - reinterpret_cast<uintptr_t>(base)); in OffsetAsHexStr()
/ark/js_runtime/ecmascript/ic/
Dic_binary_op-inl.h172 return JSTaggedValue(base::NAN_VALUE); in DivWithTSType()
175 base::DOUBLE_SIGN_MASK; in DivWithTSType()
176 … return JSTaggedValue(bit_cast<double>(flagBit ^ (bit_cast<uint64_t>(base::POSITIVE_INFINITY)))); in DivWithTSType()
205 return JSTaggedValue(base::NAN_VALUE); in ModWithTSType()
224 return JSTaggedValue(base::NAN_VALUE); in ModWithTSType()
247 …left.IsInt() ? left.GetInt() : base::NumberHelper::DoubleToInt(left.GetDouble(), base::INT32_BITS); in GetBitOPDate()
249 …right.IsInt() ? right.GetInt() : base::NumberHelper::DoubleToInt(right.GetDouble(), base::INT32_BI… in GetBitOPDate()
/ark/js_runtime/ecmascript/interpreter/
Dinterpreter-inl.h406 state->base.prev = sp; in ExecuteNative()
407 state->base.type = FrameType::INTERPRETER_FRAME; in ExecuteNative()
450 breakState->base.prev = sp; in Execute()
451 breakState->base.type = FrameType::INTERPRETER_FRAME; in Execute()
519 state->base.prev = prevSp; in Execute()
520 state->base.type = FrameType::INTERPRETER_FRAME; in Execute()
566 breakState->base.prev = currentSp; in GeneratorReEnterInterpreter()
567 breakState->base.type = FrameType::INTERPRETER_FRAME; in GeneratorReEnterInterpreter()
595 state->base.prev = breakSp; in GeneratorReEnterInterpreter()
596 state->base.type = FrameType::INTERPRETER_FRAME; in GeneratorReEnterInterpreter()
[all …]
/ark/js_runtime/
DBUILD.gn46 "//ark/js_runtime/ecmascript/base/tests:unittest",
67 "//ark/js_runtime/ecmascript/base/tests:host_unittest",
238 "//base/hiviewdfx/hitrace/interfaces/native/innerkits/include",
261 "ecmascript/base/array_helper.cpp",
262 "ecmascript/base/builtins_base.cpp",
263 "ecmascript/base/error_helper.cpp",
264 "ecmascript/base/json_parser.cpp",
265 "ecmascript/base/json_stringifier.cpp",
266 "ecmascript/base/number_helper.cpp",
267 "ecmascript/base/string_helper.cpp",
[all …]

123456789