| Index: src/ic.cc
|
| diff --git a/src/ic.cc b/src/ic.cc
|
| index 8c1df539106ee510f6501a30374a2866d8a9a3bd..02f2f0f33ba0bfd32bafe0fcbf33a4fa86b6e314 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) {
|
| // 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);
|
|
|
|
|