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

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

Issue 2632373002: [runtime] Add DescriptorArray::GeneralizeAllFields(). (Closed)
Patch Set: Created 3 years, 11 months 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') | test/cctest/test-field-type-tracking.cc » ('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 3057 matching lines...) Expand 10 before | Expand all | Expand 10 after
3068 return GetKey(GetSortedKeyIndex(descriptor_number)); 3068 return GetKey(GetSortedKeyIndex(descriptor_number));
3069 } 3069 }
3070 3070
3071 3071
3072 void DescriptorArray::SetSortedKey(int descriptor_index, int pointer) { 3072 void DescriptorArray::SetSortedKey(int descriptor_index, int pointer) {
3073 PropertyDetails details = GetDetails(descriptor_index); 3073 PropertyDetails details = GetDetails(descriptor_index);
3074 set(ToDetailsIndex(descriptor_index), details.set_pointer(pointer).AsSmi()); 3074 set(ToDetailsIndex(descriptor_index), details.set_pointer(pointer).AsSmi());
3075 } 3075 }
3076 3076
3077 3077
3078 void DescriptorArray::SetRepresentation(int descriptor_index,
3079 Representation representation) {
3080 DCHECK(!representation.IsNone());
3081 PropertyDetails details = GetDetails(descriptor_index);
3082 set(ToDetailsIndex(descriptor_index),
3083 details.CopyWithRepresentation(representation).AsSmi());
3084 }
3085
3086
3087 Object** DescriptorArray::GetValueSlot(int descriptor_number) { 3078 Object** DescriptorArray::GetValueSlot(int descriptor_number) {
3088 DCHECK(descriptor_number < number_of_descriptors()); 3079 DCHECK(descriptor_number < number_of_descriptors());
3089 return RawFieldOfElementAt(ToValueIndex(descriptor_number)); 3080 return RawFieldOfElementAt(ToValueIndex(descriptor_number));
3090 } 3081 }
3091 3082
3092 3083
3093 int DescriptorArray::GetValueOffset(int descriptor_number) { 3084 int DescriptorArray::GetValueOffset(int descriptor_number) {
3094 return OffsetOfElementAt(ToValueIndex(descriptor_number)); 3085 return OffsetOfElementAt(ToValueIndex(descriptor_number));
3095 } 3086 }
3096 3087
(...skipping 5313 matching lines...) Expand 10 before | Expand all | Expand 10 after
8410 #undef WRITE_INT64_FIELD 8401 #undef WRITE_INT64_FIELD
8411 #undef READ_BYTE_FIELD 8402 #undef READ_BYTE_FIELD
8412 #undef WRITE_BYTE_FIELD 8403 #undef WRITE_BYTE_FIELD
8413 #undef NOBARRIER_READ_BYTE_FIELD 8404 #undef NOBARRIER_READ_BYTE_FIELD
8414 #undef NOBARRIER_WRITE_BYTE_FIELD 8405 #undef NOBARRIER_WRITE_BYTE_FIELD
8415 8406
8416 } // namespace internal 8407 } // namespace internal
8417 } // namespace v8 8408 } // namespace v8
8418 8409
8419 #endif // V8_OBJECTS_INL_H_ 8410 #endif // V8_OBJECTS_INL_H_
OLDNEW
« no previous file with comments | « src/objects.cc ('k') | test/cctest/test-field-type-tracking.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698