Home
last modified time | relevance | path

Searched refs:newLen (Results 1 - 22 of 22) sorted by relevance

/arkcompiler/ets_runtime/ecmascript/
H A Djs_array.cpp32 uint32_t newLen = 0; in LengthSetter() local
33 if (!JSTaggedValue::ToArrayLength(thread, value, &newLen) && mayThrow) { in LengthSetter()
38 if (oldLen == newLen) { in LengthSetter()
49 JSArray::SetCapacity(thread, self, oldLen, newLen); in LengthSetter()
51 if (actualLen != newLen) { in LengthSetter()
203 uint32_t oldLen, uint32_t newLen, bool isNew) in SetCapacity()
210 uint32_t newNumOfElements = newLen; in SetCapacity()
212 if (newLen < oldLen && numOfElements != 0U) { in SetCapacity()
216 for (uint32_t i = numOfElements - 1; i >= newLen; i--) { in SetCapacity()
242 if (newLen < in SetCapacity()
202 SetCapacity(JSThread *thread, const JSHandle<JSObject> &array, uint32_t oldLen, uint32_t newLen, bool isNew) SetCapacity() argument
303 uint32_t newLen = 0; ArraySetLength() local
501 uint32_t newLen = index + 1; TryFastCreateDataProperty() local
[all...]
H A Djs_array.h116 static void SetCapacity(JSThread *thread, const JSHandle<JSObject> &array, uint32_t oldLen, uint32_t newLen,
H A Dobject_operator.cpp889 uint32_t newLen = receiver.GetTaggedValue().IsJSArray() ? in AddProperty() local
891 SetElementOutOfBounds(newLen > oldLen); in AddProperty()
H A Djs_tagged_value.cpp1430 // 3. Let newLen be ToUint32(Desc.[[Value]]). in ToArrayLength()
1431 uint32_t newLen = ToUint32(thread, tagged); in ToArrayLength() local
1432 // 4. ReturnIfAbrupt(newLen). in ToArrayLength()
1437 // 6. ReturnIfAbrupt(newLen). in ToArrayLength()
1440 // 7. If newLen != numberLen, throw a RangeError exception. in ToArrayLength()
1441 if (JSTaggedNumber(newLen) != numberLen) { in ToArrayLength()
1445 *output = newLen; in ToArrayLength()
H A Djs_stable_array.cpp1619 int64_t newLen = static_cast<int64_t>(base::ArrayHelper::GetArrayLength(thread, thisObjVal));
1620 if (!thisObjVal->IsStableJSArray(thread) || newLen != len) {
/arkcompiler/ets_runtime/ecmascript/shared_objects/
H A Djs_shared_array.cpp46 uint32_t newLen = 0; in LengthSetter() local
47 if (!JSTaggedValue::ToArrayLength(thread, value, &newLen) && mayThrow) { in LengthSetter()
52 if (oldLen == newLen) { in LengthSetter()
63 JSSharedArray::SetCapacity(thread, self, oldLen, newLen); in LengthSetter()
65 if (actualLen != newLen) { // LCOV_EXCL_START in LengthSetter()
213 void JSSharedArray::SetCapacity(JSThread *thread, const JSHandle<JSObject> &array, uint32_t oldLen, uint32_t newLen, in SetCapacity() argument
222 if (newLen <= capacity) { in SetCapacity()
225 array->FillElementsWithHoles(thread, newLen, oldLen < capacity ? oldLen : capacity); in SetCapacity()
227 if (newLen > capacity) { in SetCapacity()
228 JSObject::GrowElementsCapacity(thread, array, newLen, isNe in SetCapacity()
246 uint32_t newLen = 0; ArraySetLength() local
[all...]
H A Djs_shared_array.h158 static void SetCapacity(JSThread *thread, const JSHandle<JSObject> &array, uint32_t oldLen, uint32_t newLen,
/arkcompiler/ets_runtime/ecmascript/ic/
H A Dprofile_type_info.cpp45 uint32_t newLen = arr->GetLength() + step; in AddWithoutKeyPoly() local
46 if (newLen > CACHE_MAX_LEN) { in AddWithoutKeyPoly()
51 JSHandle<TaggedArray> newArr = factory->NewTaggedArray(newLen); in AddWithoutKeyPoly()
123 uint32_t newLen = arr->GetLength() + step; in AddHandlerWithKey() local
124 if (newLen > CACHE_MAX_LEN) { in AddHandlerWithKey()
130 JSHandle<TaggedArray> newArr = factory->NewTaggedArray(newLen); in AddHandlerWithKey()
168 uint32_t newLen = arr->GetLength() + step; in AddGlobalHandlerKey() local
169 if (newLen > CACHE_MAX_LEN) { in AddGlobalHandlerKey()
174 JSHandle<TaggedArray> newArr = factory->NewTaggedArray(newLen); in AddGlobalHandlerKey()
H A Dic_runtime_stub-inl.h352 uint32_t newLen = JSObject::ComputeNonInlinedFastPropsCapacity(thread, capacity, in StoreWithTransition() local
354 properties = factory->CopyArray(arrayHandle, capacity, newLen); in StoreWithTransition()
/arkcompiler/ets_runtime/ecmascript/builtins/
H A Dbuiltins_sharedarraybuffer.cpp202 // 12. Let newLen be max(final-first,0). in Slice()
203 uint32_t newLen = std::max((last - first), 0); in Slice()
210 // 15. Let new be Construct(ctor, «newLen»). in Slice()
215 info->SetCallArg(JSTaggedValue(newLen)); in Slice()
233 // 20. If the value of new’s [[ArrayBufferByteLength]] internal slot < newLen, throw a TypeError exception. in Slice()
235 if (newArrBufLen < newLen) { in Slice()
238 if (newLen > 0) { in Slice()
243 // 25. Perform CopyDataBlockBytes(toBuf, fromBuf, first, newLen). in Slice()
244 JSArrayBuffer::CopyDataBlockBytes(to, from, first, newLen); in Slice()
H A Dbuiltins_sendable_arraybuffer.cpp167 // 12. Let newLen be max(final-first,0). in Slice()
168 uint32_t newLen = std::max((last - first), 0); in Slice() local
175 // 15. Let new be Construct(ctor, «newLen»). in Slice()
180 info->SetCallArg(JSTaggedValue(newLen)); in Slice()
199 // 20. If the value of new’s [[ArrayBufferByteLength]] internal slot < newLen, throw a TypeError exception. in Slice()
201 if (newArrBufLen < newLen) { in Slice()
209 if (newLen > 0) { in Slice()
214 // 25. Perform CopyDataBlockBytes(toBuf, fromBuf, first, newLen). in Slice()
215 JSSendableArrayBuffer::CopyDataPointBytes(toBuf, fromBuf, first, newLen); in Slice()
H A Dbuiltins_arraybuffer.cpp162 // 12. Let newLen be max(final-first,0). in Slice()
163 uint32_t newLen = std::max((last - first), 0); in Slice() local
170 // 15. Let new be Construct(ctor, «newLen»). in Slice()
175 info->SetCallArg(JSTaggedValue(newLen)); in Slice()
194 // 20. If the value of new’s [[ArrayBufferByteLength]] internal slot < newLen, throw a TypeError exception. in Slice()
196 if (newArrBufLen < newLen) { in Slice()
204 if (newLen > 0) { in Slice()
209 // 25. Perform CopyDataBlockBytes(toBuf, fromBuf, first, newLen). in Slice()
210 JSArrayBuffer::CopyDataPointBytes(toBuf, fromBuf, first, newLen); in Slice()
H A Dbuiltins_array.cpp76 uint32_t newLen = 0; in ArrayConstructor() local
80 newLen = 1; in ArrayConstructor()
82 newLen = JSTaggedValue::ToUint32(thread, len); in ArrayConstructor()
84 if (JSTaggedNumber(len.GetTaggedValue()).GetNumber() != newLen) { in ArrayConstructor()
88 JSArray::SetCapacity(thread, newArrayHandle, 0, newLen, true); in ArrayConstructor()
1623 // a. Let newLen be len–1. in Pop()
1624 // b. Let indx be ToString(newLen). in Pop()
1629 // g. Let setStatus be Set(O, "length", newLen, true). in Pop()
1632 int64_t newLen = len - 1; in Pop() local
1633 JSHandle<JSTaggedValue> indexHandle(thread, JSTaggedValue(newLen)); in Pop()
2585 int64_t newLen = len - actualDeleteCount + insertCount; Splice() local
2810 int64_t newLen = len + argc; Unshift() local
3194 int64_t newLen = 0; ToSpliced() local
[all...]
H A Dbuiltins_shared_array.cpp1394 // a. Let newLen be len–1. in PopInner()
1395 // b. Let indx be ToString(newLen). in PopInner()
1400 // g. Let setStatus be Set(O, "length", newLen, true). in PopInner()
1403 int64_t newLen = len - 1; in PopInner() local
1404 JSHandle<JSTaggedValue> indexHandle(thread, JSTaggedValue(newLen)); in PopInner()
2056 int64_t newLen = len - actualDeleteCount + insertCount; in Splice() local
2057 JSHandle<JSTaggedValue> newLenHandle(thread, JSTaggedValue(newLen)); in Splice()
2202 int64_t newLen = len + argc; in Unshift() local
2203 JSHandle<JSTaggedValue> newLenHandle(thread, JSTaggedValue(newLen)); in Unshift()
2209 return GetTaggedDouble(newLen); in Unshift()
[all...]
/arkcompiler/ets_runtime/ecmascript/jspandafile/
H A Dpanda_file_translator.cpp372 int newLen = static_cast<int>(BytecodeInstruction::Size(newOpcode)); \
373 int paddingSize = static_cast<int>(oldLen) - newLen; \
375 *(pc + newLen + i) = static_cast<uint8_t>(EcmaOpcode::NOP); \
1070 auto newLen = BytecodeInstruction::Size(newOpcode); in FixOpcode() local
1071 if (memmove_s(pc + 1, newLen - 1, pc + 2, oldLen - 2) != EOK) { // 2: skip second level inst and pref in FixOpcode()
1080 auto newLen = BytecodeInstruction::Size(newOpcode); in FixOpcode() local
1081 if (memmove_s(pc + 1, newLen - 1, pc + 2, oldLen - 2) != EOK) { // 2: skip second level inst and pref in FixOpcode()
1095 auto newLen = BytecodeInstruction::Size(newOpcode); in FixOpcode() local
1096 if (memmove_s(pc + 1, newLen - 1, pc + 2, oldLen - 2) != EOK) { // 2: skip second level inst and pref in FixOpcode()
1105 auto newLen in FixOpcode() local
1120 auto newLen = BytecodeInstruction::Size(newOpcode); FixOpcode() local
1130 auto newLen = BytecodeInstruction::Size(newOpcode); FixOpcode() local
1233 auto newLen = BytecodeInstruction::Size(newOpcode); FixOpcode() local
1243 auto newLen = BytecodeInstruction::Size(newOpcode); FixOpcode() local
1253 auto newLen = BytecodeInstruction::Size(newOpcode); FixOpcode() local
[all...]
/arkcompiler/ets_runtime/ecmascript/compiler/
H A Dnew_object_stub_builder.h72 GateRef CopyArray(GateRef glue, GateRef elements, GateRef oldLen, GateRef newLen,
74 GateRef ExtendArrayCheck(GateRef glue, GateRef elements, GateRef newLen,
76 void ExtendArray(Variable *result, GateRef glue, GateRef elements, GateRef newLen, Label *exit,
78 void ExtendMutantArray(Variable *result, GateRef glue, GateRef elements, GateRef newLen, Label *exit,
H A Dnew_object_stub_builder.cpp733 GateRef newLen, Label *exit, RegionSpaceFlag spaceType, bool isMutantArray) in ExtendArray()
739 size_ = ComputeTaggedArraySize(ZExtInt32ToPtr(newLen)); in ExtendArray()
751 array.ReadVariable(), isMutantArray ? SpecialHole() : Hole(), Int32(0), newLen); in ExtendArray()
754 Store(VariableType::INT32(), glue, *array, IntPtr(TaggedArray::LENGTH_OFFSET), newLen); in ExtendArray() local
788 GateRef NewObjectStubBuilder::ExtendArrayCheck(GateRef glue, GateRef elements, GateRef newLen, in ExtendArrayCheck() argument
802 ExtendArray(&res, glue, elements, newLen, &exit, spaceType); in ExtendArrayCheck()
804 ExtendArray(&res, glue, elements, newLen, &exit, spaceType, true); in ExtendArrayCheck()
812 GateRef newLen, RegionSpaceFlag spaceType) in CopyArray()
822 BRANCH(Int32Equal(newLen, Int32(0)), &emptyArray, &notEmptyArray); in CopyArray()
830 BRANCH(Int32GreaterThan(newLen, oldLe in CopyArray()
732 ExtendArray(Variable *res, GateRef glue, GateRef elements, GateRef newLen, Label *exit, RegionSpaceFlag spaceType, bool isMutantArray) ExtendArray() argument
811 CopyArray(GateRef glue, GateRef elements, GateRef oldLen, GateRef newLen, RegionSpaceFlag spaceType) CopyArray() argument
855 Store(VariableType::INT32(), glue, *array, IntPtr(TaggedArray::LENGTH_OFFSET), newLen); CopyArray() local
[all...]
H A Dstub_builder.cpp3135 GateRef newLen = ComputeNonInlinedFastPropsCapacity(glue, capacity, maxNonInlinedFastPropsCapacity); in StoreWithTransition() local
3136 GateRef properties = newBuilder.CopyArray(glue, array, capacity, newLen); in StoreWithTransition()
/arkcompiler/ets_runtime/ecmascript/compiler/builtins/
H A Dbuiltins_array_stub_builder.cpp200 GateRef newLen = Int64Add(thisLen, argLen); in Unshift() local
201 BRANCH(Int64GreaterThan(newLen, Int64(base::MAX_SAFE_INTEGER)), slowPath, &notOverRange); in Unshift()
207 BRANCH(Int64GreaterThan(newLen, capacity), &grow, &setValue); in Unshift()
210 GrowElementsCapacity(glue, thisValue, TruncInt64ToInt32(newLen)); in Unshift()
276 SetArrayLength(glue, thisValue, newLen); in Unshift()
277 result->WriteVariable(IntToTaggedPtr(newLen)); in Unshift()
890 GateRef newLen = GetArrayLength(thisValue); in ForEach() local
891 BRANCH(BitAnd(IsStableJSArray(glue, thisValue), Int32Equal(*thisLen, newLen)), in ForEach()
1755 GateRef newLen = GetLengthOfTaggedArray(elements); in Reduce() local
1756 BRANCH(Int32LessThan(newLen, *thisLe in Reduce()
[all...]
H A Dbuiltins_object_stub_builder.cpp948 DEFVARIABLE(newLen, VariableType::INT32(), Int32(0)); in CopyFromEnumCache()
959 newLen = Int32(0); in CopyFromEnumCache()
963 newLen = Int32Sub(oldLen, Int32(EnumCache::ENUM_CACHE_HEADER_SIZE)); in CopyFromEnumCache()
967 GateRef array = newBuilder.NewTaggedArray(glue, *newLen); in CopyFromEnumCache()
968 Store(VariableType::INT32(), glue, array, IntPtr(TaggedArray::LENGTH_OFFSET), *newLen); in CopyFromEnumCache() local
978 BRANCH(Int32UnsignedLessThan(*index, *newLen), &storeValue, &afterLoop); in CopyFromEnumCache()
/arkcompiler/ets_runtime/ecmascript/base/tests/
H A Dtyped_array_helper_test.cpp188 uint32_t newLen = JSHandle<JSTypedArray>::Cast(newArrObj)->GetArrayLength(); in HWTEST_F_L0() local
189 EXPECT_EQ(newLen, 6U); in HWTEST_F_L0()
/arkcompiler/ets_runtime/ecmascript/stubs/
H A Druntime_stubs.cpp443 uint32_t newLen = JSObject::ComputeNonInlinedFastPropsCapacity(thread, capacity, in DEF_RUNTIME_STUBS() local
445 properties = factory->CopyArray(arrayHandle, capacity, newLen); in DEF_RUNTIME_STUBS()

Completed in 76 milliseconds