V8 Project
|
A simple visitor visits every element of Array's. More...
Public Member Functions | |
ArrayConcatVisitor (Isolate *isolate, Handle< FixedArray > storage, bool fast_elements) | |
~ArrayConcatVisitor () | |
void | visit (uint32_t i, Handle< Object > elm) |
void | increase_index_offset (uint32_t delta) |
bool | exceeds_array_limit () |
Handle< JSArray > | ToArray () |
Private Member Functions | |
void | SetDictionaryMode () |
void | clear_storage () |
void | set_storage (FixedArray *storage) |
Private Attributes | |
Isolate * | isolate_ |
Handle< FixedArray > | storage_ |
uint32_t | index_offset_ |
bool | fast_elements_: 1 |
bool | exceeds_array_limit_: 1 |
A simple visitor visits every element of Array's.
The backend storage can be a fixed array for fast elements case, or a dictionary for sparse array. Since Dictionary is a subtype of FixedArray, the class can be used by both fast and slow cases. The second parameter of the constructor, fast_elements, specifies whether the storage is a FixedArray or Dictionary.
An index limit is used to deal with the situation that a result array length overflows 32-bit non-negative integer.
Definition at line 4605 of file runtime.cc.
|
inline |
Definition at line 4607 of file runtime.cc.
|
inline |
Definition at line 4616 of file runtime.cc.
References clear_storage().
|
inlineprivate |
Definition at line 4703 of file runtime.cc.
References v8::internal::GlobalHandles::Destroy(), and storage_.
Referenced by SetDictionaryMode(), visit(), and ~ArrayConcatVisitor().
|
inline |
Definition at line 4665 of file runtime.cc.
References exceeds_array_limit_.
Referenced by v8::internal::RUNTIME_FUNCTION().
|
inline |
Definition at line 4649 of file runtime.cc.
References fast_elements_, index_offset_, v8::internal::JSObject::kMaxElementCount, and SetDictionaryMode().
Referenced by v8::internal::IterateElements(), and v8::internal::RUNTIME_FUNCTION().
|
inlineprivate |
Definition at line 4707 of file runtime.cc.
References v8::internal::Handle< T >::cast(), v8::internal::GlobalHandles::Create(), v8::internal::Isolate::global_handles(), isolate_, and storage_.
Referenced by SetDictionaryMode(), and visit().
|
inlineprivate |
Definition at line 4681 of file runtime.cc.
References v8::internal::SeededNumberDictionary::AtNumberPut(), clear_storage(), v8::internal::HandleScope::CloseAndEscape(), DCHECK, fast_elements_, isolate_, v8::internal::Dictionary< SeededNumberDictionary, SeededNumberDictionaryShape, uint32_t >::New(), set_storage(), and storage_.
Referenced by increase_index_offset(), and visit().
Definition at line 4667 of file runtime.cc.
References v8::internal::DICTIONARY_ELEMENTS, v8::internal::Isolate::factory(), fast_elements_, v8::internal::FAST_HOLEY_ELEMENTS, v8::internal::JSObject::GetElementsTransitionMap(), index_offset_, isolate_, map, and storage_.
Referenced by v8::internal::RUNTIME_FUNCTION().
Definition at line 4618 of file runtime.cc.
References v8::internal::SeededNumberDictionary::AtNumberPut(), clear_storage(), DCHECK, exceeds_array_limit_, fast_elements_, index_offset_, v8::internal::JSObject::kMaxElementCount, set_storage(), SetDictionaryMode(), and storage_.
Referenced by v8::internal::IterateElements(), v8::internal::IterateExternalArrayElements(), and v8::internal::RUNTIME_FUNCTION().
|
private |
Definition at line 4718 of file runtime.cc.
Referenced by exceeds_array_limit(), and visit().
|
private |
Definition at line 4717 of file runtime.cc.
Referenced by increase_index_offset(), SetDictionaryMode(), ToArray(), and visit().
|
private |
Definition at line 4716 of file runtime.cc.
Referenced by increase_index_offset(), ToArray(), and visit().
|
private |
Definition at line 4712 of file runtime.cc.
Referenced by set_storage(), SetDictionaryMode(), and ToArray().
|
private |
Definition at line 4713 of file runtime.cc.
Referenced by clear_storage(), set_storage(), SetDictionaryMode(), ToArray(), and visit().