V8 Project
|
A class to uniformly access the prototype of any Object and walk its prototype chain. More...
#include <prototype.h>
Public Types | |
enum | WhereToStart { START_AT_RECEIVER , START_AT_PROTOTYPE } |
enum | WhereToEnd { END_AT_NULL , END_AT_NON_HIDDEN } |
Public Member Functions | |
PrototypeIterator (Isolate *isolate, Handle< Object > receiver, WhereToStart where_to_start=START_AT_PROTOTYPE) | |
PrototypeIterator (Isolate *isolate, Object *receiver, WhereToStart where_to_start=START_AT_PROTOTYPE) | |
PrototypeIterator (Map *receiver_map) | |
PrototypeIterator (Handle< Map > receiver_map) | |
~PrototypeIterator () | |
Object * | GetCurrent () const |
void | Advance () |
void | AdvanceIgnoringProxies () |
bool | IsAtEnd (WhereToEnd where_to_end=END_AT_NULL) const |
bool | IsAtEnd (Object *final_object) |
bool | IsAtEnd (Handle< Object > final_object) |
Static Public Member Functions | |
static Handle< Object > | GetCurrent (const PrototypeIterator &iterator) |
Private Member Functions | |
DISALLOW_COPY_AND_ASSIGN (PrototypeIterator) | |
Private Attributes | |
bool | did_jump_to_prototype_chain_ |
Object * | object_ |
Handle< Object > | handle_ |
Isolate * | isolate_ |
A class to uniformly access the prototype of any Object and walk its prototype chain.
The PrototypeIterator can either start at the prototype (default), or include the receiver itself. If a PrototypeIterator is constructed for a Map, it will always start at the prototype.
The PrototypeIterator can either run to the null_value(), the first non-hidden prototype, or a given object.
Definition at line 25 of file prototype.h.
|
inline |
Definition at line 31 of file prototype.h.
References Advance(), CHECK, handle_, and START_AT_PROTOTYPE.
|
inline |
Definition at line 42 of file prototype.h.
References Advance(), and START_AT_PROTOTYPE.
|
inlineexplicit |
Definition at line 51 of file prototype.h.
Definition at line 55 of file prototype.h.
|
inline |
Definition at line 60 of file prototype.h.
|
inline |
Definition at line 70 of file prototype.h.
References AdvanceIgnoringProxies(), did_jump_to_prototype_chain_, v8::internal::handle(), handle_, v8::internal::Isolate::heap(), isolate_, and object_.
Referenced by v8::internal::ArrayPrototypeHasNoElements(), v8::internal::HGraphBuilder::BuildCheckPrototypeMaps(), v8::internal::HOptimizedGraphBuilder::BuildMonomorphicElementAccess(), v8::internal::NamedStoreHandlerCompiler::CompileStoreTransition(), v8::Object::FindInstanceInPrototypeChain(), v8::internal::GetPrototypeSkipHiddenPrototypes(), v8::internal::Isolate::IsFastArrayConstructorPrototypeChainIntact(), PrototypeIterator(), v8::internal::RUNTIME_FUNCTION(), and v8::internal::JSObject::SetPrototype().
|
inline |
Definition at line 82 of file prototype.h.
References did_jump_to_prototype_chain_, v8::internal::Object::GetRootMap(), v8::internal::handle(), handle_, isolate_, and object_.
Referenced by Advance(), and v8::internal::RUNTIME_FUNCTION().
|
private |
|
inline |
Definition at line 62 of file prototype.h.
References DCHECK, handle_, and object_.
Referenced by v8::internal::ArrayPrototypeHasNoElements(), v8::internal::HGraphBuilder::BuildCheckPrototypeMaps(), v8::internal::HOptimizedGraphBuilder::BuildMonomorphicElementAccess(), v8::internal::BUILTIN(), v8::internal::CollectElementIndices(), v8::internal::NamedStoreHandlerCompiler::CompileStoreTransition(), v8::internal::DebugEvaluate(), v8::internal::JSObject::DefineAccessor(), v8::internal::JSObject::DeleteElement(), v8::internal::JSObject::DeleteHiddenProperty(), v8::internal::Deoptimizer::DeoptimizeGlobalObject(), v8::internal::V8HeapExplorer::ExtractJSObjectReferences(), v8::Object::FindInstanceInPrototypeChain(), v8::internal::JSObject::Freeze(), v8::internal::JSObject::GetAccessor(), v8::internal::JSObject::GetElementAttributeWithoutInterceptor(), v8::internal::JSObject::GetElementAttributeWithReceiver(), v8::internal::Runtime::GetElementOrCharAt(), v8::internal::JSObject::GetElementWithInterceptor(), v8::internal::Object::GetElementWithReceiver(), v8::internal::JSObject::GetHiddenProperty(), v8::internal::JSReceiver::GetKeys(), v8::internal::JSObject::GetOwnElementAccessorPair(), v8::Object::GetPrototype(), v8::internal::GetPrototypeSkipHiddenPrototypes(), v8::Object::GetRealNamedPropertyInPrototypeChain(), v8::internal::HasOwnPropertyImplementation(), v8::internal::JSObject::HasRealElementProperty(), v8::internal::JSGlobalProxy::IsDetachedFrom(), v8::internal::Isolate::IsFastArrayConstructorPrototypeChainIntact(), v8::internal::IsJSArrayFastElementMovingAllowed(), v8::internal::StoreIC::LookupForWrite(), v8::internal::JSObject::PreventExtensions(), v8::internal::RUNTIME_FUNCTION(), v8::internal::JSObject::SetAccessor(), v8::internal::JSObject::SetElement(), v8::internal::JSObject::SetElementWithCallbackSetterInPrototypes(), v8::internal::JSObject::SetHiddenProperty(), v8::internal::JSObject::SetPrototype(), and v8::internal::StoreToSuper().
|
inlinestatic |
Definition at line 66 of file prototype.h.
|
inline |
Definition at line 99 of file prototype.h.
References v8::internal::Handle< T >::cast(), did_jump_to_prototype_chain_, END_AT_NON_HIDDEN, handle_, and object_.
Referenced by v8::internal::ArrayPrototypeHasNoElements(), v8::internal::HGraphBuilder::BuildCheckPrototypeMaps(), v8::internal::HOptimizedGraphBuilder::BuildMonomorphicElementAccess(), v8::internal::CollectElementIndices(), v8::internal::NamedStoreHandlerCompiler::CompileStoreTransition(), v8::internal::DebugReferencedBy(), v8::internal::JSObject::DefineAccessor(), v8::internal::JSObject::DeleteElement(), v8::internal::JSObject::DeleteHiddenProperty(), v8::internal::Map::DictionaryElementsInPrototypeChainOnly(), v8::internal::FindHidden(), v8::Object::FindInstanceInPrototypeChain(), v8::internal::FindInstanceOf(), v8::internal::JSObject::Freeze(), v8::internal::JSObject::GetAccessor(), v8::internal::JSObject::GetElementAttributeWithoutInterceptor(), v8::internal::JSObject::GetElementAttributeWithReceiver(), v8::internal::JSObject::GetElementWithInterceptor(), v8::internal::Object::GetElementWithReceiver(), v8::internal::JSObject::GetHiddenProperty(), v8::internal::JSReceiver::GetKeys(), v8::internal::JSObject::GetOwnElementAccessorPair(), v8::internal::GetPrototypeSkipHiddenPrototypes(), v8::Object::GetRealNamedPropertyInPrototypeChain(), v8::internal::HasOwnPropertyImplementation(), v8::internal::JSObject::HasRealElementProperty(), v8::internal::Isolate::IsErrorObject(), v8::internal::Isolate::IsFastArrayConstructorPrototypeChainIntact(), v8::internal::JSReceiver::IsSimpleEnum(), v8::internal::OwnPrototypeChainLength(), v8::internal::JSObject::PreventExtensions(), v8::internal::RUNTIME_FUNCTION(), v8::internal::JSObject::SetAccessor(), v8::internal::JSObject::SetElement(), v8::internal::JSObject::SetElementWithCallbackSetterInPrototypes(), v8::internal::JSObject::SetHiddenProperty(), and v8::internal::JSObject::SetPrototype().
|
private |
Definition at line 122 of file prototype.h.
Referenced by Advance(), AdvanceIgnoringProxies(), and IsAtEnd().
Definition at line 124 of file prototype.h.
Referenced by Advance(), AdvanceIgnoringProxies(), GetCurrent(), IsAtEnd(), and PrototypeIterator().
|
private |
Definition at line 125 of file prototype.h.
Referenced by Advance(), and AdvanceIgnoringProxies().
|
private |
Definition at line 123 of file prototype.h.
Referenced by Advance(), AdvanceIgnoringProxies(), GetCurrent(), and IsAtEnd().