| Index: src/arm/stub-cache-arm.cc
|
| diff --git a/src/arm/stub-cache-arm.cc b/src/arm/stub-cache-arm.cc
|
| index 3350c56c163762f4464dabd0e153685116b6e973..dbef0101bd0b9671f9e1a31a933d537eaed1081f 100644
|
| --- a/src/arm/stub-cache-arm.cc
|
| +++ b/src/arm/stub-cache-arm.cc
|
| @@ -423,7 +423,7 @@ void StubCompiler::GenerateLoadFunctionPrototype(MacroAssembler* masm,
|
| // registers have their original values.
|
| void StubCompiler::GenerateStoreField(MacroAssembler* masm,
|
| Handle<JSObject> object,
|
| - int index,
|
| + LookupResult* lookup,
|
| Handle<Map> transition,
|
| Handle<Name> name,
|
| Register receiver_reg,
|
| @@ -436,16 +436,6 @@ void StubCompiler::GenerateStoreField(MacroAssembler* masm,
|
| // r0 : value
|
| Label exit;
|
|
|
| - LookupResult lookup(masm->isolate());
|
| - object->Lookup(*name, &lookup);
|
| - if (lookup.IsFound() && (lookup.IsReadOnly() || !lookup.IsCacheable())) {
|
| - // In sloppy mode, we could just return the value and be done. However, we
|
| - // might be in strict mode, where we have to throw. Since we cannot tell,
|
| - // go into slow case unconditionally.
|
| - __ jmp(miss_label);
|
| - return;
|
| - }
|
| -
|
| // Check that the map of the object hasn't changed.
|
| CompareMapMode mode = transition.is_null() ? ALLOW_ELEMENT_TRANSITION_MAPS
|
| : REQUIRE_EXACT_MAP;
|
| @@ -460,8 +450,8 @@ void StubCompiler::GenerateStoreField(MacroAssembler* masm,
|
| // Check that we are allowed to write this.
|
| if (!transition.is_null() && object->GetPrototype()->IsJSObject()) {
|
| JSObject* holder;
|
| - if (lookup.IsFound()) {
|
| - holder = lookup.holder();
|
| + if (lookup->IsFound()) {
|
| + holder = lookup->holder();
|
| } else {
|
| // Find the top object.
|
| holder = *object;
|
| @@ -492,6 +482,7 @@ void StubCompiler::GenerateStoreField(MacroAssembler* masm,
|
| return;
|
| }
|
|
|
| + int index;
|
| if (!transition.is_null()) {
|
| // Update the map of the object.
|
| __ mov(scratch1, Operand(transition));
|
| @@ -507,6 +498,10 @@ void StubCompiler::GenerateStoreField(MacroAssembler* masm,
|
| kDontSaveFPRegs,
|
| OMIT_REMEMBERED_SET,
|
| OMIT_SMI_CHECK);
|
| + index = transition->instance_descriptors()->GetFieldIndex(
|
| + transition->LastAdded());
|
| + } else {
|
| + index = lookup->GetFieldIndex().field_index();
|
| }
|
|
|
| // Adjust for the number of properties stored in the object. Even in the
|
|
|