Lines Matching full:array
70 THROW_RANGE_ERROR_AND_RETURN(thread, "array length must less than 2^32 - 1", exception); in ArrayCreate()
129 // If SameValue(C, realmC.[[intrinsics]].[[%Array%]]) is true, let C be undefined. in ArraySpeciesCreate()
164 // NOTEIf originalArray was created using the standard built-in Array constructor for in ArraySpeciesCreate()
165 // a Realm that is not the Realm of the running execution context, then a new Array is in ArraySpeciesCreate()
167 // with Web browsers that have historically had that behaviour for the Array.prototype methods in ArraySpeciesCreate()
172 void JSArray::SetCapacity(JSThread *thread, const JSHandle<JSObject> &array, uint32_t oldLen, uint3… in SetCapacity() argument
174 TaggedArray *element = TaggedArray::Cast(array->GetElements().GetTaggedObject()); in SetCapacity()
178 int32_t numOfElements = array->GetNumberOfElements(); in SetCapacity()
183 GetAllElementKeys(thread, array, 0, newArr); in SetCapacity()
194 array->SetElements(thread, newDict); in SetCapacity()
205 JSArray::Cast(*array)->SetArrayLength(thread, newNumOfElements); in SetCapacity()
210 // judge if need to cut down the array size, else fill the unused tail with holes in SetCapacity()
211 array->FillElementsWithHoles(thread, newLen, oldLen < capacity ? oldLen : capacity); in SetCapacity()
214 JSObject::ElementsToDictionary(thread, array); in SetCapacity()
216 JSObject::GrowElementsCapacity(thread, array, newLen); in SetCapacity()
218 JSArray::Cast(*array)->SetArrayLength(thread, newLen); in SetCapacity()
221 bool JSArray::ArraySetLength(JSThread *thread, const JSHandle<JSObject> &array, const PropertyDescr… in ArraySetLength() argument
228 return JSObject::OrdinaryDefineOwnProperty(thread, array, lengthKeyHandle, desc); in ArraySetLength()
236 THROW_RANGE_ERROR_AND_RETURN(thread, "array length must less than 2^32 - 1", false); in ArraySetLength()
242 [[maybe_unused]] bool success = GetOwnProperty(thread, array, lengthKeyHandle, oldLenDesc); in ArraySetLength()
254 return JSObject::OrdinaryDefineOwnProperty(thread, array, lengthKeyHandle, newLenDesc); in ArraySetLength()
278 JSArray::SetCapacity(thread, array, oldLen, newLen); in ArraySetLength()
283 success = JSObject::DefineOwnProperty(thread, array, lengthKeyHandle, readonly); in ArraySetLength()
288 uint32_t arrayLength = JSArray::Cast(*array)->GetArrayLength(); in ArraySetLength()
298 bool JSArray::DefineOwnProperty(JSThread *thread, const JSHandle<JSObject> &array, const JSHandle<J… in DefineOwnProperty() argument
306 return ArraySetLength(thread, array, desc); in DefineOwnProperty()
308 // 3. Else if P is an array index, then in DefineOwnProperty()
311 bool success = JSObject::OrdinaryDefineOwnProperty(thread, array, key, desc); in DefineOwnProperty()
315 array->GetJSHClass()->SetHasConstructor(true); in DefineOwnProperty()
322 bool JSArray::DefineOwnProperty(JSThread *thread, const JSHandle<JSObject> &array, uint32_t index, in DefineOwnProperty() argument
325 return JSObject::OrdinaryDefineOwnProperty(thread, array, index, desc); in DefineOwnProperty()
337 // 2. Let array be ArrayCreate(0) (see 9.4.2.2). in CreateArrayFromList()