| 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 1570 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1581 __ bind(¬_fast_object); | 1581 __ bind(¬_fast_object); |
| 1582 __ CheckFastSmiOnlyElements(a3, t3, &call_builtin); | 1582 __ CheckFastSmiOnlyElements(a3, t3, &call_builtin); |
| 1583 // edx: receiver | 1583 // edx: receiver |
| 1584 // r3: map | 1584 // r3: map |
| 1585 __ LoadTransitionedArrayMapConditional(FAST_SMI_ONLY_ELEMENTS, | 1585 __ LoadTransitionedArrayMapConditional(FAST_SMI_ONLY_ELEMENTS, |
| 1586 FAST_ELEMENTS, | 1586 FAST_ELEMENTS, |
| 1587 a3, | 1587 a3, |
| 1588 t3, | 1588 t3, |
| 1589 &call_builtin); | 1589 &call_builtin); |
| 1590 __ mov(a2, receiver); | 1590 __ mov(a2, receiver); |
| 1591 ElementsTransitionGenerator::GenerateSmiOnlyToObject(masm()); | 1591 ElementsTransitionGenerator::GenerateMapChangeElementTransition(masm()); |
| 1592 __ bind(&fast_object); | 1592 __ bind(&fast_object); |
| 1593 } else { | 1593 } else { |
| 1594 __ CheckFastObjectElements(a3, a3, &call_builtin); | 1594 __ CheckFastObjectElements(a3, a3, &call_builtin); |
| 1595 } | 1595 } |
| 1596 | 1596 |
| 1597 // Save new length. | 1597 // Save new length. |
| 1598 __ sw(v0, FieldMemOperand(receiver, JSArray::kLengthOffset)); | 1598 __ sw(v0, FieldMemOperand(receiver, JSArray::kLengthOffset)); |
| 1599 | 1599 |
| 1600 // Store the value. | 1600 // Store the value. |
| 1601 // We may need a register containing the address end_elements below, | 1601 // We may need a register containing the address end_elements below, |
| (...skipping 2700 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4302 | 4302 |
| 4303 // Make sure elements is a fast element array, not 'cow'. | 4303 // Make sure elements is a fast element array, not 'cow'. |
| 4304 __ CheckMap(elements_reg, | 4304 __ CheckMap(elements_reg, |
| 4305 scratch, | 4305 scratch, |
| 4306 Heap::kFixedArrayMapRootIndex, | 4306 Heap::kFixedArrayMapRootIndex, |
| 4307 &miss_force_generic, | 4307 &miss_force_generic, |
| 4308 DONT_DO_SMI_CHECK); | 4308 DONT_DO_SMI_CHECK); |
| 4309 | 4309 |
| 4310 __ bind(&finish_store); | 4310 __ bind(&finish_store); |
| 4311 | 4311 |
| 4312 if (elements_kind == FAST_SMI_ONLY_ELEMENTS) { | 4312 if (IsFastSmiElementsKind(elements_kind)) { |
| 4313 __ Addu(scratch, | 4313 __ Addu(scratch, |
| 4314 elements_reg, | 4314 elements_reg, |
| 4315 Operand(FixedArray::kHeaderSize - kHeapObjectTag)); | 4315 Operand(FixedArray::kHeaderSize - kHeapObjectTag)); |
| 4316 STATIC_ASSERT(kSmiTag == 0 && kSmiTagSize < kPointerSizeLog2); | 4316 STATIC_ASSERT(kSmiTag == 0 && kSmiTagSize < kPointerSizeLog2); |
| 4317 __ sll(scratch2, key_reg, kPointerSizeLog2 - kSmiTagSize); | 4317 __ sll(scratch2, key_reg, kPointerSizeLog2 - kSmiTagSize); |
| 4318 __ Addu(scratch, scratch, scratch2); | 4318 __ Addu(scratch, scratch, scratch2); |
| 4319 __ sw(value_reg, MemOperand(scratch)); | 4319 __ sw(value_reg, MemOperand(scratch)); |
| 4320 } else { | 4320 } else { |
| 4321 ASSERT(elements_kind == FAST_ELEMENTS); | 4321 ASSERT(IsFastObjectElementsKind(elements_kind)); |
| 4322 __ Addu(scratch, | 4322 __ Addu(scratch, |
| 4323 elements_reg, | 4323 elements_reg, |
| 4324 Operand(FixedArray::kHeaderSize - kHeapObjectTag)); | 4324 Operand(FixedArray::kHeaderSize - kHeapObjectTag)); |
| 4325 STATIC_ASSERT(kSmiTag == 0 && kSmiTagSize < kPointerSizeLog2); | 4325 STATIC_ASSERT(kSmiTag == 0 && kSmiTagSize < kPointerSizeLog2); |
| 4326 __ sll(scratch2, key_reg, kPointerSizeLog2 - kSmiTagSize); | 4326 __ sll(scratch2, key_reg, kPointerSizeLog2 - kSmiTagSize); |
| 4327 __ Addu(scratch, scratch, scratch2); | 4327 __ Addu(scratch, scratch, scratch2); |
| 4328 __ sw(value_reg, MemOperand(scratch)); | 4328 __ sw(value_reg, MemOperand(scratch)); |
| 4329 __ mov(receiver_reg, value_reg); | 4329 __ mov(receiver_reg, value_reg); |
| 4330 ASSERT(elements_kind == FAST_ELEMENTS); | |
| 4331 __ RecordWrite(elements_reg, // Object. | 4330 __ RecordWrite(elements_reg, // Object. |
| 4332 scratch, // Address. | 4331 scratch, // Address. |
| 4333 receiver_reg, // Value. | 4332 receiver_reg, // Value. |
| 4334 kRAHasNotBeenSaved, | 4333 kRAHasNotBeenSaved, |
| 4335 kDontSaveFPRegs); | 4334 kDontSaveFPRegs); |
| 4336 } | 4335 } |
| 4337 // value_reg (a0) is preserved. | 4336 // value_reg (a0) is preserved. |
| 4338 // Done. | 4337 // Done. |
| 4339 __ Ret(); | 4338 __ Ret(); |
| 4340 | 4339 |
| (...skipping 216 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4557 __ Jump(ic_slow, RelocInfo::CODE_TARGET); | 4556 __ Jump(ic_slow, RelocInfo::CODE_TARGET); |
| 4558 } | 4557 } |
| 4559 } | 4558 } |
| 4560 | 4559 |
| 4561 | 4560 |
| 4562 #undef __ | 4561 #undef __ |
| 4563 | 4562 |
| 4564 } } // namespace v8::internal | 4563 } } // namespace v8::internal |
| 4565 | 4564 |
| 4566 #endif // V8_TARGET_ARCH_MIPS | 4565 #endif // V8_TARGET_ARCH_MIPS |
| OLD | NEW |