v8
3.25.30(node0.11.13)
V8 is Google's open source JavaScript engine
|
#include <ic.h>
Public Types | |
enum | UtilityId { kUtilityCount } |
enum | FrameDepth { NO_EXTRA_FRAME = 0, EXTRA_CALL_FRAME = 1 } |
typedef InlineCacheState | State |
Public Member Functions | |
IC (FrameDepth depth, Isolate *isolate) | |
virtual | ~IC () |
State | state () const |
Address | address () const |
void | UpdateState (Handle< Object > receiver, Handle< Object > name) |
void | MarkMonomorphicPrototypeFailure () |
Static Public Member Functions | |
static Address | AddressFromUtilityId (UtilityId id) |
static void | Clear (Isolate *isolate, Address address, ConstantPoolArray *constant_pool) |
static InlineCacheHolderFlag | GetCodeCacheForObject (Object *object) |
static HeapObject * | GetCodeCacheHolder (Isolate *isolate, Object *object, InlineCacheHolderFlag holder) |
static InlineCacheHolderFlag | GetCodeCacheFlag (HeapType *type) |
static Handle< Map > | GetCodeCacheHolder (InlineCacheHolderFlag flag, HeapType *type, Isolate *isolate) |
static bool | IsCleared (Code *code) |
static Handle< Map > | TypeToMap (HeapType *type, Isolate *isolate) |
template<class T > | |
static T::TypeHandle | MapToType (Handle< Map > map, typename T::Region *region) |
static Handle< HeapType > | CurrentTypeOf (Handle< Object > object, Isolate *isolate) |
Static Protected Member Functions | |
static Code * | GetTargetAtAddress (Address address, ConstantPoolArray *constant_pool) |
static void | SetTargetAtAddress (Address address, Code *target, ConstantPoolArray *constant_pool) |
static void | PostPatching (Address address, Code *target, Code *old_target) |
typedef InlineCacheState State |
enum FrameDepth |
IC | ( | FrameDepth | depth, |
Isolate * | isolate | ||
) |
Definition at line 122 of file ic.cc.
References Memory::Address_at(), StackFrameIterator::Advance(), ASSERT, Isolate::c_entry_fp(), ConstantPoolArray::cast(), IC::EXTRA_CALL_FRAME, IC::fp(), StackFrameIterator::frame(), v8::internal::handle(), ExitFrameConstants::kCallerFPOffset, StandardFrameConstants::kCallerFPOffset, ExitFrameConstants::kCallerPCOffset, StandardFrameConstants::kCallerPCOffset, ExitFrameConstants::kConstantPoolOffset, StandardFrameConstants::kConstantPoolOffset, v8::internal::NULL, and Isolate::thread_local_top().
|
inline |
Definition at line 41 of file ic-inl.h.
References v8::internal::code(), Code::instruction_start(), IC::isolate(), IC::pc(), Assembler::target_address_at(), and Assembler::target_address_from_return_address().
Referenced by IC::set_target(), BinaryOpIC::Transition(), and CompareIC::UpdateCaches().
|
static |
|
static |
Definition at line 429 of file ic.cc.
References CompareNilIC::Clear(), IC::GetTargetAtAddress(), Code::is_debug_stub(), Code::kind(), IC::target(), and UNREACHABLE.
|
inlineprotectedvirtual |
Reimplemented in StoreIC, and LoadIC.
Definition at line 200 of file ic.h.
References Handle< T >::null(), and UNREACHABLE.
Referenced by IC::ComputeHandler().
|
protected |
Definition at line 852 of file ic.cc.
References ASSERT, v8::internal::code(), IC::CompileHandler(), Code::FAST, StubCache::FindHandler(), IC::GetCodeCacheForObject(), IC::GetCodeCacheHolder(), v8::internal::handle(), Handle< T >::is_null(), IC::isolate(), IC::kind(), Code::NORMAL, Isolate::stub_cache(), and HeapObject::UpdateMapCodeCache().
Referenced by LoadIC::UpdateCaches(), and StoreIC::UpdateCaches().
Definition at line 727 of file ic.cc.
References List< T, P >::at(), v8::internal::name, IC::target(), and IC::UpdateMegamorphicCache().
Referenced by IC::PatchCache().
Definition at line 676 of file ic.cc.
References TypeImpl< class >::Constant(), and TypeImpl< class >::OfCurrently().
Referenced by LoadIC::CompileHandler(), LoadIC::UpdateCaches(), and StoreIC::UpdateCaches().
|
inlineprotected |
Definition at line 245 of file ic.h.
Referenced by LoadIC::contextual_mode(), StoreIC::generic_stub(), LoadIC::megamorphic_stub(), StoreIC::megamorphic_stub(), KeyedStoreIC::StoreElementStub(), StoreIC::strict_mode(), ToBooleanIC::ToBoolean(), BinaryOpIC::Transition(), IC::UpdateMonomorphicIC(), and IC::UpdatePolymorphicIC().
Reimplemented in StoreIC, and KeyedLoadIC.
Definition at line 236 of file ic.h.
References Handle< T >::null(), and UNREACHABLE.
Referenced by LoadIC::Load().
|
inlinestatic |
Definition at line 170 of file ic-inl.h.
References TypeImpl< class >::Is(), v8::internal::OWN_MAP, and v8::internal::PROTOTYPE_MAP.
|
inlinestatic |
Definition at line 150 of file ic-inl.h.
References ASSERT, v8::internal::OWN_MAP, and v8::internal::PROTOTYPE_MAP.
Referenced by IC::ComputeHandler().
|
inlinestatic |
Definition at line 160 of file ic-inl.h.
References HeapObject::cast(), v8::internal::OWN_MAP, and v8::internal::PROTOTYPE_MAP.
Referenced by LoadIC::CompileHandler(), IC::ComputeHandler(), and IC::TryRemoveInvalidPrototypeDependentStub().
|
inlinestatic |
Definition at line 181 of file ic-inl.h.
References ASSERT, JSObject::cast(), Isolate::context(), v8::internal::handle(), JSFunction::instance_prototype(), TypeImpl< class >::Is(), v8::internal::map, Context::native_context(), v8::internal::PROTOTYPE_MAP, and IC::TypeToMap().
|
inlinestaticprotected |
Definition at line 112 of file ic-inl.h.
References ASSERT, Code::GetCodeFromTargetAddress(), Code::is_inline_cache_stub(), and Assembler::target_address_at().
Referenced by IC::Clear(), and IC::SetTargetAtAddress().
|
inlineprotected |
Definition at line 174 of file ic.h.
Referenced by KeyedLoadIC::Load(), and KeyedStoreIC::Store().
|
inlinestatic |
Definition at line 133 of file ic.h.
References Code::ic_state(), v8::internal::PREMONOMORPHIC, IC::state(), and v8::internal::UNINITIALIZED.
Referenced by CompareNilIC::Clear(), and TEST().
|
inlineprotected |
Definition at line 157 of file ic.h.
Referenced by IC::address(), CompareNilIC::CompareNil(), LoadIC::CompileHandler(), StoreIC::CompileHandler(), IC::ComputeHandler(), KeyedLoadIC::generic_stub(), StoreIC::generic_stub(), LoadIC::Load(), KeyedLoadIC::Load(), KeyedLoadIC::LoadElementStub(), LoadIC::megamorphic_stub(), KeyedLoadIC::megamorphic_stub(), StoreIC::megamorphic_stub(), KeyedStoreIC::megamorphic_stub(), IC::PostPatching(), StoreIC::pre_monomorphic_stub(), KeyedStoreIC::pre_monomorphic_stub(), IC::ReferenceError(), LoadIC::slow_stub(), KeyedLoadIC::slow_stub(), StoreIC::slow_stub(), KeyedStoreIC::slow_stub(), StoreIC::Store(), KeyedStoreIC::Store(), KeyedStoreIC::StoreElementStub(), ToBooleanIC::ToBoolean(), BinaryOpIC::Transition(), IC::TryRemoveInvalidPrototypeDependentStub(), IC::TypeError(), LoadIC::UpdateCaches(), StoreIC::UpdateCaches(), CompareIC::UpdateCaches(), IC::UpdateMegamorphicCache(), IC::UpdateMonomorphicIC(), and IC::UpdatePolymorphicIC().
Definition at line 738 of file ic.cc.
References Map::elements_kind(), v8::internal::IsMoreGeneralElementsKindTransition(), Map::LookupElementsTransitionMap(), and v8::internal::NULL.
Referenced by KeyedStoreIC::StoreElementStub(), and IC::UpdatePolymorphicIC().
|
inlineprotectedvirtual |
Reimplemented in KeyedStoreIC, StoreIC, KeyedLoadIC, and LoadIC.
Definition at line 224 of file ic.h.
References v8::internal::STUB, and UNREACHABLE.
Referenced by IC::ComputeHandler(), IC::UpdateMonomorphicIC(), and IC::UpdatePolymorphicIC().
|
static |
Definition at line 696 of file ic.cc.
References v8::internal::HEAP_NUMBER_TYPE, and v8::internal::ODDBALL_TYPE.
|
inline |
Definition at line 99 of file ic.h.
References v8::internal::MONOMORPHIC_PROTOTYPE_FAILURE.
Referenced by IC::UpdateState().
Reimplemented in KeyedStoreIC, StoreIC, KeyedLoadIC, and LoadIC.
Definition at line 232 of file ic.h.
References Handle< T >::null(), and UNREACHABLE.
Referenced by IC::PatchCache().
Definition at line 753 of file ic.cc.
References IC::CopyICToMegamorphicCache(), v8::internal::DEBUG_STUB, v8::internal::GENERIC, v8::internal::MEGAMORPHIC, IC::megamorphic_stub(), v8::internal::MONOMORPHIC, v8::internal::MONOMORPHIC_PROTOTYPE_FAILURE, v8::internal::POLYMORPHIC, v8::internal::PREMONOMORPHIC, IC::set_target(), IC::state(), IC::target(), v8::internal::UNINITIALIZED, UNREACHABLE, IC::UpdateMegamorphicCache(), IC::UpdateMonomorphicIC(), and IC::UpdatePolymorphicIC().
Referenced by LoadIC::UpdateCaches(), and StoreIC::UpdateCaches().
|
inlineprotected |
Definition at line 156 of file ic.h.
Referenced by IC::address().
Definition at line 398 of file ic.cc.
References TypeFeedbackInfo::cast(), TypeFeedbackInfo::change_ic_with_type_info_count(), TypeFeedbackInfo::change_own_type_change_checksum(), HeapObject::GetHeap(), Code::ic_state(), v8::internal::info, Code::is_inline_cache_stub(), IC::isolate(), Heap::isolate(), Code::kind(), RuntimeProfiler::NotifyICChanged(), Isolate::runtime_profiler(), Code::set_profiler_ticks(), and Code::type_feedback_info().
Referenced by IC::SetTargetAtAddress().
Definition at line 380 of file ic.cc.
References Isolate::factory(), v8::internal::HandleVector(), IC::isolate(), Factory::NewReferenceError(), and Isolate::Throw().
Referenced by LoadIC::Load(), and StoreIC::Store().
|
inlineprotected |
Definition at line 246 of file ic.h.
References IC::state().
|
inlineprotected |
Definition at line 169 of file ic.h.
References IC::address(), and IC::SetTargetAtAddress().
Referenced by CompareNilIC::CompareNil(), IC::PatchCache(), LoadIC::set_target(), ToBooleanIC::ToBoolean(), BinaryOpIC::Transition(), CompareIC::UpdateCaches(), IC::UpdateMonomorphicIC(), and IC::UpdatePolymorphicIC().
|
inlinestaticprotected |
Definition at line 124 of file ic-inl.h.
References ASSERT, Code::extra_ic_state(), HeapObject::GetHeap(), StoreIC::GetStrictMode(), IC::GetTargetAtAddress(), Code::instruction_start(), Code::is_compare_ic_stub(), Code::is_inline_cache_stub(), Code::kind(), Heap::MARK_COMPACT, IC::PostPatching(), and Assembler::set_target_address_at().
Referenced by CompareNilIC::Clear(), and IC::set_target().
Reimplemented in KeyedStoreIC, StoreIC, KeyedLoadIC, and LoadIC.
Definition at line 228 of file ic.h.
References Handle< T >::null(), and UNREACHABLE.
|
inline |
Definition at line 94 of file ic.h.
Referenced by IC::IsCleared(), LoadIC::Load(), KeyedLoadIC::Load(), KeyedLoadIC::LoadElementStub(), IC::PatchCache(), IC::set_extra_ic_state(), StoreIC::Store(), KeyedStoreIC::StoreElementStub(), BinaryOpIC::Transition(), LoadIC::UpdateCaches(), and IC::UpdateState().
Definition at line 153 of file ic.h.
Referenced by IC::Clear(), CompareNilIC::CompareNil(), IC::CopyICToMegamorphicCache(), KeyedLoadIC::KeyedLoadIC(), KeyedStoreIC::KeyedStoreIC(), KeyedLoadIC::Load(), KeyedLoadIC::LoadElementStub(), IC::PatchCache(), LoadIC::set_target(), KeyedStoreIC::Store(), KeyedStoreIC::StoreElementStub(), ToBooleanIC::ToBoolean(), BinaryOpIC::Transition(), IC::TryRemoveInvalidHandlers(), IC::TryRemoveInvalidPrototypeDependentStub(), CompareIC::UpdateCaches(), and IC::UpdatePolymorphicIC().
Definition at line 325 of file ic.cc.
References List< T, P >::at(), and IC::target().
Referenced by IC::TryRemoveInvalidPrototypeDependentStub(), and IC::UpdateState().
|
protected |
Definition at line 249 of file ic.cc.
References GlobalObject::cast(), Map::elements_kind(), Code::ExtractCacheHolderFromFlags(), v8::internal::flags, IC::GetCodeCacheHolder(), GlobalObject::GetPropertyCell(), Object::GetPrototype(), Map::is_deprecated(), TypeImpl< class >::IsConstant(), v8::internal::IsMoreGeneralElementsKindTransition(), IC::isolate(), JSObject::LocalLookupRealNamedProperty(), v8::internal::map, v8::internal::NULL, v8::internal::OWN_MAP, v8::internal::PROTOTYPE_MAP, IC::target(), IC::TryRemoveInvalidHandlers(), and PropertyCell::type().
Referenced by IC::UpdateState().
Definition at line 369 of file ic.cc.
References Isolate::factory(), v8::internal::HandleVector(), IC::isolate(), Factory::NewTypeError(), and Isolate::Throw().
Referenced by LoadIC::Load(), and StoreIC::Store().
Definition at line 683 of file ic.cc.
References TypeImpl< class >::AsClass(), TypeImpl< class >::AsConstant(), ASSERT, Isolate::factory(), v8::internal::handle(), TypeImpl< class >::Is(), TypeImpl< class >::IsClass(), TypeImpl< class >::IsConstant(), and v8::internal::map.
Referenced by IC::GetCodeCacheHolder(), and IC::UpdateMegamorphicCache().
Reimplemented in KeyedStoreIC, and KeyedLoadIC.
Definition at line 844 of file ic.cc.
References IC::isolate(), v8::internal::map, StubCache::Set(), Isolate::stub_cache(), and IC::TypeToMap().
Referenced by IC::CopyICToMegamorphicCache(), and IC::PatchCache().
|
protected |
Definition at line 717 of file ic.cc.
References StubCache::ComputeMonomorphicIC(), IC::extra_ic_state(), IC::isolate(), IC::kind(), IC::set_target(), and Isolate::stub_cache().
Referenced by IC::PatchCache().
|
protected |
Definition at line 620 of file ic.cc.
References List< T, P >::Add(), List< T, P >::at(), StubCache::ComputePolymorphicIC(), IC::extra_ic_state(), IC::isolate(), IC::IsTransitionOfMonomorphicTarget(), IC::kind(), List< T, P >::Set(), IC::set_target(), Isolate::stub_cache(), and IC::target().
Referenced by IC::PatchCache().
Definition at line 339 of file ic.cc.
References v8::internal::handle(), Value::IsNull(), Value::IsString(), Value::IsUndefined(), v8::internal::map, IC::MarkMonomorphicPrototypeFailure(), v8::internal::MONOMORPHIC, v8::internal::POLYMORPHIC, IC::state(), IC::TryRemoveInvalidHandlers(), IC::TryRemoveInvalidPrototypeDependentStub(), and v8::internal::UNINITIALIZED.
|
inlineprotected |
Definition at line 251 of file ic.h.
References v8::internal::handle().
Referenced by BinaryOpIC::Transition().