V8 Project
|
#include <stub-cache.h>
Classes | |
struct | Entry |
Public Types | |
enum | Table { kPrimary , kSecondary } |
Public Member Functions | |
void | Initialize () |
Code * | Set (Name *name, Map *map, Code *code) |
Code * | Get (Name *name, Map *map, Code::Flags flags) |
void | Clear () |
void | CollectMatchingMaps (SmallMapList *types, Handle< Name > name, Code::Flags flags, Handle< Context > native_context, Zone *zone) |
void | GenerateProbe (MacroAssembler *masm, Code::Flags flags, bool leave_frame, Register receiver, Register name, Register scratch, Register extra, Register extra2=no_reg, Register extra3=no_reg) |
SCTableReference | key_reference (StubCache::Table table) |
SCTableReference | map_reference (StubCache::Table table) |
SCTableReference | value_reference (StubCache::Table table) |
StubCache::Entry * | first_entry (StubCache::Table table) |
Isolate * | isolate () |
Static Public Attributes | |
static const int | kCacheIndexShift = Name::kHashShift |
Private Member Functions | |
StubCache (Isolate *isolate) | |
DISALLOW_COPY_AND_ASSIGN (StubCache) | |
Static Private Member Functions | |
static int | PrimaryOffset (Name *name, Code::Flags flags, Map *map) |
static int | SecondaryOffset (Name *name, Code::Flags flags, int seed) |
static Entry * | entry (Entry *table, int offset) |
Private Attributes | |
Entry | primary_ [kPrimaryTableSize] |
Entry | secondary_ [kSecondaryTableSize] |
Isolate * | isolate_ |
Static Private Attributes | |
static const int | kPrimaryTableBits = 11 |
static const int | kPrimaryTableSize = (1 << kPrimaryTableBits) |
static const int | kSecondaryTableBits = 9 |
static const int | kSecondaryTableSize = (1 << kSecondaryTableBits) |
Friends | |
class | Isolate |
class | SCTableReference |
Definition at line 33 of file stub-cache.h.
|
explicitprivate |
Definition at line 15 of file stub-cache.cc.
void v8::internal::StubCache::Clear | ( | ) |
Definition at line 93 of file stub-cache.cc.
References v8::internal::Builtins::builtin(), v8::internal::Isolate::builtins(), v8::internal::Isolate::heap(), isolate(), isolate_, v8::internal::StubCache::Entry::key, kPrimaryTableSize, kSecondaryTableSize, v8::internal::StubCache::Entry::map, NULL, primary_, secondary_, and v8::internal::StubCache::Entry::value.
Referenced by v8::internal::MarkCompactCollector::Finish(), and Initialize().
void v8::internal::StubCache::CollectMatchingMaps | ( | SmallMapList * | types, |
Handle< Name > | name, | ||
Code::Flags | flags, | ||
Handle< Context > | native_context, | ||
Zone * | zone | ||
) |
Definition at line 108 of file stub-cache.cc.
References v8::internal::TypeFeedbackOracle::CanRetainOtherContext(), entry(), v8::internal::anonymous_namespace{flags.cc}::flags, kPrimaryTableSize, kSecondaryTableSize, map, v8::internal::StubCache::Entry::map, name, NULL, primary_, PrimaryOffset(), secondary_, and SecondaryOffset().
Referenced by v8::internal::TypeFeedbackOracle::CollectReceiverTypes().
|
private |
Definition at line 147 of file stub-cache.h.
References v8::internal::Name::kHashShift.
Referenced by CollectMatchingMaps(), Get(), and Set().
|
inline |
Definition at line 77 of file stub-cache.h.
References kPrimary, kSecondary, NULL, primary_, secondary_, and UNREACHABLE.
Referenced by key_reference(), map_reference(), and value_reference().
void v8::internal::StubCache::GenerateProbe | ( | MacroAssembler * | masm, |
Code::Flags | flags, | ||
bool | leave_frame, | ||
Register | receiver, | ||
Register | name, | ||
Register | scratch, | ||
Register | extra, | ||
Register | extra2 = no_reg , |
||
Register | extra3 = no_reg |
||
) |
Code * v8::internal::StubCache::Get | ( | Name * | name, |
Map * | map, | ||
Code::Flags | flags | ||
) |
Definition at line 77 of file stub-cache.cc.
References v8::internal::CommonStubCacheChecks(), entry(), v8::internal::anonymous_namespace{flags.cc}::flags, v8::internal::StubCache::Entry::key, map, v8::internal::StubCache::Entry::map, name, NULL, primary_, PrimaryOffset(), secondary_, SecondaryOffset(), and v8::internal::StubCache::Entry::value.
Referenced by v8::internal::IC::ComputeHandler().
void v8::internal::StubCache::Initialize | ( | ) |
Definition at line 18 of file stub-cache.cc.
References Clear(), DCHECK, v8::base::bits::IsPowerOfTwo32(), kPrimaryTableSize, and kSecondaryTableSize.
Referenced by v8::internal::Isolate::Init().
|
inline |
|
inline |
Definition at line 62 of file stub-cache.h.
References first_entry(), and SCTableReference.
|
inline |
Definition at line 67 of file stub-cache.h.
References first_entry(), map, and SCTableReference.
|
inlinestaticprivate |
Definition at line 108 of file stub-cache.h.
References DCHECK, v8::internal::anonymous_namespace{flags.cc}::flags, kCacheIndexShift, v8::internal::Code::kFlagsNotUsedInLookup, v8::internal::Name::kHashShift, kPrimaryTableSize, map, name, and v8::internal::STATIC_ASSERT().
Referenced by CollectMatchingMaps(), Get(), and Set().
|
inlinestaticprivate |
Definition at line 130 of file stub-cache.h.
References v8::internal::anonymous_namespace{flags.cc}::flags, kCacheIndexShift, v8::internal::Code::kFlagsNotUsedInLookup, kSecondaryTableSize, and name.
Referenced by CollectMatchingMaps(), Get(), and Set().
Definition at line 48 of file stub-cache.cc.
References v8::internal::Builtins::builtin(), v8::internal::Isolate::builtins(), v8::internal::CommonStubCacheChecks(), v8::internal::Isolate::counters(), entry(), v8::internal::Code::flags(), v8::internal::anonymous_namespace{flags.cc}::flags, isolate(), isolate_, v8::internal::StubCache::Entry::key, map, v8::internal::StubCache::Entry::map, name, primary_, PrimaryOffset(), v8::internal::Code::RemoveTypeAndHolderFromFlags(), secondary_, SecondaryOffset(), and v8::internal::StubCache::Entry::value.
Referenced by v8::internal::IC::UpdateMegamorphicCache().
|
inline |
Definition at line 72 of file stub-cache.h.
References first_entry(), and SCTableReference.
|
friend |
Definition at line 163 of file stub-cache.h.
|
friend |
Definition at line 164 of file stub-cache.h.
Referenced by key_reference(), map_reference(), and value_reference().
|
private |
Definition at line 161 of file stub-cache.h.
|
static |
Definition at line 93 of file stub-cache.h.
Referenced by PrimaryOffset(), and SecondaryOffset().
|
staticprivate |
Definition at line 153 of file stub-cache.h.
|
staticprivate |
Definition at line 154 of file stub-cache.h.
Referenced by Clear(), CollectMatchingMaps(), Initialize(), and PrimaryOffset().
|
staticprivate |
Definition at line 155 of file stub-cache.h.
|
staticprivate |
Definition at line 156 of file stub-cache.h.
Referenced by Clear(), CollectMatchingMaps(), Initialize(), and SecondaryOffset().
|
private |
Definition at line 159 of file stub-cache.h.
Referenced by Clear(), CollectMatchingMaps(), first_entry(), Get(), and Set().
|
private |
Definition at line 160 of file stub-cache.h.
Referenced by Clear(), CollectMatchingMaps(), first_entry(), Get(), and Set().