5 #ifndef V8_FIELD_INDEX_H_
6 #define V8_FIELD_INDEX_H_
20 class FieldIndex
FINAL {
24 bool is_double =
false);
34 return IsInObjectBits::decode(bit_field_);
38 return IsDoubleBits::decode(bit_field_);
47 return IndexBits::decode(bit_field_);
52 return index() - first_inobject_property_offset() /
kPointerSize;
58 DCHECK(!IsHiddenField::decode(bit_field_));
59 int result = index() - first_inobject_property_offset() /
kPointerSize;
61 result += InObjectPropertyBits::decode(bit_field_);
70 (IsInObjectBits::kMask | IsDoubleBits::kMask | IndexBits::kMask);
74 FieldIndex(
bool is_inobject,
int local_index,
bool is_double,
75 int inobject_properties,
int first_inobject_property_offset,
76 bool is_hidden =
false) {
78 bit_field_ = IsInObjectBits::encode(is_inobject) |
79 IsDoubleBits::encode(is_double) |
80 FirstInobjectPropertyOffsetBits::encode(first_inobject_property_offset) |
81 IsHiddenField::encode(is_hidden) |
82 IndexBits::encode(local_index) |
83 InObjectPropertyBits::encode(inobject_properties);
86 explicit FieldIndex(
int bit_field) : bit_field_(bit_field) {}
89 DCHECK(!IsHiddenField::decode(bit_field_));
90 return FirstInobjectPropertyOffsetBits::decode(bit_field_);
101 :
public BitField<int, IsDoubleBits::kNext, kDescriptorIndexBitCount> {};
104 :
public BitField<int, InObjectPropertyBits::kNext, 7> {};
106 :
public BitField<bool, FirstInobjectPropertyOffsetBits::kNext, 1> {};
STATIC_ASSERT(IsHiddenField::kNext<=32)
static FieldIndex ForPropertyIndex(Map *map, int index, bool is_double=false)
int GetFieldAccessStubKey() const
static FieldIndex FromFieldAccessStubKey(int key)
int property_index() const
int outobject_array_index() const
int GetKeyedLookupCacheIndex() const
int first_inobject_property_offset() const
int GetLoadByFieldIndex() const
static FieldIndex ForKeyedLookupCacheIndex(Map *map, int index)
static FieldIndex ForLoadByFieldIndex(Map *map, int index)
static FieldIndex ForDescriptor(Map *map, int descriptor_index)
FieldIndex(bool is_inobject, int local_index, bool is_double, int inobject_properties, int first_inobject_property_offset, bool is_hidden=false)
static FieldIndex ForInObjectOffset(int offset, Map *map=NULL)
FieldIndex(int bit_field)
enable harmony numeric enable harmony object literal extensions Optimize object Array DOM strings and string trace pretenuring decisions of HAllocate instructions Enables optimizations which favor memory size over execution speed maximum source size in bytes considered for a single inlining maximum cumulative number of AST nodes considered for inlining trace the tracking of allocation sites deoptimize every n garbage collections perform array bounds checks elimination analyze liveness of environment slots and zap dead values flushes the cache of optimized code for closures on every GC allow uint32 values on optimize frames if they are used only in safe operations track concurrent recompilation artificial compilation delay in ms do not emit check maps for constant values that have a leaf map
enable harmony numeric enable harmony object literal extensions Optimize object Array DOM strings and string trace pretenuring decisions of HAllocate instructions Enables optimizations which favor memory size over execution speed maximum source size in bytes considered for a single inlining maximum cumulative number of AST nodes considered for inlining trace the tracking of allocation sites deoptimize every n garbage collections perform array bounds checks elimination analyze liveness of environment slots and zap dead values flushes the cache of optimized code for closures on every GC allow uint32 values on optimize frames if they are used only in safe operations track concurrent recompilation artificial compilation delay in ms do not emit check maps for constant values that have a leaf deoptimize the optimized code if the layout of the maps changes enable context specialization in TurboFan execution budget before interrupt is triggered max percentage of megamorphic generic ICs to allow optimization enable use of SAHF instruction if enable use of VFP3 instructions if available enable use of NEON instructions if enable use of SDIV and UDIV instructions if enable use of MLS instructions if enable loading bit constant by means of movw movt instruction enable unaligned accesses for enable use of d16 d31 registers on ARM this requires VFP3 force all emitted branches to be in long enable alignment of csp to bytes on platforms which prefer the register to always be NULL
#define DCHECK(condition)
static const int kDescriptorIndexBitCount
Debugger support for the V8 JavaScript engine.