Index: src/ic.h |
diff --git a/src/ic.h b/src/ic.h |
index 96838c7338a20878279172f24b9fef58486e7287..4b75746f735fbe144e9965323b6c952c005162f7 100644 |
--- a/src/ic.h |
+++ b/src/ic.h |
@@ -398,16 +398,10 @@ class KeyedLoadIC: public IC { |
class StoreIC: public IC { |
public: |
- |
- enum StoreICStrictMode { |
- kStoreICNonStrict = kNonStrictMode, |
- kStoreICStrict = kStrictMode |
- }; |
- |
StoreIC() : IC(NO_EXTRA_FRAME) { ASSERT(target()->is_store_stub()); } |
MUST_USE_RESULT MaybeObject* Store(State state, |
- Code::ExtraICState extra_ic_state, |
+ StrictModeFlag strict_mode, |
Handle<Object> object, |
Handle<String> name, |
Handle<Object> value); |
@@ -416,10 +410,10 @@ class StoreIC: public IC { |
static void GenerateInitialize(MacroAssembler* masm) { GenerateMiss(masm); } |
static void GenerateMiss(MacroAssembler* masm); |
static void GenerateMegamorphic(MacroAssembler* masm, |
- Code::ExtraICState extra_ic_state); |
+ StrictModeFlag strict_mode); |
static void GenerateArrayLength(MacroAssembler* masm); |
static void GenerateNormal(MacroAssembler* masm); |
- static void GenerateGlobalProxy(MacroAssembler* masm); |
+ static void GenerateGlobalProxy(MacroAssembler* masm, StrictModeFlag strict); |
// Clear the use of an inlined version. |
static void ClearInlinedVersion(Address address); |
@@ -433,11 +427,16 @@ class StoreIC: public IC { |
// lookup result. |
void UpdateCaches(LookupResult* lookup, |
State state, |
- Code::ExtraICState extra_ic_state, |
+ StrictModeFlag strict_mode, |
Handle<JSObject> receiver, |
Handle<String> name, |
Handle<Object> value); |
+ void set_target(Code* code) { |
+ ASSERT(code->extra_ic_state() == target()->extra_ic_state()); |
+ IC::set_target(code); |
+ } |
+ |
// Stub accessors. |
static Code* megamorphic_stub() { |
return Builtins::builtin(Builtins::StoreIC_Megamorphic); |
@@ -473,6 +472,7 @@ class KeyedStoreIC: public IC { |
KeyedStoreIC() : IC(NO_EXTRA_FRAME) { } |
MUST_USE_RESULT MaybeObject* Store(State state, |
+ StrictModeFlag strict_mode, |
Handle<Object> object, |
Handle<Object> name, |
Handle<Object> value); |
@@ -480,8 +480,9 @@ class KeyedStoreIC: public IC { |
// Code generators for stub routines. Only called once at startup. |
static void GenerateInitialize(MacroAssembler* masm) { GenerateMiss(masm); } |
static void GenerateMiss(MacroAssembler* masm); |
- static void GenerateRuntimeSetProperty(MacroAssembler* masm); |
- static void GenerateGeneric(MacroAssembler* masm); |
+ static void GenerateRuntimeSetProperty(MacroAssembler* masm, |
+ StrictModeFlag strict_mode); |
+ static void GenerateGeneric(MacroAssembler* masm, StrictModeFlag strict_mode); |
// Clear the inlined version so the IC is always hit. |
static void ClearInlinedVersion(Address address); |
@@ -493,20 +494,35 @@ class KeyedStoreIC: public IC { |
// Update the inline cache. |
void UpdateCaches(LookupResult* lookup, |
State state, |
+ StrictModeFlag strict_mode, |
Handle<JSObject> receiver, |
Handle<String> name, |
Handle<Object> value); |
+ void set_target(Code* code) { |
+ ASSERT(code->extra_ic_state() == target()->extra_ic_state()); |
+ IC::set_target(code); |
+ } |
+ |
// Stub accessors. |
static Code* initialize_stub() { |
return Builtins::builtin(Builtins::KeyedStoreIC_Initialize); |
} |
+ static Code* initialize_stub_strict() { |
+ return Builtins::builtin(Builtins::KeyedStoreIC_Initialize_Strict); |
+ } |
static Code* megamorphic_stub() { |
return Builtins::builtin(Builtins::KeyedStoreIC_Generic); |
} |
+ static Code* megamorphic_stub_strict() { |
+ return Builtins::builtin(Builtins::KeyedStoreIC_Generic_Strict); |
+ } |
static Code* generic_stub() { |
return Builtins::builtin(Builtins::KeyedStoreIC_Generic); |
} |
+ static Code* generic_stub_strict() { |
+ return Builtins::builtin(Builtins::KeyedStoreIC_Generic_Strict); |
+ } |
static void Clear(Address address, Code* target); |