Home | History | Annotate | Download | only in src

Lines Matching refs:elements

38 #include "elements.h"
929 // performance of fetching elements where checking the prototype chain is
947 if (js_object->elements() != heap->empty_fixed_array()) {
1435 PrintF(file, "elements transition [");
1475 accumulator->Add("<Map(elements=%u)>", Map::cast(this)->elements_kind());
3204 // In case we are exiting the fast elements kind system, just add the map in
4660 FixedArrayBase* array = FixedArrayBase::cast(elements());
4688 // Switch to using the dictionary as the backing storage for elements.
4690 FixedArray::cast(elements())->set(1, dictionary);
4692 // Set the new map first to satify the elements type assert in
4707 PrintF("Object elements have been normalized:\n");
5253 bool JSObject::ReferencesObjectFromElements(FixedArray* elements,
5261 : elements->length();
5263 Object* element = elements->get(i);
5268 SeededNumberDictionary::cast(elements)->SlowReverseLookup(object);
5320 FixedArray* elements = FixedArray::cast(this->elements());
5321 if (ReferencesObjectFromElements(elements, kind, obj)) return true;
5325 FixedArray* parameter_map = FixedArray::cast(elements());
5407 // It's not possible to seal objects with external array elements
5418 // If there are fast elements we normalize.
5486 // It's not possible to freeze objects with external array elements
5498 if (!elements()->IsDictionary()) {
5501 : elements()->length();
5509 // Move elements to a dictionary; avoid calling NormalizeElements to avoid
5511 maybe_dict = CopyFastElementsToDictionary(isolate, elements(), length,
5515 // No existing elements, use a pre-allocated empty backing store
5569 if (elements() != heap->empty_slow_element_dictionary()) {
5573 // Freeze all elements in the dictionary
5684 // Deep copy local elements.
5685 // Pixel elements cannot be created using an object literal.
5692 FixedArray* elements = FixedArray::cast(copy->elements());
5693 if (elements->map() == heap->fixed_cow_array_map()) {
5696 for (int i = 0; i < elements->length(); i++) {
5697 ASSERT(!elements->get(i)->IsJSObject());
5701 for (int i = 0; i < elements->length(); i++) {
5702 Object* value = elements->get(i);
5711 elements->set(i, result);
5759 // - This object has no elements.
5760 // - No prototype has enumerable properties/elements.
5895 // Try to update an accessor in an elements dictionary. Return true if the
5944 // Ignore getters and setters on pixel and external array elements.
5957 // getter/setter pair in an arguments elements dictionary backing
5959 FixedArray* parameter_map = FixedArray::cast(object->elements());
6067 // Normalize elements to make this operation simple.
6081 if (elements()->map() == GetHeap()->non_strict_arguments_elements_map()) {
6087 FixedArray* parameter_map = FixedArray::cast(elements());
6368 // elements.
7249 // elements, reuse the space for the first of them.
7301 // Skip deleted elements.
7350 // Use null instead of undefined for deleted elements to distinguish
7351 // deleted elements from unused elements. This distinction is used
7539 // now because the lists are short (<= 4 elements currently).
7901 // Extract elements and create sorted array.
9505 // the appropriate transitioned elements kind maps.
10843 // Allocate a new fast elements backing store.
10851 // or if it's allowed and the old elements array contained only SMIs.
10868 FixedArrayBase* old_elements = elements();
10928 FixedArrayBase* old_elements = elements();
11065 // For sparse arrays, only iterate over existing elements.
11478 // Elements in |Arguments| are ordered backwards (because they're on the
11691 if (!elements()->IsFixedArray()) return false;
11692 FixedArray* elements = FixedArray::cast(this->elements());
11693 if (elements->map() != heap->non_strict_arguments_elements_map()) {
11696 FixedArray* arguments = FixedArray::cast(elements->get(1));
11703 if (!elements()->IsFixedArray()) return false;
11704 FixedArray* elements = FixedArray::cast(this->elements());
11705 if (elements->map() != heap->non_strict_arguments_elements_map()) {
11708 FixedArray* arguments = FixedArray::cast(elements->get(1));
11713 // Adding n elements in fast case is O(n*n).
11715 // elements.
11735 FixedArray* backing_store = FixedArray::cast(elements());
11782 // a transition to slow elements is necessary.
11799 // Convert to fast double elements if appropriate.
11812 FixedDoubleArray::cast(elements())->set(index, value->Number());
11816 // Change elements kind from Smi-only to generic FAST if necessary.
11851 ASSERT(elements()->IsFixedArray());
11873 Handle<FixedArray> elements(FixedArray::cast(this->elements()));
11875 (elements->map() == heap->non_strict_arguments_elements_map());
11877 ? SeededNumberDictionary::cast(elements->get(1))
11878 : SeededNumberDictionary::cast(*elements));
11908 // Elements of the arguments object in slow mode might be slow aliases.
11911 Context* context = Context::cast(elements->get(0));
11915 // For elements that are still writable we keep slow aliasing.
11950 elements->set(1, new_dictionary);
11991 PrintF("Object elements are fast case again:\n");
12007 FixedArrayBase* base_elms = FixedArrayBase::cast(elements());
12011 // up the prototype chain before storing in the receiver's elements.
12023 // If the value object is not a heap number, switch to fast elements and try
12062 FixedDoubleArray* elms = FixedDoubleArray::cast(elements());
12084 FixedDoubleArray::cast(elements())->set(index, double_value);
12093 ASSERT(elements()->IsFixedDoubleArray());
12189 // Normalize the elements to enable attributes on the property.
12284 CheckArrayAbuse(this, "external elements write", index);
12289 CheckArrayAbuse(this, "elements write", index, true);
12302 ExternalPixelArray* pixels = ExternalPixelArray::cast(elements());
12306 ExternalByteArray* array = ExternalByteArray::cast(elements());
12311 ExternalUnsignedByteArray::cast(elements());
12315 ExternalShortArray* array = ExternalShortArray::cast(elements());
12320 ExternalUnsignedShortArray::cast(elements());
12324 ExternalIntArray* array = ExternalIntArray::cast(elements());
12329 ExternalUnsignedIntArray::cast(elements());
12333 ExternalFloatArray* array = ExternalFloatArray::cast(elements());
12337 ExternalDoubleArray* array = ExternalDoubleArray::cast(elements());
12344 FixedArray* parameter_map = FixedArray::cast(elements());
12356 // For elements that are still writable we re-establish slow aliasing.
12456 if (elements() == isolate->heap()->empty_fixed_array() ||
12462 // No change is needed to the elements() buffer, the transition
12469 FixedArrayBase* elms = FixedArrayBase::cast(elements());
12475 FixedArrayBase* elms = FixedArrayBase::cast(elements());
12483 // elements, assume a length of zero.
12600 FixedArrayBase* backing_store_base = FixedArrayBase::cast(elements());
12633 SeededNumberDictionary::cast(FixedArray::cast(elements()));
12646 FixedDoubleArray* elms = FixedDoubleArray::cast(elements());
12663 ExternalArray* external_array = ExternalArray::cast(elements());
12681 // would, the object should have slow elements.
12693 // If the elements are sparse, we should not go back to fast case.
12696 // elements. If it had fast elements we would skip security checks.
12702 FixedArray* elements = FixedArray::cast(this->elements());
12704 if (elements->map() == GetHeap()->non_strict_arguments_elements_map()) {
12705 dictionary = SeededNumberDictionary::cast(elements->get(1));
12707 dictionary = SeededNumberDictionary::cast(elements);
12709 // If an element has been added at a very high index in the elements
12714 // the object should have fast elements.
12733 SeededNumberDictionary::cast(elements());
12781 void Dictionary<Shape, Key>::CopyValuesTo(FixedArray* elements) {
12785 WriteBarrierMode mode = elements->GetWriteBarrierMode(no_gc);
12789 elements->set(pos++, ValueAt(i), mode);
12792 ASSERT(pos == elements->length());
13000 // Extract elements and create sorted array.
13053 // swap the elements at these two positions.
13096 // Fast case for objects with no elements.
13101 static_cast<uint32_t>(FixedArray::cast(elements())->length());
13104 // Compute the number of enumerable elements.
13119 FixedArray::cast(elements())->length();
13121 if (!FixedArray::cast(elements())->get(i)->IsTheHole()) {
13135 FixedDoubleArray::cast(elements())->length();
13137 if (!FixedDoubleArray::cast(elements())->is_the_hole(i)) {
13148 int length = ExternalPixelArray::cast(elements())->length();
13166 int length = ExternalArray::cast(elements())->length();
13186 FixedArray* parameter_map = FixedArray::cast(elements());
13679 // Rehash the elements.
13705 // 50% is still free after adding n elements and
13706 // at most 50% of the free elements are deleted elements.
13733 // Shrink to fit the number of elements if only a quarter of the
13734 // capacity is filled with elements.
13737 // number of elements. The allocation method will make sure that
13739 // lower than room for 16 elements.
13888 // Collates undefined and unexisting elements below limit from position
13889 // zero of the elements. The object stays in Dictionary mode.
13894 // elements.
13986 // Collects all defined (non-hole) and non-undefined (array) elements at
13987 // the start of the elements array.
13988 // If the object is in dictionary mode, it is converted to fast elements
13995 // Convert to fast elements containing only the existing properties.
14002 // Convert to fast elements.
14022 // External arrays cannot have holes or undefined elements.
14023 return Smi::FromInt(ExternalArray::cast(elements())->length());
14035 FixedArrayBase* elements_base = FixedArrayBase::cast(this->elements());
14057 FixedDoubleArray* elements = FixedDoubleArray::cast(elements_base);
14058 // Split elements into defined and the_hole, in that order.
14063 if (elements->is_the_hole(i)) {
14070 if (elements->is_the_hole(holes)) {
14073 elements->set(i, elements->get_scalar(holes));
14080 elements->set_the_hole(holes);
14084 FixedArray* elements = FixedArray::cast(elements_base);
14087 // Split elements into defined, undefined and the_hole, in that order. Only
14089 WriteBarrierMode write_barrier = elements->GetWriteBarrierMode(no_gc);
14095 Object* current = elements->get(i);
14106 current = elements->get(undefs);
14113 elements->set(i, current, write_barrier);
14120 elements->set_undefined(undefs);
14124 elements->set_the_hole(holes);
14139 switch (elements()->map()->instance_type()) {
14165 switch (elements()->map()->instance_type()) {
14830 // Check whether there are enough enumeration indices to add n elements.
14940 // If the dictionary requires slow elements an element has already
14944 // elements.