| 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 4519 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4530 // Install the new backing store in the JSArray. | 4530 // Install the new backing store in the JSArray. |
| 4531 __ sw(elements_reg, | 4531 __ sw(elements_reg, |
| 4532 FieldMemOperand(receiver_reg, JSObject::kElementsOffset)); | 4532 FieldMemOperand(receiver_reg, JSObject::kElementsOffset)); |
| 4533 __ RecordWriteField(receiver_reg, JSObject::kElementsOffset, elements_reg, | 4533 __ RecordWriteField(receiver_reg, JSObject::kElementsOffset, elements_reg, |
| 4534 scratch1, kRAHasNotBeenSaved, kDontSaveFPRegs, | 4534 scratch1, kRAHasNotBeenSaved, kDontSaveFPRegs, |
| 4535 EMIT_REMEMBERED_SET, OMIT_SMI_CHECK); | 4535 EMIT_REMEMBERED_SET, OMIT_SMI_CHECK); |
| 4536 | 4536 |
| 4537 // Increment the length of the array. | 4537 // Increment the length of the array. |
| 4538 __ li(length_reg, Operand(Smi::FromInt(1))); | 4538 __ li(length_reg, Operand(Smi::FromInt(1))); |
| 4539 __ sw(length_reg, FieldMemOperand(receiver_reg, JSArray::kLengthOffset)); | 4539 __ sw(length_reg, FieldMemOperand(receiver_reg, JSArray::kLengthOffset)); |
| 4540 __ lw(elements_reg, |
| 4541 FieldMemOperand(receiver_reg, JSObject::kElementsOffset)); |
| 4540 __ jmp(&finish_store); | 4542 __ jmp(&finish_store); |
| 4541 | 4543 |
| 4542 __ bind(&check_capacity); | 4544 __ bind(&check_capacity); |
| 4543 // Make sure that the backing store can hold additional elements. | 4545 // Make sure that the backing store can hold additional elements. |
| 4544 __ lw(scratch1, | 4546 __ lw(scratch1, |
| 4545 FieldMemOperand(elements_reg, FixedDoubleArray::kLengthOffset)); | 4547 FieldMemOperand(elements_reg, FixedDoubleArray::kLengthOffset)); |
| 4546 __ Branch(&slow, hs, length_reg, Operand(scratch1)); | 4548 __ Branch(&slow, hs, length_reg, Operand(scratch1)); |
| 4547 | 4549 |
| 4548 // Grow the array and finish the store. | 4550 // Grow the array and finish the store. |
| 4549 __ Addu(length_reg, length_reg, Operand(Smi::FromInt(1))); | 4551 __ Addu(length_reg, length_reg, Operand(Smi::FromInt(1))); |
| 4550 __ sw(length_reg, FieldMemOperand(receiver_reg, JSArray::kLengthOffset)); | 4552 __ sw(length_reg, FieldMemOperand(receiver_reg, JSArray::kLengthOffset)); |
| 4551 __ jmp(&finish_store); | 4553 __ jmp(&finish_store); |
| 4552 | 4554 |
| 4553 __ bind(&slow); | 4555 __ bind(&slow); |
| 4554 Handle<Code> ic_slow = masm->isolate()->builtins()->KeyedStoreIC_Slow(); | 4556 Handle<Code> ic_slow = masm->isolate()->builtins()->KeyedStoreIC_Slow(); |
| 4555 __ Jump(ic_slow, RelocInfo::CODE_TARGET); | 4557 __ Jump(ic_slow, RelocInfo::CODE_TARGET); |
| 4556 } | 4558 } |
| 4557 } | 4559 } |
| 4558 | 4560 |
| 4559 | 4561 |
| 4560 #undef __ | 4562 #undef __ |
| 4561 | 4563 |
| 4562 } } // namespace v8::internal | 4564 } } // namespace v8::internal |
| 4563 | 4565 |
| 4564 #endif // V8_TARGET_ARCH_MIPS | 4566 #endif // V8_TARGET_ARCH_MIPS |
| OLD | NEW |