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

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

Issue 1696333002: Don't include field-type.h into objects-inl.h (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 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-debug.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 2937 matching lines...) Expand 10 before | Expand all | Expand 10 after
2948 PropertyType DescriptorArray::GetType(int descriptor_number) { 2948 PropertyType DescriptorArray::GetType(int descriptor_number) {
2949 return GetDetails(descriptor_number).type(); 2949 return GetDetails(descriptor_number).type();
2950 } 2950 }
2951 2951
2952 2952
2953 int DescriptorArray::GetFieldIndex(int descriptor_number) { 2953 int DescriptorArray::GetFieldIndex(int descriptor_number) {
2954 DCHECK(GetDetails(descriptor_number).location() == kField); 2954 DCHECK(GetDetails(descriptor_number).location() == kField);
2955 return GetDetails(descriptor_number).field_index(); 2955 return GetDetails(descriptor_number).field_index();
2956 } 2956 }
2957 2957
2958 FieldType* DescriptorArray::GetFieldType(int descriptor_number) {
2959 DCHECK(GetDetails(descriptor_number).location() == kField);
2960 Object* value = GetValue(descriptor_number);
2961 if (value->IsWeakCell()) {
2962 if (WeakCell::cast(value)->cleared()) return FieldType::None();
2963 value = WeakCell::cast(value)->value();
2964 }
2965 return FieldType::cast(value);
2966 }
2967
2968
2969 Object* DescriptorArray::GetConstant(int descriptor_number) { 2958 Object* DescriptorArray::GetConstant(int descriptor_number) {
2970 return GetValue(descriptor_number); 2959 return GetValue(descriptor_number);
2971 } 2960 }
2972 2961
2973 2962
2974 Object* DescriptorArray::GetCallbacksObject(int descriptor_number) { 2963 Object* DescriptorArray::GetCallbacksObject(int descriptor_number) {
2975 DCHECK(GetType(descriptor_number) == ACCESSOR_CONSTANT); 2964 DCHECK(GetType(descriptor_number) == ACCESSOR_CONSTANT);
2976 return GetValue(descriptor_number); 2965 return GetValue(descriptor_number);
2977 } 2966 }
2978 2967
(...skipping 4865 matching lines...) Expand 10 before | Expand all | Expand 10 after
7844 #undef WRITE_INT64_FIELD 7833 #undef WRITE_INT64_FIELD
7845 #undef READ_BYTE_FIELD 7834 #undef READ_BYTE_FIELD
7846 #undef WRITE_BYTE_FIELD 7835 #undef WRITE_BYTE_FIELD
7847 #undef NOBARRIER_READ_BYTE_FIELD 7836 #undef NOBARRIER_READ_BYTE_FIELD
7848 #undef NOBARRIER_WRITE_BYTE_FIELD 7837 #undef NOBARRIER_WRITE_BYTE_FIELD
7849 7838
7850 } // namespace internal 7839 } // namespace internal
7851 } // namespace v8 7840 } // namespace v8
7852 7841
7853 #endif // V8_OBJECTS_INL_H_ 7842 #endif // V8_OBJECTS_INL_H_
OLDNEW
« no previous file with comments | « src/objects-debug.cc ('k') | src/property.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698