OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
(...skipping 4411 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4422 // Install the new backing store in the JSArray. | 4422 // Install the new backing store in the JSArray. |
4423 __ str(elements_reg, | 4423 __ str(elements_reg, |
4424 FieldMemOperand(receiver_reg, JSObject::kElementsOffset)); | 4424 FieldMemOperand(receiver_reg, JSObject::kElementsOffset)); |
4425 __ RecordWriteField(receiver_reg, JSObject::kElementsOffset, elements_reg, | 4425 __ RecordWriteField(receiver_reg, JSObject::kElementsOffset, elements_reg, |
4426 scratch1, kLRHasNotBeenSaved, kDontSaveFPRegs, | 4426 scratch1, kLRHasNotBeenSaved, kDontSaveFPRegs, |
4427 EMIT_REMEMBERED_SET, OMIT_SMI_CHECK); | 4427 EMIT_REMEMBERED_SET, OMIT_SMI_CHECK); |
4428 | 4428 |
4429 // Increment the length of the array. | 4429 // Increment the length of the array. |
4430 __ mov(length_reg, Operand(Smi::FromInt(1))); | 4430 __ mov(length_reg, Operand(Smi::FromInt(1))); |
4431 __ str(length_reg, FieldMemOperand(receiver_reg, JSArray::kLengthOffset)); | 4431 __ str(length_reg, FieldMemOperand(receiver_reg, JSArray::kLengthOffset)); |
| 4432 __ ldr(elements_reg, |
| 4433 FieldMemOperand(receiver_reg, JSObject::kElementsOffset)); |
4432 __ jmp(&finish_store); | 4434 __ jmp(&finish_store); |
4433 | 4435 |
4434 __ bind(&check_capacity); | 4436 __ bind(&check_capacity); |
4435 // Make sure that the backing store can hold additional elements. | 4437 // Make sure that the backing store can hold additional elements. |
4436 __ ldr(scratch1, | 4438 __ ldr(scratch1, |
4437 FieldMemOperand(elements_reg, FixedDoubleArray::kLengthOffset)); | 4439 FieldMemOperand(elements_reg, FixedDoubleArray::kLengthOffset)); |
4438 __ cmp(length_reg, scratch1); | 4440 __ cmp(length_reg, scratch1); |
4439 __ b(hs, &slow); | 4441 __ b(hs, &slow); |
4440 | 4442 |
4441 // Grow the array and finish the store. | 4443 // Grow the array and finish the store. |
4442 __ add(length_reg, length_reg, Operand(Smi::FromInt(1))); | 4444 __ add(length_reg, length_reg, Operand(Smi::FromInt(1))); |
4443 __ str(length_reg, FieldMemOperand(receiver_reg, JSArray::kLengthOffset)); | 4445 __ str(length_reg, FieldMemOperand(receiver_reg, JSArray::kLengthOffset)); |
4444 __ jmp(&finish_store); | 4446 __ jmp(&finish_store); |
4445 | 4447 |
4446 __ bind(&slow); | 4448 __ bind(&slow); |
4447 Handle<Code> ic_slow = masm->isolate()->builtins()->KeyedStoreIC_Slow(); | 4449 Handle<Code> ic_slow = masm->isolate()->builtins()->KeyedStoreIC_Slow(); |
4448 __ Jump(ic_slow, RelocInfo::CODE_TARGET); | 4450 __ Jump(ic_slow, RelocInfo::CODE_TARGET); |
4449 } | 4451 } |
4450 } | 4452 } |
4451 | 4453 |
4452 | 4454 |
4453 #undef __ | 4455 #undef __ |
4454 | 4456 |
4455 } } // namespace v8::internal | 4457 } } // namespace v8::internal |
4456 | 4458 |
4457 #endif // V8_TARGET_ARCH_ARM | 4459 #endif // V8_TARGET_ARCH_ARM |
OLD | NEW |