Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(83)

Side by Side Diff: src/objects-inl.h

Issue 726693004: Re-land r25392 Use a stub in crankshaft for grow store arrays. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix. Created 6 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/objects.cc ('k') | src/runtime/runtime.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
1830 void JSObject::SetMapAndElements(Handle<JSObject> object, 1836 void JSObject::SetMapAndElements(Handle<JSObject> object,
1831 Handle<Map> new_map, 1837 Handle<Map> new_map,
1832 Handle<FixedArrayBase> value) { 1838 Handle<FixedArrayBase> value) {
1833 JSObject::MigrateToMap(object, new_map); 1839 JSObject::MigrateToMap(object, new_map);
1834 DCHECK((object->map()->has_fast_smi_or_object_elements() || 1840 DCHECK((object->map()->has_fast_smi_or_object_elements() ||
1835 (*value == object->GetHeap()->empty_fixed_array())) == 1841 (*value == object->GetHeap()->empty_fixed_array())) ==
1836 (value->map() == object->GetHeap()->fixed_array_map() || 1842 (value->map() == object->GetHeap()->fixed_array_map() ||
1837 value->map() == object->GetHeap()->fixed_cow_array_map())); 1843 value->map() == object->GetHeap()->fixed_cow_array_map()));
1838 DCHECK((*value == object->GetHeap()->empty_fixed_array()) || 1844 DCHECK((*value == object->GetHeap()->empty_fixed_array()) ||
1839 (object->map()->has_fast_double_elements() == 1845 (object->map()->has_fast_double_elements() ==
(...skipping 5573 matching lines...) Expand 10 before | Expand all | Expand 10 after
7413 #undef READ_SHORT_FIELD 7419 #undef READ_SHORT_FIELD
7414 #undef WRITE_SHORT_FIELD 7420 #undef WRITE_SHORT_FIELD
7415 #undef READ_BYTE_FIELD 7421 #undef READ_BYTE_FIELD
7416 #undef WRITE_BYTE_FIELD 7422 #undef WRITE_BYTE_FIELD
7417 #undef NOBARRIER_READ_BYTE_FIELD 7423 #undef NOBARRIER_READ_BYTE_FIELD
7418 #undef NOBARRIER_WRITE_BYTE_FIELD 7424 #undef NOBARRIER_WRITE_BYTE_FIELD
7419 7425
7420 } } // namespace v8::internal 7426 } } // namespace v8::internal
7421 7427
7422 #endif // V8_OBJECTS_INL_H_ 7428 #endif // V8_OBJECTS_INL_H_
OLDNEW
« no previous file with comments | « src/objects.cc ('k') | src/runtime/runtime.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698