| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #if V8_TARGET_ARCH_MIPS | 5 #if V8_TARGET_ARCH_MIPS |
| 6 | 6 |
| 7 // Note on Mips implementation: | 7 // Note on Mips implementation: |
| 8 // | 8 // |
| 9 // The result_register() for mips is the 'v0' register, which is defined | 9 // The result_register() for mips is the 'v0' register, which is defined |
| 10 // by the ABI to contain function return values. However, the first | 10 // by the ABI to contain function return values. However, the first |
| (...skipping 1783 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1794 if (CompileTimeValue::IsCompileTimeValue(subexpr)) continue; | 1794 if (CompileTimeValue::IsCompileTimeValue(subexpr)) continue; |
| 1795 | 1795 |
| 1796 if (!result_saved) { | 1796 if (!result_saved) { |
| 1797 __ push(v0); // array literal | 1797 __ push(v0); // array literal |
| 1798 __ Push(Smi::FromInt(expr->literal_index())); | 1798 __ Push(Smi::FromInt(expr->literal_index())); |
| 1799 result_saved = true; | 1799 result_saved = true; |
| 1800 } | 1800 } |
| 1801 | 1801 |
| 1802 VisitForAccumulatorValue(subexpr); | 1802 VisitForAccumulatorValue(subexpr); |
| 1803 | 1803 |
| 1804 if (has_fast_elements) { | 1804 if (FLAG_vector_stores) { |
| 1805 __ li(StoreDescriptor::NameRegister(), |
| 1806 Operand(Smi::FromInt(array_index))); |
| 1807 __ lw(StoreDescriptor::ReceiverRegister(), MemOperand(sp, kPointerSize)); |
| 1808 __ mov(StoreDescriptor::ValueRegister(), result_register()); |
| 1809 EmitLoadStoreICSlot(expr->LiteralFeedbackSlot()); |
| 1810 Handle<Code> ic = |
| 1811 CodeFactory::KeyedStoreIC(isolate(), language_mode()).code(); |
| 1812 CallIC(ic); |
| 1813 } else if (has_fast_elements) { |
| 1805 int offset = FixedArray::kHeaderSize + (array_index * kPointerSize); | 1814 int offset = FixedArray::kHeaderSize + (array_index * kPointerSize); |
| 1806 __ lw(t2, MemOperand(sp, kPointerSize)); // Copy of array literal. | 1815 __ lw(t2, MemOperand(sp, kPointerSize)); // Copy of array literal. |
| 1807 __ lw(a1, FieldMemOperand(t2, JSObject::kElementsOffset)); | 1816 __ lw(a1, FieldMemOperand(t2, JSObject::kElementsOffset)); |
| 1808 __ sw(result_register(), FieldMemOperand(a1, offset)); | 1817 __ sw(result_register(), FieldMemOperand(a1, offset)); |
| 1809 // Update the write barrier for the array store. | 1818 // Update the write barrier for the array store. |
| 1810 __ RecordWriteField(a1, offset, result_register(), a2, | 1819 __ RecordWriteField(a1, offset, result_register(), a2, |
| 1811 kRAHasBeenSaved, kDontSaveFPRegs, | 1820 kRAHasBeenSaved, kDontSaveFPRegs, |
| 1812 EMIT_REMEMBERED_SET, INLINE_SMI_CHECK); | 1821 EMIT_REMEMBERED_SET, INLINE_SMI_CHECK); |
| 1813 } else { | 1822 } else { |
| 1814 __ li(a3, Operand(Smi::FromInt(array_index))); | 1823 __ li(a3, Operand(Smi::FromInt(array_index))); |
| (...skipping 3435 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5250 reinterpret_cast<uint32_t>( | 5259 reinterpret_cast<uint32_t>( |
| 5251 isolate->builtins()->OsrAfterStackCheck()->entry())); | 5260 isolate->builtins()->OsrAfterStackCheck()->entry())); |
| 5252 return OSR_AFTER_STACK_CHECK; | 5261 return OSR_AFTER_STACK_CHECK; |
| 5253 } | 5262 } |
| 5254 | 5263 |
| 5255 | 5264 |
| 5256 } // namespace internal | 5265 } // namespace internal |
| 5257 } // namespace v8 | 5266 } // namespace v8 |
| 5258 | 5267 |
| 5259 #endif // V8_TARGET_ARCH_MIPS | 5268 #endif // V8_TARGET_ARCH_MIPS |
| OLD | NEW |