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

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

Issue 2688573003: [cleanup] CSA: add helpers for accessing details/value via key_index (Closed)
Patch Set: rebased 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.h ('k') | no next file » | 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 2815 matching lines...) Expand 10 before | Expand all | Expand 10 after
2826 2826
2827 int DescriptorArray::number_of_descriptors() { 2827 int DescriptorArray::number_of_descriptors() {
2828 DCHECK(length() >= kFirstIndex || IsEmpty()); 2828 DCHECK(length() >= kFirstIndex || IsEmpty());
2829 int len = length(); 2829 int len = length();
2830 return len == 0 ? 0 : Smi::cast(get(kDescriptorLengthIndex))->value(); 2830 return len == 0 ? 0 : Smi::cast(get(kDescriptorLengthIndex))->value();
2831 } 2831 }
2832 2832
2833 2833
2834 int DescriptorArray::number_of_descriptors_storage() { 2834 int DescriptorArray::number_of_descriptors_storage() {
2835 int len = length(); 2835 int len = length();
2836 return len == 0 ? 0 : (len - kFirstIndex) / kDescriptorSize; 2836 return len == 0 ? 0 : (len - kFirstIndex) / kEntrySize;
2837 } 2837 }
2838 2838
2839 2839
2840 int DescriptorArray::NumberOfSlackDescriptors() { 2840 int DescriptorArray::NumberOfSlackDescriptors() {
2841 return number_of_descriptors_storage() - number_of_descriptors(); 2841 return number_of_descriptors_storage() - number_of_descriptors();
2842 } 2842 }
2843 2843
2844 2844
2845 void DescriptorArray::SetNumberOfDescriptors(int number_of_descriptors) { 2845 void DescriptorArray::SetNumberOfDescriptors(int number_of_descriptors) {
2846 WRITE_FIELD( 2846 WRITE_FIELD(
(...skipping 5548 matching lines...) Expand 10 before | Expand all | Expand 10 after
8395 #undef WRITE_INT64_FIELD 8395 #undef WRITE_INT64_FIELD
8396 #undef READ_BYTE_FIELD 8396 #undef READ_BYTE_FIELD
8397 #undef WRITE_BYTE_FIELD 8397 #undef WRITE_BYTE_FIELD
8398 #undef NOBARRIER_READ_BYTE_FIELD 8398 #undef NOBARRIER_READ_BYTE_FIELD
8399 #undef NOBARRIER_WRITE_BYTE_FIELD 8399 #undef NOBARRIER_WRITE_BYTE_FIELD
8400 8400
8401 } // namespace internal 8401 } // namespace internal
8402 } // namespace v8 8402 } // namespace v8
8403 8403
8404 #endif // V8_OBJECTS_INL_H_ 8404 #endif // V8_OBJECTS_INL_H_
OLDNEW
« no previous file with comments | « src/objects.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698