v8  3.25.30(node0.11.13)
V8 is Google's open source JavaScript engine
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
DescriptorArray Class Reference

#include <objects.h>

Inheritance diagram for DescriptorArray:
Collaboration diagram for DescriptorArray:

Data Structures

class  WhitenessWitness
 

Public Member Functions

bool IsEmpty ()
 
int number_of_descriptors ()
 
int number_of_descriptors_storage ()
 
int NumberOfSlackDescriptors ()
 
void SetNumberOfDescriptors (int number_of_descriptors)
 
int number_of_entries ()
 
bool HasEnumCache ()
 
void CopyEnumCacheFrom (DescriptorArray *array)
 
FixedArrayGetEnumCache ()
 
bool HasEnumIndicesCache ()
 
FixedArrayGetEnumIndicesCache ()
 
Object ** GetEnumCacheSlot ()
 
void ClearEnumCache ()
 
void SetEnumCache (FixedArray *bridge_storage, FixedArray *new_cache, Object *new_index_cache)
 
NameGetKey (int descriptor_number)
 
Object ** GetKeySlot (int descriptor_number)
 
ObjectGetValue (int descriptor_number)
 
Object ** GetValueSlot (int descriptor_number)
 
Object ** GetDescriptorStartSlot (int descriptor_number)
 
Object ** GetDescriptorEndSlot (int descriptor_number)
 
PropertyDetails GetDetails (int descriptor_number)
 
PropertyType GetType (int descriptor_number)
 
int GetFieldIndex (int descriptor_number)
 
ObjectGetConstant (int descriptor_number)
 
ObjectGetCallbacksObject (int descriptor_number)
 
AccessorDescriptorGetCallbacks (int descriptor_number)
 
NameGetSortedKey (int descriptor_number)
 
int GetSortedKeyIndex (int descriptor_number)
 
void SetSortedKey (int pointer, int descriptor_number)
 
void InitializeRepresentations (Representation representation)
 
void SetRepresentation (int descriptor_number, Representation representation)
 
void Get (int descriptor_number, Descriptor *desc)
 
void Set (int descriptor_number, Descriptor *desc, const WhitenessWitness &)
 
void Set (int descriptor_number, Descriptor *desc)
 
void Append (Descriptor *desc, const WhitenessWitness &)
 
void Append (Descriptor *desc)
 
void CopyFrom (int dst_index, DescriptorArray *src, int src_index, const WhitenessWitness &)
 
MUST_USE_RESULT MaybeObject * Merge (int verbatim, int valid, int new_size, int modify_index, StoreMode store_mode, DescriptorArray *other)
 
bool IsMoreGeneralThan (int verbatim, int valid, int new_size, DescriptorArray *other)
 
MUST_USE_RESULT MaybeObject * CopyUpTo (int enumeration_index)
 
MUST_USE_RESULT MaybeObject * CopyUpToAddAttributes (int enumeration_index, PropertyAttributes attributes)
 
void Sort ()
 
 INLINE (int Search(Name *name, int number_of_own_descriptors))
 
 INLINE (int SearchWithCache(Name *name, Map *map))
 
- Public Member Functions inherited from FixedArray
Objectget (int index)
 
void set (int index, Object *value)
 
bool is_the_hole (int index)
 
void set (int index, Smi *value)
 
void set (int index, Object *value, WriteBarrierMode mode)
 
void set_undefined (int index)
 
void set_null (int index)
 
void set_the_hole (int index)
 
Object ** GetFirstElementAddress ()
 
bool ContainsOnlySmisOrHoles ()
 
Object ** data_start ()
 
void Shrink (int length)
 
MUST_USE_RESULT MaybeObject * Copy ()
 
MUST_USE_RESULT MaybeObject * CopySize (int new_length, PretenureFlag pretenure=NOT_TENURED)
 
MUST_USE_RESULT MaybeObject * AddKeysFromJSArray (JSArray *array)
 
MUST_USE_RESULT MaybeObject * UnionOfKeys (FixedArray *other)
 
void CopyTo (int pos, FixedArray *dest, int dest_pos, int len)
 
Object ** RawFieldOfElementAt (int index)
 
void SwapPairs (FixedArray *numbers, int i, int j)
 
void SortPairs (FixedArray *numbers, uint32_t len)
 
- Public Member Functions inherited from FixedArrayBase
int length ()
 
void set_length (int value)
 
- Public Member Functions inherited from HeapObject
Mapmap ()
 
void set_map (Map *value)
 
void set_map_no_write_barrier (Map *value)
 
MapWord map_word ()
 
void set_map_word (MapWord map_word)
 
HeapGetHeap ()
 
IsolateGetIsolate ()
 
Address address ()
 
void Iterate (ObjectVisitor *v)
 
void IterateBody (InstanceType type, int object_size, ObjectVisitor *v)
 
int Size ()
 
int SizeFromMap (Map *map)
 
WriteBarrierMode GetWriteBarrierMode (const DisallowHeapAllocation &promise)
 
void HeapObjectShortPrint (StringStream *accumulator)
 
 STATIC_CHECK (kMapOffset==Internals::kHeapObjectMapOffset)
 
- Public Member Functions inherited from Object
bool IsObject ()
 
bool IsFixedArrayBase ()
 
bool IsExternal ()
 
bool IsAccessorInfo ()
 
bool IsStruct ()
 
 INLINE (bool IsSpecObject())
 
 INLINE (bool IsSpecFunction())
 
bool IsCallable ()
 
 INLINE (bool IsUndefined())
 
 INLINE (bool IsNull())
 
 INLINE (bool IsTheHole())
 
 INLINE (bool IsUninitialized())
 
 INLINE (bool IsTrue())
 
 INLINE (bool IsFalse())
 
bool IsArgumentsMarker ()
 
bool NonFailureIsHeapObject ()
 
bool IsFiller ()
 
double Number ()
 
bool IsNaN ()
 
bool ToInt32 (int32_t *value)
 
bool ToUint32 (uint32_t *value)
 
Representation OptimalRepresentation (ValueType type=OPTIMAL_REPRESENTATION)
 
bool FitsRepresentation (Representation representation)
 
MaybeObject * AllocateNewStorageFor (Heap *heap, Representation representation)
 
bool HasValidElements ()
 
bool HasSpecificClassOf (String *name)
 
MUST_USE_RESULT MaybeObject * ToObject (Isolate *isolate)
 
bool BooleanValue ()
 
MUST_USE_RESULT MaybeObject * ToObject (Context *native_context)
 
MUST_USE_RESULT MaybeObject * ToSmi ()
 
void Lookup (Name *name, LookupResult *result)
 
MUST_USE_RESULT MaybeObject * GetProperty (Name *key)
 
MUST_USE_RESULT MaybeObject * GetProperty (Name *key, PropertyAttributes *attributes)
 
MUST_USE_RESULT MaybeObject * GetPropertyWithReceiver (Object *receiver, Name *key, PropertyAttributes *attributes)
 
MUST_USE_RESULT MaybeObject * GetProperty (Object *receiver, LookupResult *result, Name *key, PropertyAttributes *attributes)
 
MUST_USE_RESULT MaybeObject * GetPropertyWithDefinedGetter (Object *receiver, JSReceiver *getter)
 
ObjectGetPrototype (Isolate *isolate)
 
MapGetMarkerMap (Isolate *isolate)
 
ObjectGetHash ()
 
bool SameValue (Object *other)
 
bool ToArrayIndex (uint32_t *index)
 
bool IsStringObjectWithCharacterAt (uint32_t index)
 
void VerifyApiCallResultType ()
 
void ShortPrint (FILE *out=stdout)
 
void ShortPrint (StringStream *accumulator)
 

Static Public Member Functions

static Handle< DescriptorArrayMerge (Handle< DescriptorArray > desc, int verbatim, int valid, int new_size, int modify_index, StoreMode store_mode, Handle< DescriptorArray > other)
 
static Handle< DescriptorArrayCopyUpToAddAttributes (Handle< DescriptorArray > desc, int enumeration_index, PropertyAttributes attributes)
 
static MUST_USE_RESULT
MaybeObject * 
Allocate (Isolate *isolate, int number_of_descriptors, int slack=0)
 
static DescriptorArraycast (Object *obj)
 
static int LengthFor (int number_of_descriptors)
 
- Static Public Member Functions inherited from FixedArray
static int SizeFor (int length)
 
static int OffsetOfElementAt (int index)
 
static FixedArraycast (Object *obj)
 
- Static Public Member Functions inherited from FixedArrayBase
static FixedArrayBasecast (Object *object)
 
- Static Public Member Functions inherited from HeapObject
static HeapObjectFromAddress (Address address)
 
static Object ** RawField (HeapObject *obj, int offset)
 
static void UpdateMapCodeCache (Handle< HeapObject > object, Handle< Name > name, Handle< Code > code)
 
static HeapObjectcast (Object *obj)
 
- Static Public Member Functions inherited from Object
static MUST_USE_RESULT Handle
< Object
ToSmi (Isolate *isolate, Handle< Object > object)
 
static Handle< ObjectGetPropertyWithReceiver (Handle< Object > object, Handle< Object > receiver, Handle< Name > name, PropertyAttributes *attributes)
 
static Handle< ObjectGetProperty (Handle< Object > object, Handle< Name > key)
 
static Handle< ObjectGetProperty (Handle< Object > object, Handle< Object > receiver, LookupResult *result, Handle< Name > key, PropertyAttributes *attributes)
 
static MUST_USE_RESULT
MaybeObject * 
GetPropertyOrFail (Handle< Object > object, Handle< Object > receiver, LookupResult *result, Handle< Name > key, PropertyAttributes *attributes)
 
static Handle< ObjectGetElement (Isolate *isolate, Handle< Object > object, uint32_t index)
 
static Handle< ObjectGetElementNoExceptionThrown (Isolate *isolate, Handle< Object > object, uint32_t index)
 
static Handle< ObjectGetElementWithReceiver (Isolate *isolate, Handle< Object > object, Handle< Object > receiver, uint32_t index)
 
static Handle< ObjectGetOrCreateHash (Handle< Object > object, Isolate *isolate)
 
static Objectcast (Object *value)
 

Static Public Attributes

static const int kNotFound = -1
 
static const int kDescriptorLengthIndex = 0
 
static const int kEnumCacheIndex = 1
 
static const int kFirstIndex = 2
 
static const int kEnumCacheBridgeLength = 2
 
static const int kEnumCacheBridgeCacheIndex = 0
 
static const int kEnumCacheBridgeIndicesCacheIndex = 1
 
static const int kDescriptorLengthOffset = FixedArray::kHeaderSize
 
static const int kEnumCacheOffset = kDescriptorLengthOffset + kPointerSize
 
static const int kFirstOffset = kEnumCacheOffset + kPointerSize
 
static const int kEnumCacheBridgeCacheOffset = FixedArray::kHeaderSize
 
static const int kDescriptorKey = 0
 
static const int kDescriptorDetails = 1
 
static const int kDescriptorValue = 2
 
static const int kDescriptorSize = 3
 
- Static Public Attributes inherited from FixedArray
static const int kMaxSize = 128 * MB * kPointerSize
 
static const int kMaxLength = (kMaxSize - kHeaderSize) / kPointerSize
 
- Static Public Attributes inherited from FixedArrayBase
static const int kLengthOffset = HeapObject::kHeaderSize
 
static const int kHeaderSize = kLengthOffset + kPointerSize
 
- Static Public Attributes inherited from HeapObject
static const int kMapOffset = Object::kHeaderSize
 
static const int kHeaderSize = kMapOffset + kPointerSize
 
- Static Public Attributes inherited from Object
static const int kHeaderSize = 0
 

Additional Inherited Members

- Public Types inherited from Object
enum  ValueType { OPTIMAL_REPRESENTATION, FORCE_TAGGED }
 
- Protected Member Functions inherited from HeapObject
void IteratePointers (ObjectVisitor *v, int start, int end)
 
void IteratePointer (ObjectVisitor *v, int offset)
 
void IterateNextCodeLink (ObjectVisitor *v, int offset)
 
- Static Protected Member Functions inherited from FixedArray
static void NoWriteBarrierSet (FixedArray *array, int index, Object *value)
 
static void NoIncrementalWriteBarrierSet (FixedArray *array, int index, Object *value)
 

Detailed Description

Definition at line 3310 of file objects.h.

Member Function Documentation

static DescriptorArray* cast ( Object obj)
inlinestatic
void ClearEnumCache ( )

Definition at line 7940 of file objects.cc.

References Smi::FromInt(), DescriptorArray::kEnumCacheIndex, and FixedArray::set().

void CopyEnumCacheFrom ( DescriptorArray array)
inline

Definition at line 3357 of file objects.h.

References FixedArray::get().

Referenced by Map::ShareDescriptor().

MUST_USE_RESULT MaybeObject* CopyUpTo ( int  enumeration_index)
inline

Definition at line 3454 of file objects.h.

References NONE.

Referenced by Map::Copy(), and Map::CopyWithPreallocatedFieldDescriptors().

Handle< DescriptorArray > CopyUpToAddAttributes ( Handle< DescriptorArray desc,
int  enumeration_index,
PropertyAttributes  attributes 
)
static

Definition at line 7061 of file objects.cc.

References CALL_HEAP_FUNCTION.

Referenced by JSObject::Freeze().

void Get ( int  descriptor_number,
Descriptor *  desc 
)
inline
Object * GetCallbacksObject ( int  descriptor_number)
inline
Object * GetConstant ( int  descriptor_number)
inline

Definition at line 2670 of file objects-inl.h.

References DescriptorArray::GetValue().

Referenced by JSObject::SlowReverseLookup().

Object ** GetDescriptorEndSlot ( int  descriptor_number)
inline
Object ** GetDescriptorStartSlot ( int  descriptor_number)
inline
FixedArray* GetEnumCache ( )
inline
Object** GetEnumCacheSlot ( )
inline

Definition at line 3381 of file objects.h.

References ASSERT, and HeapObject::RawField().

FixedArray* GetEnumIndicesCache ( )
inline

Definition at line 3375 of file objects.h.

References ASSERT, FixedArray::cast(), and FixedArray::get().

int GetFieldIndex ( int  descriptor_number)
inline
Object ** GetKeySlot ( int  descriptor_number)
inline
Name * GetSortedKey ( int  descriptor_number)
inline
int GetSortedKeyIndex ( int  descriptor_number)
inline
Object ** GetValueSlot ( int  descriptor_number)
inline
bool HasEnumCache ( )
inline

Definition at line 3353 of file objects.h.

Referenced by DescriptorArray::SetEnumCache(), and Map::ShareDescriptor().

bool HasEnumIndicesCache ( )
inline

Definition at line 3367 of file objects.h.

References FixedArray::cast(), and FixedArray::get().

void InitializeRepresentations ( Representation  representation)
inline
INLINE ( int   SearchName *name, int number_of_own_descriptors)
INLINE ( int   SearchWithCacheName *name, Map *map)
bool IsEmpty ( )
inline
bool IsMoreGeneralThan ( int  verbatim,
int  valid,
int  new_size,
DescriptorArray other 
)
static int LengthFor ( int  number_of_descriptors)
inlinestatic

Definition at line 3529 of file objects.h.

Referenced by DescriptorArray::Allocate().

Handle< DescriptorArray > Merge ( Handle< DescriptorArray desc,
int  verbatim,
int  valid,
int  new_size,
int  modify_index,
StoreMode  store_mode,
Handle< DescriptorArray other 
)
static

Definition at line 7971 of file objects.cc.

References CALL_HEAP_FUNCTION.

Referenced by Map::GeneralizeRepresentation().

int number_of_descriptors_storage ( )
inline

Definition at line 3341 of file objects.h.

int number_of_entries ( )
inline

Definition at line 3351 of file objects.h.

int NumberOfSlackDescriptors ( )
inline

Definition at line 3346 of file objects.h.

Referenced by DescriptorArray::Merge(), and Map::ShareDescriptor().

void Set ( int  descriptor_number,
Descriptor *  desc 
)
inline
void SetNumberOfDescriptors ( int  number_of_descriptors)
inline
void SetRepresentation ( int  descriptor_number,
Representation  representation 
)
inline
void SetSortedKey ( int  pointer,
int  descriptor_number 
)
inline

Field Documentation

const int kDescriptorDetails = 1
static

Definition at line 3507 of file objects.h.

const int kDescriptorKey = 0
static

Definition at line 3506 of file objects.h.

const int kDescriptorLengthIndex = 0
static

Definition at line 3488 of file objects.h.

Referenced by DescriptorArray::Allocate().

const int kDescriptorLengthOffset = FixedArray::kHeaderSize
static

Definition at line 3498 of file objects.h.

Referenced by DescriptorArray::SetNumberOfDescriptors().

const int kDescriptorSize = 3
static

Definition at line 3509 of file objects.h.

const int kDescriptorValue = 2
static

Definition at line 3508 of file objects.h.

const int kEnumCacheBridgeCacheIndex = 0
static

Definition at line 3494 of file objects.h.

Referenced by DescriptorArray::SetEnumCache().

const int kEnumCacheBridgeCacheOffset = FixedArray::kHeaderSize
static

Definition at line 3503 of file objects.h.

const int kEnumCacheBridgeIndicesCacheIndex = 1
static

Definition at line 3495 of file objects.h.

Referenced by DescriptorArray::SetEnumCache().

const int kEnumCacheBridgeLength = 2
static

Definition at line 3493 of file objects.h.

Referenced by v8::internal::GetEnumPropertyKeys(), and DescriptorArray::SetEnumCache().

const int kEnumCacheIndex = 1
static
const int kEnumCacheOffset = kDescriptorLengthOffset + kPointerSize
static

Definition at line 3499 of file objects.h.

const int kFirstIndex = 2
static

Definition at line 3490 of file objects.h.

Referenced by DescriptorArray::IsEmpty().

const int kFirstOffset = kEnumCacheOffset + kPointerSize
static

The documentation for this class was generated from the following files: