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

Unified Diff: src/ic.h

Issue 12340112: Polymorphism support for load IC. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 10 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
Index: src/ic.h
diff --git a/src/ic.h b/src/ic.h
index cbc3ce14dec658d165969090f8b7980337dacb73..1b4224f12080d32367d2f97170398f2c59cd3699 100644
--- a/src/ic.h
+++ b/src/ic.h
@@ -165,6 +165,16 @@ class IC {
static inline void SetTargetAtAddress(Address address, Code* target);
static void PostPatching(Address address, Code* target, Code* old_target);
+ virtual void UpdateMonomorphicIC(Handle<JSObject> receiver,
+ Handle<Code> handler,
+ Handle<String> name) {
Jakob Kummerow 2013/03/01 22:21:04 I find it slightly less than ideal that we have a
+ set_target(*handler);
+ }
+ bool UpdatePolymorphicIC(State state,
+ StrictModeFlag strict_mode,
+ Handle<JSObject> receiver,
+ Handle<String> name,
+ Handle<Code> code);
void PatchCache(State state,
StrictModeFlag strict_mode,
Handle<JSObject> receiver,
@@ -377,9 +387,12 @@ class LoadIC: public IC {
State state,
Handle<Object> object,
Handle<String> name);
- virtual Handle<Code> ComputeLoadMonomorphic(LookupResult* lookup,
- Handle<JSObject> receiver,
- Handle<String> name);
+ virtual void UpdateMonomorphicIC(Handle<JSObject> receiver,
+ Handle<Code> handler,
+ Handle<String> name);
+ virtual Handle<Code> ComputeLoadHandler(LookupResult* lookup,
+ Handle<JSObject> receiver,
+ Handle<String> name);
private:
// Stub accessors.
@@ -448,9 +461,12 @@ class KeyedLoadIC: public LoadIC {
}
// Update the inline cache.
- virtual Handle<Code> ComputeLoadMonomorphic(LookupResult* lookup,
- Handle<JSObject> receiver,
- Handle<String> name);
+ virtual void UpdateMonomorphicIC(Handle<JSObject> receiver,
+ Handle<Code> handler,
+ Handle<String> name);
+ virtual Handle<Code> ComputeLoadHandler(LookupResult* lookup,
+ Handle<JSObject> receiver,
+ Handle<String> name);
virtual void UpdateMegamorphicCache(Map* map, String* name, Code* code) { }
private:

Powered by Google App Engine
This is Rietveld 408576698