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

Unified Diff: src/ic.h

Issue 14142005: Implement Polymorphic Store ICs (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 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/ia32/stub-cache-ia32.cc ('k') | src/ic.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/ic.h
diff --git a/src/ic.h b/src/ic.h
index 61bf848ee63a5a5bd8db1aa17b465f58edf7e7a4..aa867cc23bd0977efcc9304e7ca046c1d14049f6 100644
--- a/src/ic.h
+++ b/src/ic.h
@@ -169,14 +169,25 @@ class IC {
virtual void UpdateMonomorphicIC(Handle<JSObject> receiver,
Handle<Code> handler,
- Handle<String> name) {
+ Handle<String> name,
+ StrictModeFlag strict_mode) {
set_target(*handler);
}
bool UpdatePolymorphicIC(State state,
- StrictModeFlag strict_mode,
Handle<JSObject> receiver,
Handle<String> name,
- Handle<Code> code);
+ Handle<Code> code,
+ StrictModeFlag strict_mode);
+
+ virtual Handle<Code> ComputePolymorphicIC(MapHandleList* receiver_maps,
+ CodeHandleList* handlers,
+ int number_of_valid_maps,
+ Handle<Name> name,
+ StrictModeFlag strict_mode) {
+ UNREACHABLE();
+ return Handle<Code>::null();
+ };
+
void CopyICToMegamorphicCache(Handle<String> name);
bool IsTransitionedMapOfMonomorphicTarget(Map* receiver_map);
void PatchCache(State state,
@@ -391,9 +402,18 @@ class LoadIC: public IC {
State state,
Handle<Object> object,
Handle<String> name);
+
virtual void UpdateMonomorphicIC(Handle<JSObject> receiver,
Handle<Code> handler,
- Handle<String> name);
+ Handle<String> name,
+ StrictModeFlag strict_mode);
+
+ virtual Handle<Code> ComputePolymorphicIC(MapHandleList* receiver_maps,
+ CodeHandleList* handlers,
+ int number_of_valid_maps,
+ Handle<Name> name,
+ StrictModeFlag strict_mode);
+
virtual Handle<Code> ComputeLoadHandler(LookupResult* lookup,
Handle<JSObject> receiver,
Handle<String> name);
@@ -467,7 +487,8 @@ class KeyedLoadIC: public LoadIC {
// Update the inline cache.
virtual void UpdateMonomorphicIC(Handle<JSObject> receiver,
Handle<Code> handler,
- Handle<String> name);
+ Handle<String> name,
+ StrictModeFlag strict_mode);
virtual Handle<Code> ComputeLoadHandler(LookupResult* lookup,
Handle<JSObject> receiver,
Handle<String> name);
@@ -544,6 +565,16 @@ class StoreIC: public IC {
return isolate()->builtins()->StoreIC_GlobalProxy_Strict();
}
+ virtual void UpdateMonomorphicIC(Handle<JSObject> receiver,
+ Handle<Code> handler,
+ Handle<String> name,
+ StrictModeFlag strict_mode);
+
+ virtual Handle<Code> ComputePolymorphicIC(MapHandleList* receiver_maps,
+ CodeHandleList* handlers,
+ int number_of_valid_maps,
+ Handle<Name> name,
+ StrictModeFlag strict_mode);
// Update the inline cache and the global stub cache based on the
// lookup result.
@@ -642,6 +673,11 @@ class KeyedStoreIC: public StoreIC {
KeyedAccessStoreMode store_mode,
StrictModeFlag strict_mode);
+ virtual void UpdateMonomorphicIC(Handle<JSObject> receiver,
+ Handle<Code> handler,
+ Handle<String> name,
+ StrictModeFlag strict_mode);
+
private:
void set_target(Code* code) {
// Strict mode must be preserved across IC patching.
« no previous file with comments | « src/ia32/stub-cache-ia32.cc ('k') | src/ic.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698