Index: src/ic.h |
diff --git a/src/ic.h b/src/ic.h |
index 3ffe4e06186f39783c586c2a30c105f0a8bee71e..ea452a3cc2197dedac3e03ba21a209c51b2cadb7 100644 |
--- a/src/ic.h |
+++ b/src/ic.h |
@@ -165,6 +165,21 @@ class IC { |
static inline void SetTargetAtAddress(Address address, Code* target); |
static void PostPatching(Address address, Code* target, Code* old_target); |
+ void PatchCache(State state, |
+ StrictModeFlag strict_mode, |
+ Handle<JSObject> receiver, |
+ Handle<String> name, |
+ Handle<Code> code); |
+ virtual void UpdateMegamorphicCache(Map* map, String* name, Code* code); |
+ virtual Handle<Code> megamorphic_stub() { |
+ UNREACHABLE(); |
+ return Handle<Code>::null(); |
+ } |
+ virtual Handle<Code> megamorphic_stub_strict() { |
+ UNREACHABLE(); |
+ return Handle<Code>::null(); |
+ } |
+ |
private: |
// Frame pointer for the frame that uses (calls) the IC. |
Address fp_; |
@@ -361,7 +376,6 @@ class LoadIC: public IC { |
virtual Handle<Code> ComputeLoadMonomorphic(LookupResult* lookup, |
Handle<JSObject> receiver, |
Handle<String> name); |
- virtual void UpdateMegamorphicCache(Map* map, String* name, Code* code); |
private: |
// Stub accessors. |
@@ -502,12 +516,19 @@ class StoreIC: public IC { |
// Update the inline cache and the global stub cache based on the |
// lookup result. |
- virtual void UpdateStoreCaches(LookupResult* lookup, |
- State state, |
- StrictModeFlag strict_mode, |
- Handle<JSObject> receiver, |
- Handle<String> name, |
- Handle<Object> value); |
+ void UpdateCaches(LookupResult* lookup, |
+ State state, |
+ StrictModeFlag strict_mode, |
+ Handle<JSObject> receiver, |
+ Handle<String> name, |
+ Handle<Object> value); |
+ // Compute the code stub for this store; used for rewriting to |
+ // monomorphic state and making sure that the code stub is in the |
+ // stub cache. |
+ virtual Handle<Code> ComputeStoreMonomorphic(LookupResult* lookup, |
+ StrictModeFlag strict_mode, |
+ Handle<JSObject> receiver, |
+ Handle<String> name); |
private: |
void set_target(Code* code) { |
@@ -607,13 +628,11 @@ class KeyedStoreIC: public StoreIC { |
protected: |
virtual Code::Kind kind() const { return Code::KEYED_STORE_IC; } |
- // Update the inline cache. |
- virtual void UpdateStoreCaches(LookupResult* lookup, |
- State state, |
- StrictModeFlag strict_mode, |
- Handle<JSObject> receiver, |
- Handle<String> name, |
- Handle<Object> value); |
+ virtual Handle<Code> ComputeStoreMonomorphic(LookupResult* lookup, |
+ StrictModeFlag strict_mode, |
+ Handle<JSObject> receiver, |
+ Handle<String> name); |
+ virtual void UpdateMegamorphicCache(Map* map, String* name, Code* code) { } |
virtual Handle<Code> megamorphic_stub() { |
return isolate()->builtins()->KeyedStoreIC_Generic(); |