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 1856 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1867 TransitionElementsKind(object, FAST_HOLEY_DOUBLE_ELEMENTS); | 1867 TransitionElementsKind(object, FAST_HOLEY_DOUBLE_ELEMENTS); |
1868 return; | 1868 return; |
1869 } | 1869 } |
1870 } | 1870 } |
1871 TransitionElementsKind(object, FAST_DOUBLE_ELEMENTS); | 1871 TransitionElementsKind(object, FAST_DOUBLE_ELEMENTS); |
1872 } | 1872 } |
1873 } | 1873 } |
1874 | 1874 |
1875 | 1875 |
1876 bool JSObject::WouldConvertToSlowElements(Handle<Object> key) { | 1876 bool JSObject::WouldConvertToSlowElements(Handle<Object> key) { |
1877 uint32_t index; | 1877 uint32_t index = 0; |
1878 return key->ToArrayIndex(&index) && WouldConvertToSlowElements(index); | 1878 return key->ToArrayIndex(&index) && WouldConvertToSlowElements(index); |
1879 } | 1879 } |
1880 | 1880 |
1881 | 1881 |
1882 void JSObject::SetMapAndElements(Handle<JSObject> object, | 1882 void JSObject::SetMapAndElements(Handle<JSObject> object, |
1883 Handle<Map> new_map, | 1883 Handle<Map> new_map, |
1884 Handle<FixedArrayBase> value) { | 1884 Handle<FixedArrayBase> value) { |
1885 JSObject::MigrateToMap(object, new_map); | 1885 JSObject::MigrateToMap(object, new_map); |
1886 DCHECK((object->map()->has_fast_smi_or_object_elements() || | 1886 DCHECK((object->map()->has_fast_smi_or_object_elements() || |
1887 (*value == object->GetHeap()->empty_fixed_array())) == | 1887 (*value == object->GetHeap()->empty_fixed_array())) == |
(...skipping 5860 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7748 #undef READ_SHORT_FIELD | 7748 #undef READ_SHORT_FIELD |
7749 #undef WRITE_SHORT_FIELD | 7749 #undef WRITE_SHORT_FIELD |
7750 #undef READ_BYTE_FIELD | 7750 #undef READ_BYTE_FIELD |
7751 #undef WRITE_BYTE_FIELD | 7751 #undef WRITE_BYTE_FIELD |
7752 #undef NOBARRIER_READ_BYTE_FIELD | 7752 #undef NOBARRIER_READ_BYTE_FIELD |
7753 #undef NOBARRIER_WRITE_BYTE_FIELD | 7753 #undef NOBARRIER_WRITE_BYTE_FIELD |
7754 | 7754 |
7755 } } // namespace v8::internal | 7755 } } // namespace v8::internal |
7756 | 7756 |
7757 #endif // V8_OBJECTS_INL_H_ | 7757 #endif // V8_OBJECTS_INL_H_ |
OLD | NEW |