v8  3.14.5(node0.10.28)
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 *native_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 VerifyApiCallResultType ()
 
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 2305 of file objects.h.

Member Function Documentation

static FixedArray* cast ( Object obj)
inlinestatic

Referenced by SharedFunctionInfo::AddToOptimizedCodeMap(), Heap::AllocateJSObjectFromMap(), Heap::AllocateUninitializedFixedArray(), CodeCacheHashTableKey::AsObject(), PolymorphicCodeCacheHashTableKey::AsObject(), StringSharedKey::AsObject(), RegExpImpl::AtomExec(), v8::internal::BUILTIN(), Isolate::CaptureCurrentStackTrace(), Heap::ClearJSFunctionResultCaches(), Array::CloneElementAt(), RegExpImpl::Compile(), 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(), CompileTimeValue::GetElements(), JSObject::GetElementsTransitionMap(), DescriptorArray::GetEnumCache(), DescriptorArray::GetEnumIndicesCache(), JSRegExp::GetFlags(), NonStrictArgumentsElementsAccessor::GetImpl(), JSObject::GetLocalElementKeys(), TransitionArray::GetPrototypeTransitions(), v8::internal::GetScriptColumnNumber(), v8::internal::GetScriptLineNumber(), SharedFunctionInfo::GetThisPropertyAssignmentArgument(), SharedFunctionInfo::GetThisPropertyAssignmentConstant(), SharedFunctionInfo::GetThisPropertyAssignmentName(), JSObject::HasDictionaryArgumentsElements(), DescriptorArray::HasEnumIndicesCache(), JSObject::HasFastArgumentsElements(), CodeCacheHashTableKey::HashForObject(), StringSharedKey::HashForObject(), RegExpKey::HashForObject(), SymbolsKey::HashForObject(), JSObject::HasLocalElement(), JSObject::HasRealElementProperty(), HeapObject::HeapObjectShortPrint(), SharedFunctionInfo::InstallFromOptimizedCodeMap(), RegExpImpl::IrregexpExec(), RegExpImpl::IrregexpExecRaw(), RegExpImpl::IrregexpPrepare(), CodeCacheHashTableKey::IsMatch(), StringSharedKey::IsMatch(), RegExpKey::IsMatch(), SymbolsKey::IsMatch(), SharedFunctionInfo::IsThisPropertyAssignmentArgument(), CompilationCacheRegExp::Lookup(), TypeSwitch::match(), JSObject::NormalizeElements(), JSObject::NumberOfEnumElements(), JSRegExp::Pattern(), JSObject::PrepareElementsForSort(), StringStream::PrintMentionedObjectCache(), JSObject::ReferencesObject(), Heap::ReinitializeJSGlobalProxy(), Heap::ReinitializeJSReceiver(), v8::internal::RUNTIME_FUNCTION(), SharedFunctionInfo::SearchOptimizedCodeMap(), NeanderObject::set(), JSArray::SetContent(), JSRegExp::SetDataAt(), JSObject::SetDictionaryElement(), DescriptorArray::SetEnumCache(), JSObject::SetFastDoubleElementsCapacityAndLength(), JSObject::SetFastElement(), JSObject::SetFastElementsCapacityAndLength(), RegExpImpl::SetLastMatchInfo(), JSObject::ShouldConvertToFastElements(), NeanderObject::size(), TEST(), JSRegExp::TypeTag(), MarkCompactMarkingVisitor::ObjectStatsTracker< MarkCompactMarkingVisitor::kVisitMap >::Visit(), MarkCompactMarkingVisitor::ObjectStatsTracker< MarkCompactMarkingVisitor::kVisitSharedFunctionInfo >::Visit(), and MarkCompactMarkingVisitor::ObjectStatsTracker< MarkCompactMarkingVisitor::kVisitFixedArray >::Visit().

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

Definition at line 6012 of file objects.cc.

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

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

Definition at line 1737 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(), DescriptorArray::CopyEnumCacheFrom(), StringDictionary::CopyEnumKeysTo(), Heap::CopyFixedArrayWithMap(), v8::internal::CopyObjectToObjectElements(), CountNativeContexts(), Runtime::CreateArrayLiteralBoilerplate(), JSRegExp::DataAt(), NonStrictArgumentsElementsAccessor::Delete(), DictionaryElementsAccessor::DeleteCommon(), RegExpResultsCache::Enter(), Dictionary< Shape, Key >::GenerateNewEnumerationIndices(), NeanderObject::get(), NonStrictArgumentsElementsAccessor::GetCapacityImpl(), RegExpImpl::GetCapture(), JSObject::GetElementsTransitionMap(), DescriptorArray::GetEnumCache(), DescriptorArray::GetEnumIndicesCache(), NonStrictArgumentsElementsAccessor::GetImpl(), CodeCache::GetIndex(), RegExpImpl::GetLastCaptureCount(), JSObject::GetLocalElementKeys(), Map::GetPrototypeTransition(), v8::internal::GetScriptColumnNumber(), v8::internal::GetScriptLineNumber(), SharedFunctionInfo::GetThisPropertyAssignmentArgument(), SharedFunctionInfo::GetThisPropertyAssignmentConstant(), SharedFunctionInfo::GetThisPropertyAssignmentName(), JSObject::HasDictionaryArgumentsElements(), NonStrictArgumentsElementsAccessor::HasElementImpl(), DescriptorArray::HasEnumIndicesCache(), JSObject::HasFastArgumentsElements(), CodeCacheHashTableKey::HashForObject(), StringSharedKey::HashForObject(), RegExpKey::HashForObject(), SymbolsKey::HashForObject(), JSObject::HasLocalElement(), JSObject::HasRealElementProperty(), v8::internal::HeapSortPairs(), IncrementalMarking::Hurry(), SharedFunctionInfo::InstallFromOptimizedCodeMap(), RegExpImpl::IrregexpByteCode(), RegExpImpl::IrregexpMaxRegisterCount(), RegExpImpl::IrregexpNativeCode(), RegExpImpl::IrregexpNumberOfCaptures(), RegExpImpl::IrregexpNumberOfRegisters(), CodeCacheHashTableKey::IsMatch(), StringSharedKey::IsMatch(), RegExpKey::IsMatch(), SymbolsKey::IsMatch(), SharedFunctionInfo::IsThisPropertyAssignmentArgument(), RegExpResultsCache::Lookup(), TypeSwitch::match(), JSFunction::NativeContextFromLiterals(), 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(), SharedFunctionInfo::SearchOptimizedCodeMap(), JSFunction::set_initial_map_and_cache_transitions(), JSObject::SetDictionaryElement(), 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 1743 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
void set ( int  index,
Object value 
)
inline

Definition at line 1757 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(), TransitionArray::Allocate(), DescriptorArray::Allocate(), Heap::AllocateCatchContext(), CodeCacheHashTableKey::AsObject(), PolymorphicCodeCacheHashTableKey::AsObject(), StringSharedKey::AsObject(), v8::internal::BUILTIN(), RegExpResultsCache::Clear(), Context::ClearOptimizedFunctions(), StringDictionary::CopyEnumKeysTo(), Heap::CopyFixedArrayWithMap(), FixedArray::CopySize(), FixedArray::CopyTo(), Dictionary< Shape, Key >::CopyValuesTo(), Heap::CreateApiObjects(), RegExpResultsCache::Enter(), StringDictionary::FindEntry(), Dictionary< Shape, Key >::GenerateNewEnumerationIndices(), JSObject::GetLocalElementKeys(), JSObject::GetLocalPropertyNames(), TransitionArray::NewWith(), JSObject::NormalizeElements(), JSObject::PrepareElementsForSort(), MapCache::Put(), ObjectHashTable::Put(), CompilationCacheTable::Put(), CodeCacheHashTable::Put(), PolymorphicCodeCacheHashTable::Put(), CompilationCacheTable::PutEval(), Map::PutPrototypeTransition(), CompilationCacheTable::PutRegExp(), HashTable< Shape, Key >::Rehash(), Context::RemoveOptimizedFunction(), v8::internal::RUNTIME_FUNCTION(), DescriptorArray::Set(), Context::set_closure(), Context::set_extension(), JSFunctionResultCache::set_finger_index(), Context::set_global_object(), JSFunction::set_initial_map_and_cache_transitions(), Context::set_module(), Context::set_previous(), SeededNumberDictionary::set_requires_slow_elements(), JSFunctionResultCache::set_size(), TypeFeedbackCells::SetAstId(), RegExpImpl::SetCapture(), TypeFeedbackCells::SetCell(), JSRegExp::SetDataAt(), JSObject::SetDictionaryElement(), Dictionary< Shape, Key >::SetEntry(), JSObject::SetFastDoubleElementsCapacityAndLength(), JSObject::SetFastElement(), JSObject::SetFastElementsCapacityAndLength(), RegExpImpl::SetIrregexpMaxRegisterCount(), TransitionArray::SetKey(), RegExpImpl::SetLastCaptureCount(), RegExpImpl::SetLastInput(), RegExpImpl::SetLastSubject(), ElementsAccessorBase< ElementsAccessorSubclass, ElementsTraitsParam >::SetLengthImpl(), DescriptorArray::SetSortedKey(), TransitionArray::SetTarget(), FixedArray::SwapPairs(), StringDictionary::TransformPropertiesToFastFor(), and SeededNumberDictionary::UpdateMaxNumberKey().

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

Definition at line 1888 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 ( int  index,
Smi value 
)
inline
void set_unchecked ( Heap heap,
int  index,
Object value,
WriteBarrierMode  mode 
)
inline
void set_undefined ( int  index)
inline

Definition at line 1874 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 
)

Field Documentation

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

Definition at line 2364 of file objects.h.

Referenced by TEST().


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