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

#include <objects.h>

Inheritance diagram for FixedArray:
Collaboration diagram for FixedArray:

Data Structures

class  BodyDescriptor
 

Public Member Functions

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_undefined (Heap *heap, int index)
 
void set_null (int index)
 
void set_null (Heap *heap, int index)
 
void set_the_hole (int index)
 
void set_unchecked (int index, Smi *value)
 
void set_null_unchecked (Heap *heap, int index)
 
void set_unchecked (Heap *heap, int index, Object *value, WriteBarrierMode mode)
 
Object ** data_start ()
 
Object ** GetFirstElementAddress ()
 
bool ContainsOnlySmisOrHoles ()
 
MUST_USE_RESULT MaybeObject * Copy ()
 
MUST_USE_RESULT MaybeObject * CopySize (int new_length)
 
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)
 
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 AssertNoAllocation &)
 
void HeapObjectShortPrint (StringStream *accumulator)
 
 STATIC_CHECK (kMapOffset==Internals::kHeapObjectMapOffset)
 
- Public Member Functions inherited from Object
bool IsObject ()
 
bool IsFixedArrayBase ()
 
bool IsInstanceOf (FunctionTemplateInfo *type)
 
bool IsStruct ()
 
 INLINE (bool IsSpecObject())
 
 INLINE (bool IsSpecFunction())
 
 INLINE (bool IsUndefined())
 
 INLINE (bool IsNull())
 
 INLINE (bool IsTheHole())
 
 INLINE (bool IsTrue())
 
 INLINE (bool IsFalse())
 
bool IsArgumentsMarker ()
 
bool NonFailureIsHeapObject ()
 
bool IsFiller ()
 
double Number ()
 
bool IsNaN ()
 
bool HasValidElements ()
 
bool HasSpecificClassOf (String *name)
 
MUST_USE_RESULT MaybeObject * ToObject ()
 
ObjectToBoolean ()
 
MUST_USE_RESULT MaybeObject * ToObject (Context *global_context)
 
MUST_USE_RESULT MaybeObject * ToSmi ()
 
void Lookup (String *name, LookupResult *result)
 
MUST_USE_RESULT MaybeObject * GetProperty (String *key)
 
MUST_USE_RESULT MaybeObject * GetProperty (String *key, PropertyAttributes *attributes)
 
MUST_USE_RESULT MaybeObject * GetPropertyWithReceiver (Object *receiver, String *key, PropertyAttributes *attributes)
 
MUST_USE_RESULT MaybeObject * GetProperty (Object *receiver, LookupResult *result, String *key, PropertyAttributes *attributes)
 
MUST_USE_RESULT MaybeObject * GetPropertyWithDefinedGetter (Object *receiver, JSReceiver *getter)
 
MUST_USE_RESULT MaybeObject * GetElement (uint32_t index)
 
ObjectGetElementNoExceptionThrown (uint32_t index)
 
MUST_USE_RESULT MaybeObject * GetElementWithReceiver (Object *receiver, uint32_t index)
 
ObjectGetPrototype ()
 
MUST_USE_RESULT MaybeObject * GetHash (CreationFlag flag)
 
bool SameValue (Object *other)
 
bool ToArrayIndex (uint32_t *index)
 
bool IsStringObjectWithCharacterAt (uint32_t index)
 
void ShortPrint ()
 
void ShortPrint (FILE *out)
 
void ShortPrint (StringStream *accumulator)
 

Static Public Member Functions

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 HeapObjectcast (Object *obj)
 
- Static Public Member Functions inherited from Object
static Handle< ObjectGetProperty (Handle< Object > object, Handle< Object > receiver, LookupResult *result, Handle< String > key, PropertyAttributes *attributes)
 
static Handle< ObjectGetElement (Handle< Object > object, uint32_t index)
 
static Objectcast (Object *value)
 

Static Public Attributes

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
 

Static Protected Member Functions

static void NoWriteBarrierSet (FixedArray *array, int index, Object *value)
 
static void NoIncrementalWriteBarrierSet (FixedArray *array, int index, Object *value)
 

Additional Inherited Members

- Protected Member Functions inherited from HeapObject
void IteratePointers (ObjectVisitor *v, int start, int end)
 
void IteratePointer (ObjectVisitor *v, int offset)
 

Detailed Description

Definition at line 2240 of file objects.h.

Member Function Documentation

static FixedArray* cast ( Object obj)
inlinestatic

Referenced by JSObject::AddFastProperty(), JSObject::AddFastPropertyUsingMap(), Heap::AllocateJSObjectFromMap(), Heap::AllocateUninitializedFixedArray(), CompiledReplacement::Apply(), CodeCacheHashTableKey::AsObject(), PolymorphicCodeCacheHashTableKey::AsObject(), StringSharedKey::AsObject(), RegExpImpl::AtomExec(), v8::internal::BUILTIN(), Isolate::CaptureCurrentStackTrace(), Heap::ClearJSFunctionResultCaches(), Array::CloneElementAt(), RegExpImpl::Compile(), JSObject::ConvertDescriptorToField(), FastSmiOrObjectElementsAccessor< FastPackedSmiElementsAccessor, ElementsKindTraits< FAST_SMI_ELEMENTS > >::CopyElementsImpl(), FastDoubleElementsAccessor< FastHoleyDoubleElementsAccessor, ElementsKindTraits< FAST_HOLEY_DOUBLE_ELEMENTS > >::CopyElementsImpl(), DictionaryElementsAccessor::CopyElementsImpl(), NonStrictArgumentsElementsAccessor::CopyElementsImpl(), Heap::CopyFixedArrayWithMap(), Heap::CopyJSObject(), FixedArray::CopySize(), Heap::CreateApiObjects(), Runtime::CreateArrayLiteralBoilerplate(), JSRegExp::DataAt(), NonStrictArgumentsElementsAccessor::Delete(), FastElementsAccessor< FastPackedSmiElementsAccessor, ElementsKindTraits< FAST_SMI_ELEMENTS >, kPointerSize >::DeleteCommon(), DictionaryElementsAccessor::DeleteCommon(), JSObject::EnsureCanContainElements(), JSArray::EnsureSize(), JSObject::EnsureWritableFastElements(), Dictionary< Shape, Key >::GenerateNewEnumerationIndices(), NeanderObject::get(), Map::GetBackPointer(), CompileTimeValue::GetElements(), JSObject::GetElementsTransitionMap(), DescriptorArray::GetEnumCache(), v8::internal::GetEnumPropertyKeys(), JSRegExp::GetFlags(), NonStrictArgumentsElementsAccessor::GetImpl(), JSObject::GetLocalElementKeys(), v8::internal::GetScriptColumnNumber(), v8::internal::GetScriptLineNumber(), SharedFunctionInfo::GetThisPropertyAssignmentArgument(), SharedFunctionInfo::GetThisPropertyAssignmentConstant(), SharedFunctionInfo::GetThisPropertyAssignmentName(), JSObject::HasDictionaryArgumentsElements(), JSObject::HasFastArgumentsElements(), CodeCacheHashTableKey::HashForObject(), StringSharedKey::HashForObject(), RegExpKey::HashForObject(), SymbolsKey::HashForObject(), JSObject::HasLocalElement(), JSObject::HasRealElementProperty(), HeapObject::HeapObjectShortPrint(), RegExpImpl::IrregexpExec(), RegExpImpl::IrregexpExecRaw(), RegExpImpl::IrregexpPrepare(), CodeCacheHashTableKey::IsMatch(), StringSharedKey::IsMatch(), RegExpKey::IsMatch(), SymbolsKey::IsMatch(), JSReceiver::IsSimpleEnum(), SharedFunctionInfo::IsThisPropertyAssignmentArgument(), CompilationCacheRegExp::Lookup(), TypeSwitch::match(), DescriptorArray::NextEnumerationIndex(), JSObject::NormalizeElements(), JSObject::NumberOfEnumElements(), JSRegExp::Pattern(), JSObject::PrepareElementsForSort(), StringStream::PrintMentionedObjectCache(), JSObject::ReferencesObject(), Heap::ReinitializeJSGlobalProxy(), Heap::ReinitializeJSReceiver(), v8::internal::RUNTIME_FUNCTION(), NeanderObject::set(), Map::SetBackPointer(), JSArray::SetContent(), JSRegExp::SetDataAt(), JSObject::SetDictionaryElement(), JSObject::SetElement(), DescriptorArray::SetEnumCache(), JSObject::SetFastDoubleElementsCapacityAndLength(), JSObject::SetFastElement(), JSObject::SetFastElementsCapacityAndLength(), JSObject::ShouldConvertToFastElements(), NeanderObject::size(), TEST(), StringDictionary::TransformPropertiesToFastFor(), and JSRegExp::TypeTag().

bool ContainsOnlySmisOrHoles ( )
inline
MaybeObject * Copy ( )
inline
void CopyTo ( int  pos,
FixedArray dest,
int  dest_pos,
int  len 
)

Definition at line 5734 of file objects.cc.

References HeapObject::GetWriteBarrierMode(), and FixedArray::set().

Object ** data_start ( )
inline
Object * get ( int  index)
inline

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

References ASSERT, FixedArrayBase::kHeaderSize, v8::internal::kPointerSize, FixedArrayBase::length(), and READ_FIELD.

Referenced by ElementsAccessorBase< FastPackedSmiElementsAccessor, ElementsKindTraits< FAST_SMI_ELEMENTS > >::AddElementsToFixedArray(), FixedArray::AddKeysFromJSArray(), Context::AddOptimizedFunction(), v8::internal::BUILTIN(), Heap::ClearJSFunctionResultCaches(), Heap::ClearNormalizedMapCaches(), Array::CloneElementAt(), NonStrictArgumentsElementsAccessor::CopyElementsImpl(), Heap::CopyFixedArrayWithMap(), v8::internal::CopyObjectToObjectElements(), Runtime::CreateArrayLiteralBoilerplate(), JSRegExp::DataAt(), NonStrictArgumentsElementsAccessor::Delete(), DictionaryElementsAccessor::DeleteCommon(), StringSplitCache::Enter(), Dictionary< Shape, Key >::GenerateNewEnumerationIndices(), NeanderObject::get(), Map::GetBackPointer(), NonStrictArgumentsElementsAccessor::GetCapacityImpl(), RegExpImpl::GetCapture(), JSObject::GetElementsTransitionMap(), DescriptorArray::GetEnumCache(), OptimizedFrame::GetFunctions(), NonStrictArgumentsElementsAccessor::GetImpl(), CodeCache::GetIndex(), RegExpImpl::GetLastCaptureCount(), JSObject::GetLocalElementKeys(), Map::GetPrototypeTransition(), v8::internal::GetScriptColumnNumber(), v8::internal::GetScriptLineNumber(), SharedFunctionInfo::GetThisPropertyAssignmentArgument(), SharedFunctionInfo::GetThisPropertyAssignmentConstant(), SharedFunctionInfo::GetThisPropertyAssignmentName(), JSFunction::GlobalContextFromLiterals(), JSObject::HasDictionaryArgumentsElements(), NonStrictArgumentsElementsAccessor::HasElementImpl(), JSObject::HasFastArgumentsElements(), CodeCacheHashTableKey::HashForObject(), StringSharedKey::HashForObject(), RegExpKey::HashForObject(), SymbolsKey::HashForObject(), JSObject::HasLocalElement(), JSObject::HasRealElementProperty(), v8::internal::HeapSortPairs(), IncrementalMarking::Hurry(), RegExpImpl::IrregexpByteCode(), RegExpImpl::IrregexpMaxRegisterCount(), RegExpImpl::IrregexpNativeCode(), RegExpImpl::IrregexpNumberOfCaptures(), RegExpImpl::IrregexpNumberOfRegisters(), CodeCacheHashTableKey::IsMatch(), StringSharedKey::IsMatch(), RegExpKey::IsMatch(), SymbolsKey::IsMatch(), SharedFunctionInfo::IsThisPropertyAssignmentArgument(), StringSplitCache::Lookup(), TypeSwitch::match(), DescriptorArray::NextEnumerationIndex(), Dictionary< SeededNumberDictionaryShape, uint32_t >::NextEnumerationIndex(), JSObject::NormalizeElements(), Map::NumberOfProtoTransitions(), JSObject::PrepareElementsForSort(), JavaScriptFrame::Print(), StringStream::PrintFixedArray(), Heap::ProcessWeakReferences(), Map::PutPrototypeTransition(), JSObject::ReferencesObject(), CodeCache::RemoveByIndex(), v8::internal::RUNTIME_FUNCTION(), JSFunction::set_initial_map_and_cache_transitions(), JSObject::SetDictionaryElement(), JSObject::SetElement(), JSObject::SetFastElement(), JSObject::ShouldConvertToFastElements(), FixedArray::SortPairs(), OptimizedFrame::Summarize(), FixedArray::SwapPairs(), FixedArray::UnionOfKeys(), and Deoptimizer::VisitAllOptimizedFunctions().

Object ** GetFirstElementAddress ( )
inline
bool is_the_hole ( int  index)
inline

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

References HeapObject::GetHeap().

void NoIncrementalWriteBarrierSet ( FixedArray array,
int  index,
Object value 
)
inlinestaticprotected
void NoWriteBarrierSet ( FixedArray array,
int  index,
Object value 
)
inlinestaticprotected
static int OffsetOfElementAt ( int  index)
inlinestatic
void set ( int  index,
Object value 
)
inline

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

References ASSERT, HeapObject::GetHeap(), HEAP, FixedArrayBase::kHeaderSize, v8::internal::kPointerSize, FixedArrayBase::length(), HeapObject::map(), WRITE_BARRIER, and WRITE_FIELD.

Referenced by ObjectHashSet::Add(), ElementsAccessorBase< FastPackedSmiElementsAccessor, ElementsKindTraits< FAST_SMI_ELEMENTS > >::AddElementsToFixedArray(), Context::AddOptimizedFunction(), DescriptorArray::Allocate(), Heap::AllocateCatchContext(), CodeCacheHashTableKey::AsObject(), PolymorphicCodeCacheHashTableKey::AsObject(), StringSharedKey::AsObject(), v8::internal::BUILTIN(), StringSplitCache::Clear(), Context::ClearOptimizedFunctions(), StringDictionary::CopyEnumKeysTo(), Heap::CopyFixedArrayWithMap(), FixedArray::CopySize(), FixedArray::CopyTo(), Dictionary< Shape, Key >::CopyValuesTo(), Heap::CreateApiObjects(), Dictionary< SeededNumberDictionaryShape, uint32_t >::DetailsAtPut(), StringSplitCache::Enter(), Dictionary< Shape, Key >::GenerateNewEnumerationIndices(), JSObject::GetLocalElementKeys(), JSObject::GetLocalPropertyNames(), JSObject::NormalizeElements(), JSObject::PrepareElementsForSort(), MapCache::Put(), CompilationCacheTable::Put(), CodeCacheHashTable::Put(), PolymorphicCodeCacheHashTable::Put(), CompilationCacheTable::PutEval(), Map::PutPrototypeTransition(), CompilationCacheTable::PutRegExp(), HashTable< Shape, Key >::Rehash(), Context::RemoveOptimizedFunction(), v8::internal::RUNTIME_FUNCTION(), Context::set_closure(), Context::set_extension(), JSFunctionResultCache::set_finger_index(), Context::set_global(), JSFunction::set_initial_map_and_cache_transitions(), Context::set_previous(), SeededNumberDictionary::set_requires_slow_elements(), JSFunctionResultCache::set_size(), TypeFeedbackCells::SetAstId(), Map::SetBackPointer(), HashTable< CompilationCacheShape, HashTableKey * >::SetCapacity(), RegExpImpl::SetCapture(), TypeFeedbackCells::SetCell(), JSRegExp::SetDataAt(), JSObject::SetDictionaryElement(), JSObject::SetElement(), Dictionary< Shape, Key >::SetEntry(), JSObject::SetFastDoubleElementsCapacityAndLength(), JSObject::SetFastElement(), JSObject::SetFastElementsCapacityAndLength(), RegExpImpl::SetIrregexpMaxRegisterCount(), RegExpImpl::SetLastCaptureCount(), RegExpImpl::SetLastInput(), RegExpImpl::SetLastSubject(), ElementsAccessorBase< ElementsAccessorSubclass, ElementsTraitsParam >::SetLengthImpl(), DescriptorArray::SetNextEnumerationIndex(), Dictionary< SeededNumberDictionaryShape, uint32_t >::SetNextEnumerationIndex(), HashTable< CompilationCacheShape, HashTableKey * >::SetNumberOfDeletedElements(), HashTable< CompilationCacheShape, HashTableKey * >::SetNumberOfElements(), FixedArray::SwapPairs(), StringDictionary::TransformPropertiesToFastFor(), SeededNumberDictionary::UpdateMaxNumberKey(), and Dictionary< SeededNumberDictionaryShape, uint32_t >::ValueAtPut().

void set ( int  index,
Smi value 
)
inline
void set_null ( int  index)
inline

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

References HeapObject::GetHeap().

Referenced by CodeCache::RemoveByIndex().

void set_null ( Heap heap,
int  index 
)
inline
void set_null_unchecked ( Heap heap,
int  index 
)
inline
void set_unchecked ( Heap heap,
int  index,
Object value,
WriteBarrierMode  mode 
)
inline
void set_undefined ( int  index)
inline

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

References ASSERT, HeapObject::GetHeap(), HEAP, and HeapObject::map().

Referenced by JSObject::PrepareElementsForSort().

void set_undefined ( Heap heap,
int  index 
)
inline
void SwapPairs ( FixedArray numbers,
int  i,
int  j 
)

Definition at line 10397 of file objects.cc.

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

Referenced by v8::internal::HeapSortPairs().

Field Documentation

const int kMaxLength = (kMaxSize - kHeaderSize) / kPointerSize
static
const int kMaxSize = 128 * MB * kPointerSize
static

Definition at line 2299 of file objects.h.

Referenced by TEST().


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