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

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

Issue 735323002: Revert "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: Ports. 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 1821 matching lines...) Expand 10 before | Expand all | Expand 10 after
1832 if (double_array->is_the_hole(i)) { 1832 if (double_array->is_the_hole(i)) {
1833 TransitionElementsKind(object, FAST_HOLEY_DOUBLE_ELEMENTS); 1833 TransitionElementsKind(object, FAST_HOLEY_DOUBLE_ELEMENTS);
1834 return; 1834 return;
1835 } 1835 }
1836 } 1836 }
1837 TransitionElementsKind(object, FAST_DOUBLE_ELEMENTS); 1837 TransitionElementsKind(object, FAST_DOUBLE_ELEMENTS);
1838 } 1838 }
1839 } 1839 }
1840 1840
1841 1841
1842 bool JSObject::WouldConvertToSlowElements(Handle<Object> key) {
1843 uint32_t index;
1844 return key->ToArrayIndex(&index) && WouldConvertToSlowElements(index);
1845 }
1846
1847
1848 void JSObject::SetMapAndElements(Handle<JSObject> object, 1842 void JSObject::SetMapAndElements(Handle<JSObject> object,
1849 Handle<Map> new_map, 1843 Handle<Map> new_map,
1850 Handle<FixedArrayBase> value) { 1844 Handle<FixedArrayBase> value) {
1851 JSObject::MigrateToMap(object, new_map); 1845 JSObject::MigrateToMap(object, new_map);
1852 DCHECK((object->map()->has_fast_smi_or_object_elements() || 1846 DCHECK((object->map()->has_fast_smi_or_object_elements() ||
1853 (*value == object->GetHeap()->empty_fixed_array())) == 1847 (*value == object->GetHeap()->empty_fixed_array())) ==
1854 (value->map() == object->GetHeap()->fixed_array_map() || 1848 (value->map() == object->GetHeap()->fixed_array_map() ||
1855 value->map() == object->GetHeap()->fixed_cow_array_map())); 1849 value->map() == object->GetHeap()->fixed_cow_array_map()));
1856 DCHECK((*value == object->GetHeap()->empty_fixed_array()) || 1850 DCHECK((*value == object->GetHeap()->empty_fixed_array()) ||
1857 (object->map()->has_fast_double_elements() == 1851 (object->map()->has_fast_double_elements() ==
(...skipping 5573 matching lines...) Expand 10 before | Expand all | Expand 10 after
7431 #undef READ_SHORT_FIELD 7425 #undef READ_SHORT_FIELD
7432 #undef WRITE_SHORT_FIELD 7426 #undef WRITE_SHORT_FIELD
7433 #undef READ_BYTE_FIELD 7427 #undef READ_BYTE_FIELD
7434 #undef WRITE_BYTE_FIELD 7428 #undef WRITE_BYTE_FIELD
7435 #undef NOBARRIER_READ_BYTE_FIELD 7429 #undef NOBARRIER_READ_BYTE_FIELD
7436 #undef NOBARRIER_WRITE_BYTE_FIELD 7430 #undef NOBARRIER_WRITE_BYTE_FIELD
7437 7431
7438 } } // namespace v8::internal 7432 } } // namespace v8::internal
7439 7433
7440 #endif // V8_OBJECTS_INL_H_ 7434 #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