| OLD | NEW |
| 1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 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 #ifndef V8_FIELD_INDEX_H_ | 5 #ifndef V8_FIELD_INDEX_H_ |
| 6 #define V8_FIELD_INDEX_H_ | 6 #define V8_FIELD_INDEX_H_ |
| 7 | 7 |
| 8 #include "src/property-details.h" | 8 #include "src/property-details.h" |
| 9 #include "src/utils.h" | 9 #include "src/utils.h" |
| 10 | 10 |
| (...skipping 12 matching lines...) Expand all Loading... |
| 23 int index, | 23 int index, |
| 24 bool is_double = false); | 24 bool is_double = false); |
| 25 static FieldIndex ForInObjectOffset(int offset, Map* map = NULL); | 25 static FieldIndex ForInObjectOffset(int offset, Map* map = NULL); |
| 26 static FieldIndex ForDescriptor(Map* map, int descriptor_index); | 26 static FieldIndex ForDescriptor(Map* map, int descriptor_index); |
| 27 static FieldIndex ForLoadByFieldIndex(Map* map, int index); | 27 static FieldIndex ForLoadByFieldIndex(Map* map, int index); |
| 28 static FieldIndex ForKeyedLookupCacheIndex(Map* map, int index); | 28 static FieldIndex ForKeyedLookupCacheIndex(Map* map, int index); |
| 29 static FieldIndex FromFieldAccessStubKey(int key); | 29 static FieldIndex FromFieldAccessStubKey(int key); |
| 30 | 30 |
| 31 int GetLoadByFieldIndex() const; | 31 int GetLoadByFieldIndex() const; |
| 32 | 32 |
| 33 static bool LoadByFieldIndexValid(int index); |
| 34 |
| 33 bool is_inobject() const { | 35 bool is_inobject() const { |
| 34 return IsInObjectBits::decode(bit_field_); | 36 return IsInObjectBits::decode(bit_field_); |
| 35 } | 37 } |
| 36 | 38 |
| 37 bool is_double() const { | 39 bool is_double() const { |
| 38 return IsDoubleBits::decode(bit_field_); | 40 return IsDoubleBits::decode(bit_field_); |
| 39 } | 41 } |
| 40 | 42 |
| 41 int offset() const { | 43 int offset() const { |
| 42 return index() * kPointerSize; | 44 return index() * kPointerSize; |
| (...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 105 class IsHiddenField | 107 class IsHiddenField |
| 106 : public BitField<bool, FirstInobjectPropertyOffsetBits::kNext, 1> {}; | 108 : public BitField<bool, FirstInobjectPropertyOffsetBits::kNext, 1> {}; |
| 107 STATIC_ASSERT(IsHiddenField::kNext <= 32); | 109 STATIC_ASSERT(IsHiddenField::kNext <= 32); |
| 108 | 110 |
| 109 int bit_field_; | 111 int bit_field_; |
| 110 }; | 112 }; |
| 111 | 113 |
| 112 } } // namespace v8::internal | 114 } } // namespace v8::internal |
| 113 | 115 |
| 114 #endif | 116 #endif |
| OLD | NEW |