Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(239)

Unified Diff: src/stub-cache.h

Issue 400523007: Cache IC handlers on the prototype's map if possible (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: addressed comment Created 6 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/property.h ('k') | src/stub-cache.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/stub-cache.h
diff --git a/src/stub-cache.h b/src/stub-cache.h
index 8c863e1bd895eb8e46c4896336393483248f40fa..e9ef7d5e7b67b0f17de24fd2efe4fb27a20b49a2 100644
--- a/src/stub-cache.h
+++ b/src/stub-cache.h
@@ -57,17 +57,13 @@ class StubCache {
Handle<JSObject> StubHolder(Handle<JSObject> receiver,
Handle<JSObject> holder);
- Handle<Code> FindIC(Handle<Name> name,
- Handle<Map> stub_holder_map,
+ Handle<Code> FindIC(Handle<Name> name, Handle<Map> stub_holder_map,
Code::Kind kind,
ExtraICState extra_state = kNoExtraICState,
- InlineCacheHolderFlag cache_holder = OWN_MAP);
+ CacheHolderFlag cache_holder = kCacheOnReceiver);
- Handle<Code> FindHandler(Handle<Name> name,
- Handle<Map> map,
- Code::Kind kind,
- InlineCacheHolderFlag cache_holder,
- Code::StubType type);
+ Handle<Code> FindHandler(Handle<Name> name, Handle<Map> map, Code::Kind kind,
+ CacheHolderFlag cache_holder, Code::StubType type);
Handle<Code> ComputeMonomorphicIC(Code::Kind kind,
Handle<Name> name,
@@ -114,6 +110,8 @@ class StubCache {
// Update cache for entry hash(name, map).
Code* Set(Name* name, Map* map, Code* code);
+ Code* Get(Name* name, Map* map, Code::Flags flags);
+
// Clear the lookup table (@ mark compact collection).
void Clear();
@@ -414,10 +412,9 @@ enum FrontendCheckType { PERFORM_INITIAL_CHECKS, SKIP_INITIAL_CHECKS };
class BaseLoadStoreStubCompiler: public StubCompiler {
public:
- BaseLoadStoreStubCompiler(Isolate* isolate,
- Code::Kind kind,
+ BaseLoadStoreStubCompiler(Isolate* isolate, Code::Kind kind,
ExtraICState extra_ic_state = kNoExtraICState,
- InlineCacheHolderFlag cache_holder = OWN_MAP)
+ CacheHolderFlag cache_holder = kCacheOnReceiver)
: StubCompiler(isolate, extra_ic_state),
kind_(kind),
cache_holder_(cache_holder) {
@@ -498,7 +495,7 @@ class BaseLoadStoreStubCompiler: public StubCompiler {
bool IncludesNumberType(TypeHandleList* types);
Code::Kind kind_;
- InlineCacheHolderFlag cache_holder_;
+ CacheHolderFlag cache_holder_;
Register* registers_;
};
@@ -507,10 +504,10 @@ class LoadStubCompiler: public BaseLoadStoreStubCompiler {
public:
LoadStubCompiler(Isolate* isolate,
ExtraICState extra_ic_state = kNoExtraICState,
- InlineCacheHolderFlag cache_holder = OWN_MAP,
+ CacheHolderFlag cache_holder = kCacheOnReceiver,
Code::Kind kind = Code::LOAD_IC)
- : BaseLoadStoreStubCompiler(isolate, kind, extra_ic_state,
- cache_holder) { }
+ : BaseLoadStoreStubCompiler(isolate, kind, extra_ic_state, cache_holder) {
+ }
virtual ~LoadStubCompiler() { }
Handle<Code> CompileLoadField(Handle<HeapType> type,
@@ -615,9 +612,9 @@ class KeyedLoadStubCompiler: public LoadStubCompiler {
public:
KeyedLoadStubCompiler(Isolate* isolate,
ExtraICState extra_ic_state = kNoExtraICState,
- InlineCacheHolderFlag cache_holder = OWN_MAP)
+ CacheHolderFlag cache_holder = kCacheOnReceiver)
: LoadStubCompiler(isolate, extra_ic_state, cache_holder,
- Code::KEYED_LOAD_IC) { }
+ Code::KEYED_LOAD_IC) {}
Handle<Code> CompileLoadElement(Handle<Map> receiver_map);
« no previous file with comments | « src/property.h ('k') | src/stub-cache.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698