| 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 4476 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4487 // Install the new backing store in the JSArray. | 4487 // Install the new backing store in the JSArray. |
| 4488 __ sw(elements_reg, | 4488 __ sw(elements_reg, |
| 4489 FieldMemOperand(receiver_reg, JSObject::kElementsOffset)); | 4489 FieldMemOperand(receiver_reg, JSObject::kElementsOffset)); |
| 4490 __ RecordWriteField(receiver_reg, JSObject::kElementsOffset, elements_reg, | 4490 __ RecordWriteField(receiver_reg, JSObject::kElementsOffset, elements_reg, |
| 4491 scratch1, kRAHasNotBeenSaved, kDontSaveFPRegs, | 4491 scratch1, kRAHasNotBeenSaved, kDontSaveFPRegs, |
| 4492 EMIT_REMEMBERED_SET, OMIT_SMI_CHECK); | 4492 EMIT_REMEMBERED_SET, OMIT_SMI_CHECK); |
| 4493 | 4493 |
| 4494 // Increment the length of the array. | 4494 // Increment the length of the array. |
| 4495 __ li(length_reg, Operand(Smi::FromInt(1))); | 4495 __ li(length_reg, Operand(Smi::FromInt(1))); |
| 4496 __ sw(length_reg, FieldMemOperand(receiver_reg, JSArray::kLengthOffset)); | 4496 __ sw(length_reg, FieldMemOperand(receiver_reg, JSArray::kLengthOffset)); |
| 4497 __ lw(elements_reg, |
| 4498 FieldMemOperand(receiver_reg, JSObject::kElementsOffset)); |
| 4497 __ jmp(&finish_store); | 4499 __ jmp(&finish_store); |
| 4498 | 4500 |
| 4499 __ bind(&check_capacity); | 4501 __ bind(&check_capacity); |
| 4500 // Make sure that the backing store can hold additional elements. | 4502 // Make sure that the backing store can hold additional elements. |
| 4501 __ lw(scratch1, | 4503 __ lw(scratch1, |
| 4502 FieldMemOperand(elements_reg, FixedDoubleArray::kLengthOffset)); | 4504 FieldMemOperand(elements_reg, FixedDoubleArray::kLengthOffset)); |
| 4503 __ Branch(&slow, hs, length_reg, Operand(scratch1)); | 4505 __ Branch(&slow, hs, length_reg, Operand(scratch1)); |
| 4504 | 4506 |
| 4505 // Grow the array and finish the store. | 4507 // Grow the array and finish the store. |
| 4506 __ Addu(length_reg, length_reg, Operand(Smi::FromInt(1))); | 4508 __ Addu(length_reg, length_reg, Operand(Smi::FromInt(1))); |
| 4507 __ sw(length_reg, FieldMemOperand(receiver_reg, JSArray::kLengthOffset)); | 4509 __ sw(length_reg, FieldMemOperand(receiver_reg, JSArray::kLengthOffset)); |
| 4508 __ jmp(&finish_store); | 4510 __ jmp(&finish_store); |
| 4509 | 4511 |
| 4510 __ bind(&slow); | 4512 __ bind(&slow); |
| 4511 Handle<Code> ic_slow = masm->isolate()->builtins()->KeyedStoreIC_Slow(); | 4513 Handle<Code> ic_slow = masm->isolate()->builtins()->KeyedStoreIC_Slow(); |
| 4512 __ Jump(ic_slow, RelocInfo::CODE_TARGET); | 4514 __ Jump(ic_slow, RelocInfo::CODE_TARGET); |
| 4513 } | 4515 } |
| 4514 } | 4516 } |
| 4515 | 4517 |
| 4516 | 4518 |
| 4517 #undef __ | 4519 #undef __ |
| 4518 | 4520 |
| 4519 } } // namespace v8::internal | 4521 } } // namespace v8::internal |
| 4520 | 4522 |
| 4521 #endif // V8_TARGET_ARCH_MIPS | 4523 #endif // V8_TARGET_ARCH_MIPS |
| OLD | NEW |