/arkcompiler/ets_runtime/test/moduletest/stringsplit/ |
H A D | stringsplit.js | 36 print(res1.length) 37 print(res1.length == res2.length); 41 print(res3.length) 42 print(res3.length == res4.length); 46 print(res5.length) 47 print(res5.length == res6.length); 51 print(res7.length) [all...] |
/arkcompiler/ets_runtime/ecmascript/base/ |
H A D | dtoa_helper.cpp | 185 void DtoaHelper::Grisu(double value, char *buffer, int *length, int *K) in Grisu() argument 198 DigitGen(W, wPlus, wPlus.f - wMinus.f, buffer, length, K); in Grisu() 201 void DtoaHelper::Dtoa(double value, char *buffer, int *point, int *length) in Dtoa() argument 207 Grisu(value, buffer, length, &k); in Dtoa() 208 *point = *length + k; in Dtoa() 212 BufferVector<char> buffer, int* length) in FillDigits32FixedLength() 215 buffer[(*length) + i] = '0' + number % TEN; in FillDigits32FixedLength() 218 *length += requested_length; in FillDigits32FixedLength() 221 void DtoaHelper::FillDigits32(uint32_t number, BufferVector<char> buffer, int* length) in FillDigits32() argument 228 buffer[(*length) in FillDigits32() 211 FillDigits32FixedLength(uint32_t number, int requested_length, BufferVector<char> buffer, int* length) FillDigits32FixedLength() argument 244 FillDigits64FixedLength(uint64_t number, [[maybe_unused]] int requested_length, BufferVector<char> buffer, int* length) FillDigits64FixedLength() argument 257 FillDigits64(uint64_t number, BufferVector<char> buffer, int* length) FillDigits64() argument 276 RoundUp(BufferVector<char> buffer, int* length, int* decimal_point) RoundUp() argument 299 FillFractionals(uint64_t fractionals, int exponent, int fractional_count, BufferVector<char> buffer, int* length, int* decimal_point) FillFractionals() argument 324 ASSERT(EXPONENT_64 < -exponent && -exponent <= EXPONENT_128); UInt128 fractionals128 = UInt128(fractionals, 0); fractionals128.Shift(-exponent - EXPONENT_64); int point = 128; for (int i = 0; i < fractional_count; ++i) { if (fractionals128.IsZero()) break; fractionals128.Multiply(5); point--; int digit = fractionals128.DivModPowerOf2(point); buffer[*length] = � + digit; (*length)++; } if (fractionals128.BitAt(point - 1) == 1) { RoundUp(buffer, length, decimal_point); } } } void DtoaHelper::TrimZeros(BufferVector<char> buffer, int* length, int* decimal_point) { while (*length > 0 && buffer[(*length) - 1] == �) { (*length)--; } int first_non_zero = 0; while (first_non_zero < *length && buffer[first_non_zero] == �) { first_non_zero++; } if (first_non_zero != 0) { for (int i = first_non_zero; i < *length; ++i) { buffer[i - first_non_zero] = buffer[i]; } *length -= first_non_zero; *decimal_point -= first_non_zero; } } bool DtoaHelper::FixedDtoa(double v, int fractional_count, BufferVector<char> buffer, int* length, int* decimal_point) { if (v == 0) { buffer[0] = �; buffer[1] = �; *length = 1; *decimal_point = 1; return true; } uint64_t significand = NumberHelper::Significand(v); int exponent = NumberHelper::Exponent(v); if (exponent > 20) return false; if (fractional_count > 20) return false; *length = 0; if (exponent + kDoubleSignificandSize > EXPONENT_64) { const uint64_t kFive17 = 0xB1�2EC5; uint64_t divisor = kFive17; int divisor_power = 17; uint64_t dividend = significand; uint32_t quotient; uint64_t remainder; if (exponent > divisor_power) FillFractionals() argument 412 FillDigits32(static_cast<uint32_t>(integrals), buffer, length); global() local [all...] |
H A D | atomic_helper.h | 28 T operator()(T *ptr, const T *arg, [[maybe_unused]] uint32_t length) const
in operator ()() 30 ASSERT(length >= 1); // 1: max argnum
in operator ()() 38 T operator()(T *ptr, const T *arg, [[maybe_unused]] uint32_t length) const
in operator ()() 40 ASSERT(length >= 1); // 1: max argnum
in operator ()() 48 T operator()(T *ptr, const T *arg, [[maybe_unused]] uint32_t length) const
in operator ()() 50 ASSERT(length >= 1); // 1: max argnum
in operator ()() 58 T operator()(T *ptr, const T *arg, [[maybe_unused]] uint32_t length) const
in operator ()() 60 ASSERT(length >= 1); // 1: max argnum
in operator ()() 68 T operator()(T *ptr, const T *arg, [[maybe_unused]] uint32_t length) const
in operator ()() 70 ASSERT(length > in operator ()() [all...] |
/arkcompiler/runtime_core/libpandabase/utils/ |
H A D | bit_memory_stream.h | 33 void EnsureSpace(size_t length) in EnsureSpace() argument 35 data_->resize(RoundUp(BitsToBytesRoundUp(offset_ + length), sizeof(uint32_t))); in EnsureSpace() 38 void Write(size_t value, size_t length) in Write() argument 40 if (length != 0) { in Write() 41 ASSERT(length <= (sizeof(value) * BITS_PER_BYTE)); in Write() 42 EnsureSpace(length); in Write() 43 BitMemoryRegion region(data_->data(), offset_, length); in Write() 44 region.Write(value, 0, length); in Write() 45 offset_ += length; in Write() 49 void Write(uint32_t *ptr, size_t payload_length, size_t length) in Write() argument 90 Read(size_t length) Read() argument 98 ReadRegion(size_t length) ReadRegion() argument [all...] |
H A D | bit_memory_region.h | 152 Read(size_t offset, size_t length) const 157 if (length == 0) { 161 ASSERT(offset + length <= size_); 171 T extra = data[index + (shift + (length - 1)) / width]; 172 T clear = (std::numeric_limits<T>::max() << 1U) << (length - 1); 193 T Pop(size_t length) 195 T res = Read(0, length); 196 start_ += length; 201 void Write(uint32_t value, size_t offset, size_t length) 203 if (length [all...] |
/arkcompiler/runtime_core/static_core/libpandabase/utils/ |
H A D | bit_memory_stream.h | 33 void EnsureSpace(size_t length) in EnsureSpace() argument 35 data_->resize(RoundUp(BitsToBytesRoundUp(offset_ + length), sizeof(uint32_t))); in EnsureSpace() 38 void Write(size_t value, size_t length) in Write() argument 40 if (length != 0) { in Write() 41 ASSERT(length <= (sizeof(value) * BITS_PER_BYTE)); in Write() 42 EnsureSpace(length); in Write() 43 BitMemoryRegion region(data_->data(), offset_, length); in Write() 44 region.Write(value, 0, length); in Write() 45 offset_ += length; in Write() 49 void Write(uint32_t *ptr, size_t payloadLength, size_t length) in Write() argument 90 Read(size_t length) Read() argument 98 ReadRegion(size_t length) ReadRegion() argument [all...] |
H A D | bit_memory_region.h | 155 Read(size_t offset, size_t length) const 160 if (length == 0) { 164 ASSERT(offset + length <= size_); 174 T extra = data[index + (shift + (length - 1)) / width]; 175 T clear = (std::numeric_limits<T>::max() << 1U) << (length - 1); 196 T Pop(size_t length) 198 T res = Read(0, length); 199 start_ += length; 204 void Write(uint32_t value, size_t offset, size_t length) 206 if (length [all...] |
/arkcompiler/ets_runtime/ecmascript/js_api/ |
H A D | js_api_vector.cpp | 30 uint32_t length = vector->GetSize(); in Add() local 31 GrowCapacity(thread, vector, length + 1); in Add() 35 elements->Set(thread, length, value); in Add() 36 vector->SetLength(++length); in Add() 44 uint32_t length = vector->GetSize(); in Insert() local 45 if (index < 0 || index > static_cast<int32_t>(length)) { in Insert() 48 GrowCapacity(thread, vector, length + 1); in Insert() 52 for (int32_t i = static_cast<int32_t>(length) - 1; i >= index; i--) { in Insert() 57 vector->SetLength(++length); in Insert() 104 uint32_t length in GetIndexFrom() local 128 uint32_t length = GetSize(); GetLastElement() local 150 uint32_t length = vector->GetSize(); GetLastIndexFrom() local 171 uint32_t length = vector->GetSize(); Remove() local 185 uint32_t length = vector->GetSize(); RemoveByIndex() local 207 int32_t length = static_cast<int32_t>(vector->GetSize()); RemoveByRange() local 234 int32_t length = static_cast<int32_t>(vector->GetSize()); SubVector() local 262 uint32_t length = vector->GetSize(); ToString() local 292 uint32_t length = vector->GetSize(); ForEach() local 320 uint32_t length = vector->GetSize(); ReplaceAllElements() local 391 uint32_t length = GetSize(); Has() local 422 uint32_t length = obj->GetSize(); GetOwnProperty() local 434 uint32_t length = obj->GetSize(); TrimToCurrentLength() local 445 uint32_t length = obj->GetLength(); Clear() local 460 uint32_t length = obj->GetSize(); Clone() local 470 uint32_t length = vector->GetSize(); GetFirstElement() local 489 uint32_t length = obj->GetSize(); GetProperty() local 503 uint32_t length = obj->GetSize(); SetProperty() local [all...] |
H A D | js_api_arraylist.cpp | 29 uint32_t length = arrayList->GetLength().GetArrayLength(); in Add() local 30 JSHandle<TaggedArray> elements = GrowCapacity(thread, arrayList, length + 1); in Add() 33 elements->Set(thread, length, value); in Add() 34 arrayList->SetLength(thread, JSTaggedValue(++length)); in Add() 41 int length = arrayList->GetLength().GetInt(); in Insert() local 42 if (index < 0 || index > length) { in Insert() 44 oss << "The value of \"index\" is out of range. It must be >= 0 && <= " << length in Insert() 49 JSHandle<TaggedArray> elements = GrowCapacity(thread, arrayList, length + 1); in Insert() 51 for (int i = length - 1; i >= index; --i) { in Insert() 55 arrayList->SetLength(thread, JSTaggedValue(++length)); in Insert() 61 int length = arrayList->GetLength().GetInt(); Clear() local 76 uint32_t length = obj->GetSize(); Clone() local 99 int length = arrayList->GetLength().GetInt(); IncreaseCapacityTo() local 111 uint32_t length = arrayList->GetLength().GetArrayLength(); TrimToCurrentLength() local 149 uint32_t length = arrayList->GetLength().GetArrayLength(); GetIndexOf() local 165 int length = arrayList->GetLength().GetInt(); GetLastIndexOf() local 176 int length = arrayList->GetLength().GetInt(); RemoveByIndex() local 206 uint32_t length = arrayList->GetSize(); Remove() local 223 int32_t length = arrayList->GetLength().GetInt(); RemoveByRange() local 264 uint32_t length = arrayList->GetSize(); ReplaceAllElements() local 309 int length = arrayList->GetLength().GetInt(); SubArrayList() local 354 uint32_t length = arrayList->GetSize(); ForEach() local 396 uint32_t length = GetSize(); Has() local 433 uint32_t length = obj->GetLength().GetArrayLength(); GetOwnProperty() local 463 int length = obj->GetLength().GetInt(); GetProperty() local 494 int length = obj->GetLength().GetInt(); SetProperty() local [all...] |
H A D | js_api_bitvector.cpp | 29 uint32_t length = static_cast<uint32_t>(bitVector->GetLength()); in Push() local 32 if ((length & TAGGED_VALUE_BIT_OFFSET) == 0) { in Push() 39 SetBit(elements, length, value.GetTaggedValue()); in Push() 41 bitVector->SetLength(++length); in Push() 68 uint32_t length = static_cast<uint32_t>(GetLength()); in Set() local 69 if (index >= length) { in Set() 71 oss << "The value of \"index\" is out of range. It must be >= 0 && <= " << (length - 1) in Set() 84 uint32_t length = static_cast<uint32_t>(GetLength()); in Get() local 85 if (index >= length) { in Get() 87 oss << "The value of \"index\" is out of range. It must be >= 0 && <= " << (length in Get() 102 int32_t length = bitVector->GetLength(); Has() local 137 uint32_t length = GetSize(); Has() local 162 int32_t length = bitVector->GetLength(); SetBitsByRange() local 194 int32_t length = bitVector->GetLength(); GetBitsByRange() local 255 int32_t length = bitVector->GetLength(); GetBitCountByRange() local 292 int32_t length = bitVector->GetLength(); GetIndexOf() local 328 int32_t length = bitVector->GetLength(); GetLastIndexOf() local 387 int32_t length = bitVector->GetLength(); FlipBitsByRange() local 424 int length = bitVector->GetLength(); Resize() local 476 uint32_t length = static_cast<uint32_t>(obj->GetLength()); GetOwnProperty() local 501 int length = obj->GetLength(); GetProperty() local 517 int length = obj->GetLength(); SetProperty() local [all...] |
/arkcompiler/ets_runtime/ecmascript/tests/ |
H A D | js_date_test.cpp | 70 JSTaggedValue ms = ecmascript::JSDate::GetTimeFromString(str.c_str(), str.length()); in HWTEST_F_L0() 74 ms = ecmascript::JSDate::GetTimeFromString(str.c_str(), str.length()); in HWTEST_F_L0() 78 ms = ecmascript::JSDate::GetTimeFromString(str.c_str(), str.length()); in HWTEST_F_L0() 82 ms = ecmascript::JSDate::GetTimeFromString(str.c_str(), str.length()); in HWTEST_F_L0() 86 ms = ecmascript::JSDate::GetTimeFromString(str.c_str(), str.length()); in HWTEST_F_L0() 90 ms = ecmascript::JSDate::GetTimeFromString(str.c_str(), str.length()); in HWTEST_F_L0() 94 ms = ecmascript::JSDate::GetTimeFromString(str.c_str(), str.length()); in HWTEST_F_L0() 98 ms = ecmascript::JSDate::GetTimeFromString(str.c_str(), str.length()); in HWTEST_F_L0() 102 ms = ecmascript::JSDate::GetTimeFromString(str.c_str(), str.length()); in HWTEST_F_L0() 106 ms = ecmascript::JSDate::GetTimeFromString(str.c_str(), str.length()); in HWTEST_F_L0() [all...] |
H A D | js_sendable_arraybuffer_test.cpp | 39 size_t length = 5; in HWTEST_F_L0() local 40 void *toBuffer = vm->GetNativeAreaAllocator()->AllocateBuffer(length); in HWTEST_F_L0() 42 uint8_t *data = static_cast<uint8_t *>(vm->GetNativeAreaAllocator()->AllocateBuffer(length)); in HWTEST_F_L0() 43 if (memset_s(data, length, value, length) != EOK) { in HWTEST_F_L0() 47 void *formBuffer = vm->GetNativeAreaAllocator()->AllocateBuffer(length); in HWTEST_F_L0() 56 for (uint32_t i = 0; i < length; i++) { in HWTEST_F_L0() 73 size_t length = 5; in HWTEST_F_L0() local 74 void *toBuffer = vm->GetNativeAreaAllocator()->AllocateBuffer(length); in HWTEST_F_L0() 75 uint8_t *fromData = static_cast<uint8_t *>(vm->GetNativeAreaAllocator()->AllocateBuffer(length)); in HWTEST_F_L0() 100 size_t length = 5; HWTEST_F_L0() local 119 size_t length = 5; HWTEST_F_L0() local 138 size_t length = 5; HWTEST_F_L0() local 162 size_t length = 5; HWTEST_F_L0() local 186 size_t length = 5; HWTEST_F_L0() local 202 size_t length = 5; HWTEST_F_L0() local [all...] |
H A D | concurrent_marking_test.cpp | 43 JSHandle<TaggedArray> CreateTaggedArray(uint32_t length, JSTaggedValue initVal, MemSpaceType spaceType) in CreateTaggedArray() argument 46 return factory->NewTaggedArray(length, initVal, spaceType); in CreateTaggedArray() 52 uint32_t length = 1_KB; in HWTEST_F_L0() local 54 CreateTaggedArray(length, JSTaggedValue::Undefined(), MemSpaceType::OLD_SPACE); in HWTEST_F_L0() 55 for (uint32_t i = 0; i < length; i++) { in HWTEST_F_L0() 56 auto array = CreateTaggedArray(length, JSTaggedValue::Undefined(), MemSpaceType::OLD_SPACE); in HWTEST_F_L0() 61 for (uint32_t i = 0; i < length; i++) { in HWTEST_F_L0() 62 auto array = CreateTaggedArray(length, JSTaggedValue::Undefined(), MemSpaceType::OLD_SPACE); in HWTEST_F_L0() 70 uint32_t length = 1_KB; in HWTEST_F_L0() local 72 CreateTaggedArray(length, JSTaggedValu in HWTEST_F_L0() 92 uint32_t length = 1_KB; HWTEST_F_L0() local 112 uint32_t length = 1_KB; HWTEST_F_L0() local [all...] |
H A D | incremental_marking_test.cpp | 41 JSHandle<TaggedArray> CreateTaggedArray(uint32_t length, JSTaggedValue initVal, MemSpaceType spaceType) in CreateTaggedArray() argument 44 return factory->NewTaggedArray(length, initVal, spaceType); in CreateTaggedArray() 50 uint32_t length = 1_KB; in HWTEST_F_L0() local 52 CreateTaggedArray(length, JSTaggedValue::Undefined(), MemSpaceType::OLD_SPACE); in HWTEST_F_L0() 53 for (uint32_t i = 0; i < length; i++) { in HWTEST_F_L0() 54 auto array = CreateTaggedArray(length, JSTaggedValue::Undefined(), MemSpaceType::OLD_SPACE); in HWTEST_F_L0() 60 for (uint32_t i = 0; i < length; i++) { in HWTEST_F_L0() 61 auto array = CreateTaggedArray(length, JSTaggedValue::Undefined(), MemSpaceType::OLD_SPACE); in HWTEST_F_L0()
|
H A D | js_array_buffer_test.cpp | 39 size_t length = 5; in HWTEST_F_L0() local 40 void *toBuffer = vm->GetNativeAreaAllocator()->AllocateBuffer(length); in HWTEST_F_L0() 42 uint8_t *data = static_cast<uint8_t *>(vm->GetNativeAreaAllocator()->AllocateBuffer(length)); in HWTEST_F_L0() 43 if (memset_s(data, length, value, length) != EOK) { in HWTEST_F_L0() 47 void *formBuffer = vm->GetNativeAreaAllocator()->AllocateBuffer(length); in HWTEST_F_L0() 56 for (uint32_t i = 0; i < length; i++) { in HWTEST_F_L0() 76 size_t length = 5; in HWTEST_F_L0() local 79 uint8_t *data = static_cast<uint8_t *>(vm->GetNativeAreaAllocator()->AllocateBuffer(length)); in HWTEST_F_L0() 80 if (memset_s(data, length, valu in HWTEST_F_L0() [all...] |
/arkcompiler/runtime_core/static_core/plugins/ets/tests/mock/ |
H A D | array_native_test.cpp | 77 ets_size length = env_->GetArrayLength(array); in TEST_F() local 78 ASSERT_EQ(length, src.size()); in TEST_F() 85 std::vector<ets_boolean> res1 = {buf, buf + length}; in TEST_F() 96 std::vector<ets_boolean> vec(length); in TEST_F() 97 env_->GetBooleanArrayRegion(array, 0, length, vec.data()); in TEST_F() 102 ets_size half = length / 2; in TEST_F() 103 std::vector<ets_boolean> vec(length - half); in TEST_F() 104 env_->GetBooleanArrayRegion(array, half, length - half, vec.data()); in TEST_F() 116 ets_size length = env_->GetArrayLength(array); in TEST_F() local 117 ASSERT_EQ(length, sr in TEST_F() 155 ets_size length = env_->GetArrayLength(array); TEST_F() local 194 ets_size length = env_->GetArrayLength(array); TEST_F() local 233 ets_size length = env_->GetArrayLength(array); TEST_F() local 272 ets_size length = env_->GetArrayLength(array); TEST_F() local 311 ets_size length = env_->GetArrayLength(array); TEST_F() local 350 ets_size length = env_->GetArrayLength(array); TEST_F() local [all...] |
/arkcompiler/runtime_core/static_core/runtime/coretypes/ |
H A D | array.cpp | 27 static Array *AllocateArray(ark::BaseClass *arrayClass, size_t elemSize, ArraySizeT length, ark::SpaceType spaceType, in AllocateArray() argument 30 size_t size = Array::ComputeSize(elemSize, length); in AllocateArray() 32 LOG(ERROR, RUNTIME) << "Illegal array size: element size: " << elemSize << " array length: " << length; in AllocateArray() local 49 Array *Array::Create(ark::Class *arrayClass, const uint8_t *data, ArraySizeT length, ark::SpaceType spaceType, in Create() argument 53 auto *array = AllocateArray(arrayClass, elemSize, length, spaceType, pinned); in Create() 58 // Order is matters here: GC can read data before it copied if we set length first. in Create() 59 // length == 0 is guaranteed by AllocateArray in Create() 61 array->SetLength(length); in Create() 62 memcpy_s(array->GetData(), array->GetLength() * elemSize, data, length * elemSiz in Create() 71 Create(ark::Class *arrayClass, ArraySizeT length, ark::SpaceType spaceType, bool pinned) Create() argument 89 Create(DynClass *dynarrayclass, ArraySizeT length, ark::SpaceType spaceType, bool pinned) Create() argument 108 CreateTagged(const PandaVM *vm, ark::BaseClass *arrayClass, ArraySizeT length, ark::SpaceType spaceType, TaggedValue initValue) CreateTagged() argument [all...] |
/arkcompiler/ets_runtime/ecmascript/ |
H A D | ecma_string-inl.h | 138 inline EcmaString *EcmaString::CreateLineString(const EcmaVM *vm, size_t length, bool compressed) in CreateLineString() argument 140 size_t size = compressed ? LineEcmaString::ComputeSizeUtf8(length) : LineEcmaString::ComputeSizeUtf16(length); in CreateLineString() 142 string->SetLength(length, compressed); in CreateLineString() 148 inline EcmaString *EcmaString::CreateLineStringNoGC(const EcmaVM *vm, size_t length, bool compressed) in CreateLineStringNoGC() argument 150 size_t size = compressed ? LineEcmaString::ComputeSizeUtf8(length) : LineEcmaString::ComputeSizeUtf16(length); in CreateLineStringNoGC() 153 string->SetLength(length, compressed); in CreateLineStringNoGC() 159 inline EcmaString *EcmaString::CreateLineStringWithSpaceType(const EcmaVM *vm, size_t length, bool compressed, in CreateLineStringWithSpaceType() argument 163 size_t size = compressed ? LineEcmaString::ComputeSizeUtf8(length) in CreateLineStringWithSpaceType() 192 CreateConstantString(const EcmaVM *vm, const uint8_t *utf8Data, size_t length, bool compressed, MemSpaceType type, uint32_t idOffset) CreateConstantString() argument 227 CreateTreeString(const EcmaVM *vm, const JSHandle<EcmaString> &left, const JSHandle<EcmaString> &right, uint32_t length, bool compressed) CreateTreeString() argument 242 FastSubUtf8String(const EcmaVM *vm, const JSHandle<EcmaString> &src, uint32_t start, uint32_t length) FastSubUtf8String() argument 257 FastSubUtf16String(const EcmaVM *vm, const JSHandle<EcmaString> &src, uint32_t start, uint32_t length) FastSubUtf16String() argument 328 int32_t length = static_cast<int32_t>(GetLength()); At() local 376 uint32_t length = src->GetLength(); WriteToFlat() local 448 WriteToFlatWithPos(EcmaString *src, Char *buf, uint32_t length, uint32_t pos) WriteToFlatWithPos() argument 531 ReadData(EcmaString *dst, EcmaString *src, uint32_t start, uint32_t destSize, uint32_t length) ReadData() argument [all...] |
/arkcompiler/ets_runtime/ecmascript/mem/ |
H A D | dyn_chunk.cpp | 71 int DynChunk::Emit(const uint8_t *data, size_t length) in Emit() argument 73 if (UNLIKELY((size_ + length) > allocatedSize_)) { in Emit() 74 if (Expand(size_ + length) != 0) { in Emit() 80 length, data, length) != EOK) { in Emit() 83 size_ += length; in Emit() 92 int DynChunk::EmitSelf(size_t offset, size_t length) in EmitSelf() argument 94 if (UNLIKELY((size_ + length) > allocatedSize_)) { in EmitSelf() 95 if (Expand(size_ + length) != 0) { in EmitSelf() 101 length, in EmitSelf() [all...] |
/arkcompiler/runtime_core/static_core/runtime/regexp/ecmascript/mem/ |
H A D | dyn_chunk.cpp | 70 int DynChunk::Emit(const uint8_t *data, size_t length) in Emit() argument 72 if (UNLIKELY((size_ + length) > allocatedSize_)) { in Emit() 73 if (Expand(size_ + length) != 0) { in Emit() 79 length, data, length) != EOK) { in Emit() 82 size_ += length; in Emit() 91 int DynChunk::EmitSelf(size_t offset, size_t length) in EmitSelf() argument 93 if (UNLIKELY((size_ + length) > allocatedSize_)) { in EmitSelf() 94 if (Expand(size_ + length) != 0) { in EmitSelf() 100 length, in EmitSelf() [all...] |
/arkcompiler/ets_runtime/ecmascript/ohos/tests/mock/ |
H A D | mock_aot_runtime_info.cpp | 23 bool MockAotRuntimeInfo::GetRuntimeBuildId(char *buildId, int length) const in GetRuntimeBuildId() 26 if (strcpy_s(buildId, length, tmp) != 0) { in GetRuntimeBuildId() 32 bool MockAotRuntimeInfo::GetMicrosecondsTimeStamp(char *timestamp, size_t length) const in GetMicrosecondsTimeStamp() 35 if (strcpy_s(timestamp, length, tmp) != 0) { in GetMicrosecondsTimeStamp() 41 bool MockAotRuntimeInfo::GetCrashSandBoxRealPath(char *realOutPath, size_t length) const in GetCrashSandBoxRealPath() 43 if (strcpy_s(realOutPath, length, SANBOX_DIR) != 0) { in GetCrashSandBoxRealPath() 46 if (strcat_s(realOutPath, length, "/") != 0) { in GetCrashSandBoxRealPath() 49 if (strcat_s(realOutPath, length, AOT_RUNTIME_INFO) != 0) { in GetCrashSandBoxRealPath() 61 void MockAotRuntimeInfo::SetRuntimeInfo(const char *realOutPath, char lines[][BUFFER_SIZE], int length) const in SetRuntimeInfo() 67 for (int i = 0; i < length in SetRuntimeInfo() [all...] |
/arkcompiler/ets_runtime/test/fuzztest/stringrefwriteutf16_fuzzer/ |
H A D | stringrefwriteutf16_fuzzer.cpp | 35 int length = size / sizeof(char16_t); in StringRefWriteUtf16FuzzTest() local 36 char16_t* buffer = new char16_t[length]; in StringRefWriteUtf16FuzzTest() 37 if (memset_s(buffer, length, 0, length) != EOK) { in StringRefWriteUtf16FuzzTest() 41 Local<StringRef> res = StringRef::NewFromUtf16(vm, (char16_t*)data, length); in StringRefWriteUtf16FuzzTest() 42 if (length == 1) { in StringRefWriteUtf16FuzzTest() 44 } else if (length != 0) { in StringRefWriteUtf16FuzzTest() 45 int count = res->WriteUtf16(vm, buffer, length - 1); in StringRefWriteUtf16FuzzTest()
|
/arkcompiler/ets_runtime/test/aottest/exception_case14/ |
H A D | exception_case14.js | 39 var alphabet, cc, caseChanged, ee, i, isNum, length, str,
83 ee = str.length;
87 intCheck(bb, 2, ALPHABET.length, 'Base');
96 if (BigNum.DEBUG && str.replace(/^0\.0*|\./, '').length > 15) {
105 for (length = str.length; i < length; i++) {
109 ee = length;
127 else ee = str.length;
130 for (length [all...] |
/arkcompiler/ets_runtime/test/moduletest/arrayfrom/ |
H A D | arrayfrom.js | 32 print(arr.length) 35 print(arr.length) 45 print(arr.length); 116 get length() { 117 print("get length"); 120 set length(x) { 121 print("set length", x); 161 arr.length = 10; 170 get length() { 171 print("get length"); [all...] |
/arkcompiler/ets_runtime/tools/ap_file_viewer/native/src/ |
H A D | main.cpp | 36 size_t length = native::ConvertApToJson(input.c_str(), input.length()); in main() local 37 if (length == 0 || length >= SIZE_MAX) { in main() 38 LOG_NO_TAG(ERROR) << "ConvertApToJson returned zero or invalid length!"; in main() 41 char *buffer = (char *)malloc(length); in main() 46 if (memset_s(buffer, length, 0, length) != EOK) { in main() 52 auto result = native::GetConvertResult(buffer, length); in main() 71 std::string strRet(buffer, length); in main() [all...] |