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

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

Issue 1636013002: Replace HeapType with a non-templated FieldType class. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix tracing of generalizations Created 4 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
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 2955 matching lines...) Expand 10 before | Expand all | Expand 10 after
2966 PropertyType DescriptorArray::GetType(int descriptor_number) { 2966 PropertyType DescriptorArray::GetType(int descriptor_number) {
2967 return GetDetails(descriptor_number).type(); 2967 return GetDetails(descriptor_number).type();
2968 } 2968 }
2969 2969
2970 2970
2971 int DescriptorArray::GetFieldIndex(int descriptor_number) { 2971 int DescriptorArray::GetFieldIndex(int descriptor_number) {
2972 DCHECK(GetDetails(descriptor_number).location() == kField); 2972 DCHECK(GetDetails(descriptor_number).location() == kField);
2973 return GetDetails(descriptor_number).field_index(); 2973 return GetDetails(descriptor_number).field_index();
2974 } 2974 }
2975 2975
2976 2976 FieldType* DescriptorArray::GetFieldType(int descriptor_number) {
2977 HeapType* DescriptorArray::GetFieldType(int descriptor_number) {
2978 DCHECK(GetDetails(descriptor_number).location() == kField); 2977 DCHECK(GetDetails(descriptor_number).location() == kField);
2979 Object* value = GetValue(descriptor_number); 2978 Object* value = GetValue(descriptor_number);
2980 if (value->IsWeakCell()) { 2979 if (value->IsWeakCell()) {
2981 if (WeakCell::cast(value)->cleared()) return HeapType::None(); 2980 if (WeakCell::cast(value)->cleared()) return FieldType::None();
2982 value = WeakCell::cast(value)->value(); 2981 value = WeakCell::cast(value)->value();
2983 } 2982 }
2984 return HeapType::cast(value); 2983 return FieldType::cast(value);
2985 } 2984 }
2986 2985
2987 2986
2988 Object* DescriptorArray::GetConstant(int descriptor_number) { 2987 Object* DescriptorArray::GetConstant(int descriptor_number) {
2989 return GetValue(descriptor_number); 2988 return GetValue(descriptor_number);
2990 } 2989 }
2991 2990
2992 2991
2993 Object* DescriptorArray::GetCallbacksObject(int descriptor_number) { 2992 Object* DescriptorArray::GetCallbacksObject(int descriptor_number) {
2994 DCHECK(GetType(descriptor_number) == ACCESSOR_CONSTANT); 2993 DCHECK(GetType(descriptor_number) == ACCESSOR_CONSTANT);
(...skipping 4824 matching lines...) Expand 10 before | Expand all | Expand 10 after
7819 #undef WRITE_INT64_FIELD 7818 #undef WRITE_INT64_FIELD
7820 #undef READ_BYTE_FIELD 7819 #undef READ_BYTE_FIELD
7821 #undef WRITE_BYTE_FIELD 7820 #undef WRITE_BYTE_FIELD
7822 #undef NOBARRIER_READ_BYTE_FIELD 7821 #undef NOBARRIER_READ_BYTE_FIELD
7823 #undef NOBARRIER_WRITE_BYTE_FIELD 7822 #undef NOBARRIER_WRITE_BYTE_FIELD
7824 7823
7825 } // namespace internal 7824 } // namespace internal
7826 } // namespace v8 7825 } // namespace v8
7827 7826
7828 #endif // V8_OBJECTS_INL_H_ 7827 #endif // V8_OBJECTS_INL_H_
OLDNEW
« src/ic/ic.cc ('K') | « src/objects-debug.cc ('k') | src/parsing/json-parser.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698