Chromium Code Reviews| Index: src/ic.cc |
| diff --git a/src/ic.cc b/src/ic.cc |
| index 6abd52f2a16446967a00a182990dadba0f5cb283..1447e98839b3e53051af932779c3fa0fd352d8d6 100644 |
| --- a/src/ic.cc |
| +++ b/src/ic.cc |
| @@ -1668,7 +1668,7 @@ void StoreIC::UpdateCaches(LookupResult* lookup, |
| ASSERT(!lookup->IsHandler()); |
| Handle<Code> code = ComputeStoreMonomorphic( |
| - lookup, strict_mode, receiver, name); |
| + lookup, strict_mode, receiver, name, value); |
| if (code.is_null()) { |
| Handle<Code> stub = strict_mode == kStrictMode |
| ? generic_stub_strict() : generic_stub(); |
| @@ -1684,7 +1684,8 @@ void StoreIC::UpdateCaches(LookupResult* lookup, |
| Handle<Code> StoreIC::ComputeStoreMonomorphic(LookupResult* lookup, |
| StrictModeFlag strict_mode, |
| Handle<JSObject> receiver, |
| - Handle<String> name) { |
| + Handle<String> name, |
| + Handle<Object> value) { |
| Handle<JSObject> holder(lookup->holder()); |
| switch (lookup->type()) { |
| case FIELD: |
| @@ -1699,7 +1700,7 @@ Handle<Code> StoreIC::ComputeStoreMonomorphic(LookupResult* lookup, |
| Handle<PropertyCell> cell( |
| global->GetPropertyCell(lookup), isolate()); |
| return isolate()->stub_cache()->ComputeStoreGlobal( |
| - name, global, cell, strict_mode); |
| + name, global, cell, value, strict_mode); |
| } |
| ASSERT(holder.is_identical_to(receiver)); |
| return isolate()->stub_cache()->ComputeStoreNormal(strict_mode); |
| @@ -2093,7 +2094,8 @@ MaybeObject* KeyedStoreIC::Store(State state, |
| Handle<Code> KeyedStoreIC::ComputeStoreMonomorphic(LookupResult* lookup, |
| StrictModeFlag strict_mode, |
| Handle<JSObject> receiver, |
| - Handle<String> name) { |
| + Handle<String> name, |
| + Handle<Object> value) { |
|
rossberg
2013/06/25 10:47:38
Where is this parameter used?
danno
2013/06/28 13:56:05
In the non-Keyed case only. This is a virtual meth
|
| // If the property has a non-field type allowing map transitions |
| // where there is extra room in the object, we leave the IC in its |
| // current state. |
| @@ -2245,6 +2247,20 @@ RUNTIME_FUNCTION(MaybeObject*, StoreIC_Miss) { |
| } |
| +RUNTIME_FUNCTION(MaybeObject*, StoreIC_MissFromStubFailure) { |
| + HandleScope scope(isolate); |
| + ASSERT(args.length() == 3); |
| + StoreIC ic(IC::EXTRA_CALL_FRAME, isolate); |
| + IC::State state = IC::StateFrom(ic.target(), args[0], args[1]); |
| + Code::ExtraICState extra_ic_state = ic.target()->extra_ic_state(); |
| + return ic.Store(state, |
| + Code::GetStrictMode(extra_ic_state), |
| + args.at<Object>(0), |
| + args.at<String>(1), |
| + args.at<Object>(2)); |
| +} |
| + |
| + |
| RUNTIME_FUNCTION(MaybeObject*, StoreIC_ArrayLength) { |
| SealHandleScope shs(isolate); |