Lines Matching defs:Array
1191 accumulator->Add("<JS Array[%u]>", static_cast<uint32_t>(length));
1420 os << "<External" #Type "Array[" \
1421 << External##Type##Array::cast(this)->length() << "]>"; \
1424 os << "<Fixed" #Type "Array[" << Fixed##Type##Array::cast(this)->length() \
1720 // Ensure the descriptor array does not get too big.
1751 // Ensure the descriptor array does not get too big.
1893 // Clear out the old descriptor array to avoid problems to sharing
1894 // the descriptor array without using an explicit.
1918 // - Otherwise, allocate a fixed array large enough to hold all fields, in
1991 Handle<FixedArray> array = isolate->factory()->NewFixedArray(total_size);
2029 array->set(target_index, *value);
2043 array->set(target_index, *value);
2054 object->FastPropertyAtPut(index, array->get(external + i));
2062 heap->RightTrimFixedArray<Heap::FROM_MUTATOR>(*array, inobject);
2063 object->set_properties(*array);
2196 // Don't overwrite the empty descriptor array.
2367 // in the |old_map|'s descriptor array to walk the transition tree.
2368 // - Merge/generalize the descriptor array of the |old_map| and |target_map|.
2372 // |split_map|, the first map who's descriptor array does not match the merged
2373 // descriptor array.
2521 // Allocate a new descriptor array large enough to hold the required
2523 // array.
3063 // that the maps to which we push the new descriptor array back can rely
3089 Handle<typename T::Array> array,
3093 Isolate* isolate = array->GetIsolate();
3113 if (!T::Contains(key, entry, valid_descriptors, array)) {
3114 T::Insert(key, entry, valid_descriptors, array);
3123 Array;
3127 Handle<DescriptorArray> array) {
3129 return array->Search(*key, valid_descriptors) != DescriptorArray::kNotFound;
3134 Handle<DescriptorArray> array) {
3137 array->Append(&desc);
3143 typedef FixedArray Array;
3147 Handle<FixedArray> array) {
3149 if (*key == AccessorInfo::cast(array->get(i))->name()) return true;
3156 Handle<FixedArray> array) {
3158 array->set(valid_descriptors, *entry);
3166 Handle<DescriptorArray> array(map->instance_descriptors());
3168 DCHECK(array->NumberOfSlackDescriptors() >= callbacks.length());
3169 nof = AppendUniqueCallbacks<DescriptorArrayAppender>(&callbacks, array, nof);
3175 Handle<FixedArray> array,
3178 DCHECK(array->length() >= callbacks.length() + valid_descriptors);
3180 array,
3974 // Check whether the name is an array index.
4113 Handle<FixedArray> array(
4115 return Handle<NormalizedMapCache>::cast(array);
4333 // Allocate the fixed array for the fields.
4419 Handle<FixedArrayBase> array,
4422 Isolate* isolate = array->GetIsolate();
4424 bool has_double_elements = array->IsFixedDoubleArray();
4429 Handle<FixedDoubleArray>::cast(array);
4436 value = handle(Handle<FixedArray>::cast(array)->get(i), isolate);
4455 Handle<FixedArrayBase> array(FixedArrayBase::cast(object->elements()));
4457 (array->map() == isolate->heap()->sloppy_arguments_elements_map());
4459 array = handle(FixedArrayBase::cast(
4460 Handle<FixedArray>::cast(array)->get(1)));
4462 if (array->IsDictionary()) return Handle<SeededNumberDictionary>::cast(array);
4470 : array->length();
4477 dictionary = CopyFastElementsToDictionary(array, length, dictionary);
4700 // in the descriptor array matches the hidden string. Since the
5102 // Get the constructor function for arguments array.
5120 // If it is an arguments array check the content.
5169 // It's not possible to seal objects with external array elements
5251 // It's not possible to freeze objects with external array elements
5292 // Create a new descriptor array with fully-frozen properties
5472 // an array.
5666 static bool ContainsOnlyValidKeys(Handle<FixedArray> array) {
5667 int len = array->length();
5669 Object* e = array->get(i);
5677 Handle<FixedArray> array, int length) {
5678 DCHECK(array->length() >= length);
5679 if (array->length() == length) return array;
5682 array->GetIsolate()->factory()->NewFixedArray(length);
5683 for (int i = 0; i < length; ++i) new_array->set(i, array->get(i));
5713 // Descriptor Array. In that case we regenerate the enum cache.
5862 // array or dictionary. So the fast inline test for whether to
5946 // Ignore getters and setters on pixel and external array elements.
6228 // Ignore getters and setters on pixel and external array
6476 // array, implying that its NumberOfOwnDescriptors equals the number of
6477 // descriptors in the descriptor array.
6484 // Ensure there's space for the new descriptor in the shared descriptor array.
6612 // copying the map; creating a new descriptor array cell.
7063 // An iterator over all map transitions in an descriptor array, reusing the
7405 FixedArray* array = default_cache();
7406 int len = array->length();
7408 if (array->get(i + kCodeCacheEntryCodeOffset) == code) return i + 1;
7421 FixedArray* array = default_cache();
7422 DCHECK(array->length() >= index && array->get(index)->IsCode());
7427 array->set_null(index - 1); // Name.
7428 array->set_null(index); // Code.
7690 Handle<JSObject> array) {
7691 DCHECK(array->IsJSArray() || array->HasSloppyArgumentsElements());
7692 ElementsAccessor* accessor = array->GetElementsAccessor();
7695 array->GetIsolate(), result,
7696 accessor->AddElementsToFixedArray(array, array, content),
7739 Handle<FixedArray> array, int new_length, PretenureFlag pretenure) {
7740 Isolate* isolate = array->GetIsolate();
7746 int len = array->length();
7748 // We are taking the map from the old fixed array so the map is sure to
7750 result->set_map_no_write_barrier(array->map());
7753 result->set(i, array->get(i), mode);
7787 // Allocate the array of keys.
7835 // descriptor array. If the descriptor array were to be black, the shuffling
7841 // Reset sorting since the descriptor array might contain invalid pointers.
7866 // Extract elements and create sorted array.
7868 // Put max element at the back of the array.
8497 Handle<FixedArray> array = isolate->factory()->NewFixedArray(line_count);
8499 array->set(i, Smi::FromInt(line_ends[i]));
8501 return array;
8863 // Isolate the array index form the full hash field.
8915 // For array indexes mix the length into the hash as an array index could
9293 // Always trim even when array is cleared because of heap verifier.
9304 // Always trim even when array is cleared because of heap verifier.
9340 // Replace all of the cached initial array maps in the native context with
9398 // If the function is used as the global Array function, cache the
9607 Handle<FixedArray> array = String::CalculateLineEnds(src, true);
9609 if (*array != isolate->heap()->empty_fixed_array()) {
9610 array->set_map(isolate->heap()->fixed_cow_array_map());
9613 script->set_line_ends(*array);
10961 // We should never end in here with a pixel or external array.
10970 // The resized array has FAST_*_SMI_ELEMENTS if the capacity mode forces it,
10971 // or if it's allowed and the old elements array contained only SMIs.
11021 // We should never end in here with a pixel or external array.
11057 void JSArray::Initialize(Handle<JSArray> array, int capacity, int length) {
11059 array->GetIsolate()->factory()->NewJSArrayStorage(
11060 array, length, capacity, INITIALIZE_ARRAY_ELEMENTS_WITH_HOLE);
11064 void JSArray::Expand(Handle<JSArray> array, int required_size) {
11065 ElementsAccessor* accessor = array->GetElementsAccessor();
11066 accessor->SetCapacityAndLength(array, required_size, required_size);
11142 Handle<JSArray> array,
11144 if (array->HasFastElements()) {
11145 // If the new array won't fit in a some non-trivial fraction of the max old
11148 (array->GetHeap()->MaxOldGenerationSize() / kDoubleSize) / 4);
11151 NormalizeElements(array);
11155 // We should never end in here with a pixel or external array.
11156 DCHECK(array->AllowsSetElementsLength());
11157 if (!array->map()->is_observed()) {
11158 return array->GetElementsAccessor()->SetLength(array, new_length_handle);
11161 Isolate* isolate = array->GetIsolate();
11164 Handle<Object> old_length_handle(array->length(), isolate);
11171 int num_elements = array->NumberOfOwnElements(kNoAttrFilter);
11176 if (!GetOldValue(isolate, array, i, &old_values, &indices)) break;
11183 array->GetOwnElementKeys(*keys, kNoAttrFilter);
11187 if (!GetOldValue(isolate, array, index, &old_values, &indices)) break;
11195 array->GetElementsAccessor()->SetLength(array, new_length_handle),
11198 CHECK(array->length()->ToArrayIndex(&new_length));
11201 BeginPerformSplice(array);
11208 array, "delete", isolate->factory()->Uint32ToString(indices[i]),
11212 array, "update", isolate->factory()->length_string(),
11215 EndPerformSplice(array);
11224 // in the array of old values.
11235 EnqueueSpliceRecord(array, index, deleted, add_count);
11279 // Grow array by factor 2 over and above what we need.
11408 // If the old fixed array was empty, we need to reset counters of the
11409 // new array.
11533 // Compact the array by moving all subsequent groups to fill in the new holes.
11537 // Now the holes are at the end of the array, zap them for heap-verifier.
11564 // writes to the DependentCode array, since a write to the array can make it
11933 // Array optimizations rely on the prototype lookups of Array objects always
11975 // If the array is growing, and it's not growth by a single element at the
12150 // Update the array length if this JSObject is an array.
12199 // If storing to an element that isn't in the array, pass the store request
12238 // If the array is growing, and it's not growth by a single element at the
12246 // Check whether there is extra space in the fixed array.
12251 // Update the length of the array if needed.
12386 // Store old array length in case adding an element grows the array.
12492 Handle<External##Type##Array> array( \
12493 External##Type##Array::cast(object->elements())); \
12494 return External##Type##Array::SetValue(array, index, value); \
12497 Handle<Fixed##Type##Array> array( \
12498 Fixed##Type##Array::cast(object->elements())); \
12499 return Fixed##Type##Array::SetValue(array, index, value); \
12593 // If the array is huge, it's not likely to be defined in a local
12762 void JSArray::JSArrayUpdateLengthFromIndex(Handle<JSArray> array,
12766 CHECK(array->length()->ToArrayIndex(&old_len));
12770 Handle<Object> len = array->GetIsolate()->factory()->NewNumber(
12772 array->set_length(*len);
12787 bool JSArray::WouldChangeReadOnlyLength(Handle<JSArray> array,
12790 CHECK(array->length()->ToArrayIndex(&length));
12792 LookupIterator it(array, array->GetIsolate()->factory()->length_string(),
12803 MaybeHandle<Object> JSArray::ReadOnlyLengthError(Handle<JSArray> array) {
12804 Isolate* isolate = array->GetIsolate();
12806 Handle<Object> args[2] = { length, array };
13287 // Extract elements and create sorted array.
13289 // Put max element at the back of the array.
13313 // Sort this array and the numbers as pairs wrt. the (distinct) numbers.
13594 Handle<FixedArray> array = isolate->factory()->NewFixedArray(4);
13595 array->set(0, *shared_);
13596 array->set(1, *source_);
13597 array->set(2, Smi::FromInt(strict_mode_));
13598 array->set(3, Smi::FromInt(scope_position_));
13599 return array;
13746 Handle<FixedArray> array = factory->NewFixedArray(length, pretenure);
13747 array->set_map_no_write_barrier(*factory->hash_table_map());
13748 Handle<Derived> table = Handle<Derived>::cast(array);
13806 // Copy prefix to new array.
14159 // Bail out and do the sorting of undefineds and array holes in JS.
14215 // Collects all defined (non-hole) and non-undefined (array) elements at
14216 // the start of the elements array.
14354 return kExternal##Type##Array;
14383 Handle<ExternalUint8ClampedArray> array,
14387 if (index < static_cast<uint32_t>(array->length())) {
14414 array->set(index, clamped_value);
14416 return handle(Smi::FromInt(clamped_value), array->GetIsolate());
14445 Handle<Object> ExternalInt8Array::SetValue(Handle<ExternalInt8Array> array,
14449 array->GetIsolate(), array, index, value);
14453 Handle<Object> ExternalUint8Array::SetValue(Handle<ExternalUint8Array> array,
14457 array->GetIsolate(), array, index, value);
14461 Handle<Object> ExternalInt16Array::SetValue(Handle<ExternalInt16Array> array,
14465 array->GetIsolate(), array, index, value);
14469 Handle<Object> ExternalUint16Array::SetValue(Handle<ExternalUint16Array> array,
14473 array->GetIsolate(), array, index, value);
14477 Handle<Object> ExternalInt32Array::SetValue(Handle<ExternalInt32Array> array,
14481 array->GetIsolate(), array, index, value);
14486 Handle<ExternalUint32Array> array,
14490 if (index < static_cast<uint32_t>(array->length())) {
14502 array->set(index, cast_value);
14504 return array->GetIsolate()->factory()->NewNumberFromUint(cast_value);
14509 Handle<ExternalFloat32Array> array,
14513 if (index < static_cast<uint32_t>(array->length())) {
14525 array->set(index, cast_value);
14527 return array->GetIsolate()->factory()->NewNumber(cast_value);
14532 Handle<ExternalFloat64Array> array,
14536 if (index < static_cast<uint32_t>(array->length())) {
14544 array->set(index, double_value);
14546 return array->GetIsolate()->factory()->NewNumber(double_value);
14815 // StringsKey used for HashTable where key is array of internalized strings.
14849 Object* MapCache::Lookup(FixedArray* array) {
14851 StringsKey key(handle(array));
14859 Handle<MapCache> map_cache, Handle<FixedArray> array, Handle<Map> value) {
14860 StringsKey key(array);
14864 new_cache->set(EntryToIndex(entry), *array);
14894 // Allocate and initialize iteration order array.
14900 // Allocate array with enumeration order.
14903 // Fill the enumeration order array with property details.
15745 FixedArray* array = FixedArray::cast(value_array->elements());
15746 static_cast<Derived*>(this)->PopulateValueArray(array);
15824 uint8_t* array = serialized_descriptor->GetDataStartAddress();
15828 MemCopy(array, previous_array, previous_length);
15829 array += previous_length;
15831 DCHECK(reinterpret_cast<uintptr_t>(array) % sizeof(uintptr_t) == 0);
15833 reinterpret_cast<DeclaredAccessorDescriptorData*>(array);
15901 // No free slot - extend break point info array.
16006 // If there are multiple break points shrink the array
16039 // If there was one break point object before replace with array.
16041 Handle<FixedArray> array = isolate->factory()->NewFixedArray(2);
16042 array->set(0, break_point_info->break_point_objects());
16043 array->set(1, *break_point_object);
16044 break_point_info->set_break_point_objects(*array);
16047 // If there was more than one break point before extend array.
16074 FixedArray* array = FixedArray::cast(break_point_info->break_point_objects());
16075 for (int i = 0; i < array->length(); i++) {
16076 if (array->get(i) == *break_point_object) {