| OLD | NEW | 
|---|
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. | 
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be | 
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. | 
| 4 // | 4 // | 
| 5 // Review notes: | 5 // Review notes: | 
| 6 // | 6 // | 
| 7 // - The use of macros in these inline functions may seem superfluous | 7 // - The use of macros in these inline functions may seem superfluous | 
| 8 // but it is absolutely needed to make sure gcc generates optimal | 8 // but it is absolutely needed to make sure gcc generates optimal | 
| 9 // code. gcc is not happy when attempting to inline too deep. | 9 // code. gcc is not happy when attempting to inline too deep. | 
| 10 // | 10 // | 
| (...skipping 1809 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 1820       if (double_array->is_the_hole(i)) { | 1820       if (double_array->is_the_hole(i)) { | 
| 1821         TransitionElementsKind(object, FAST_HOLEY_DOUBLE_ELEMENTS); | 1821         TransitionElementsKind(object, FAST_HOLEY_DOUBLE_ELEMENTS); | 
| 1822         return; | 1822         return; | 
| 1823       } | 1823       } | 
| 1824     } | 1824     } | 
| 1825     TransitionElementsKind(object, FAST_DOUBLE_ELEMENTS); | 1825     TransitionElementsKind(object, FAST_DOUBLE_ELEMENTS); | 
| 1826   } | 1826   } | 
| 1827 } | 1827 } | 
| 1828 | 1828 | 
| 1829 | 1829 | 
| 1830 bool JSObject::WouldConvertToSlowElements(Handle<Object> key) { |  | 
| 1831   uint32_t index; |  | 
| 1832   return key->ToArrayIndex(&index) && WouldConvertToSlowElements(index); |  | 
| 1833 } |  | 
| 1834 |  | 
| 1835 |  | 
| 1836 void JSObject::SetMapAndElements(Handle<JSObject> object, | 1830 void JSObject::SetMapAndElements(Handle<JSObject> object, | 
| 1837                                  Handle<Map> new_map, | 1831                                  Handle<Map> new_map, | 
| 1838                                  Handle<FixedArrayBase> value) { | 1832                                  Handle<FixedArrayBase> value) { | 
| 1839   JSObject::MigrateToMap(object, new_map); | 1833   JSObject::MigrateToMap(object, new_map); | 
| 1840   DCHECK((object->map()->has_fast_smi_or_object_elements() || | 1834   DCHECK((object->map()->has_fast_smi_or_object_elements() || | 
| 1841           (*value == object->GetHeap()->empty_fixed_array())) == | 1835           (*value == object->GetHeap()->empty_fixed_array())) == | 
| 1842          (value->map() == object->GetHeap()->fixed_array_map() || | 1836          (value->map() == object->GetHeap()->fixed_array_map() || | 
| 1843           value->map() == object->GetHeap()->fixed_cow_array_map())); | 1837           value->map() == object->GetHeap()->fixed_cow_array_map())); | 
| 1844   DCHECK((*value == object->GetHeap()->empty_fixed_array()) || | 1838   DCHECK((*value == object->GetHeap()->empty_fixed_array()) || | 
| 1845          (object->map()->has_fast_double_elements() == | 1839          (object->map()->has_fast_double_elements() == | 
| (...skipping 5573 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 7419 #undef READ_SHORT_FIELD | 7413 #undef READ_SHORT_FIELD | 
| 7420 #undef WRITE_SHORT_FIELD | 7414 #undef WRITE_SHORT_FIELD | 
| 7421 #undef READ_BYTE_FIELD | 7415 #undef READ_BYTE_FIELD | 
| 7422 #undef WRITE_BYTE_FIELD | 7416 #undef WRITE_BYTE_FIELD | 
| 7423 #undef NOBARRIER_READ_BYTE_FIELD | 7417 #undef NOBARRIER_READ_BYTE_FIELD | 
| 7424 #undef NOBARRIER_WRITE_BYTE_FIELD | 7418 #undef NOBARRIER_WRITE_BYTE_FIELD | 
| 7425 | 7419 | 
| 7426 } }  // namespace v8::internal | 7420 } }  // namespace v8::internal | 
| 7427 | 7421 | 
| 7428 #endif  // V8_OBJECTS_INL_H_ | 7422 #endif  // V8_OBJECTS_INL_H_ | 
| OLD | NEW | 
|---|