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

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

Issue 2598543003: [runtime][ic] Constant field tracking support. (Closed)
Patch Set: Addressing comments Created 3 years, 10 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') | src/property.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 3116 matching lines...) Expand 10 before | Expand all | Expand 10 after
3127 set(ToValueIndex(descriptor_index), value); 3127 set(ToValueIndex(descriptor_index), value);
3128 } 3128 }
3129 3129
3130 3130
3131 PropertyDetails DescriptorArray::GetDetails(int descriptor_number) { 3131 PropertyDetails DescriptorArray::GetDetails(int descriptor_number) {
3132 DCHECK(descriptor_number < number_of_descriptors()); 3132 DCHECK(descriptor_number < number_of_descriptors());
3133 Object* details = get(ToDetailsIndex(descriptor_number)); 3133 Object* details = get(ToDetailsIndex(descriptor_number));
3134 return PropertyDetails(Smi::cast(details)); 3134 return PropertyDetails(Smi::cast(details));
3135 } 3135 }
3136 3136
3137
3138 int DescriptorArray::GetFieldIndex(int descriptor_number) { 3137 int DescriptorArray::GetFieldIndex(int descriptor_number) {
3139 DCHECK(GetDetails(descriptor_number).location() == kField); 3138 DCHECK(GetDetails(descriptor_number).location() == kField);
3140 return GetDetails(descriptor_number).field_index(); 3139 return GetDetails(descriptor_number).field_index();
3141 } 3140 }
3142 3141
3143 FieldType* DescriptorArray::GetFieldType(int descriptor_number) { 3142 FieldType* DescriptorArray::GetFieldType(int descriptor_number) {
3144 DCHECK(GetDetails(descriptor_number).location() == kField); 3143 DCHECK(GetDetails(descriptor_number).location() == kField);
3145 Object* wrapped_type = GetValue(descriptor_number); 3144 Object* wrapped_type = GetValue(descriptor_number);
3146 return Map::UnwrapFieldType(wrapped_type); 3145 return Map::UnwrapFieldType(wrapped_type);
3147 } 3146 }
(...skipping 5247 matching lines...) Expand 10 before | Expand all | Expand 10 after
8395 #undef WRITE_INT64_FIELD 8394 #undef WRITE_INT64_FIELD
8396 #undef READ_BYTE_FIELD 8395 #undef READ_BYTE_FIELD
8397 #undef WRITE_BYTE_FIELD 8396 #undef WRITE_BYTE_FIELD
8398 #undef NOBARRIER_READ_BYTE_FIELD 8397 #undef NOBARRIER_READ_BYTE_FIELD
8399 #undef NOBARRIER_WRITE_BYTE_FIELD 8398 #undef NOBARRIER_WRITE_BYTE_FIELD
8400 8399
8401 } // namespace internal 8400 } // namespace internal
8402 } // namespace v8 8401 } // namespace v8
8403 8402
8404 #endif // V8_OBJECTS_INL_H_ 8403 #endif // V8_OBJECTS_INL_H_
OLDNEW
« no previous file with comments | « src/objects.cc ('k') | src/property.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698