| 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 1560 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1571 __ lw(a3, MemOperand(fp, JavaScriptFrameConstants::kFunctionOffset)); | 1571 __ lw(a3, MemOperand(fp, JavaScriptFrameConstants::kFunctionOffset)); |
| 1572 __ li(a2, Operand(Smi::FromInt(expr->literal_index()))); | 1572 __ li(a2, Operand(Smi::FromInt(expr->literal_index()))); |
| 1573 __ li(a1, Operand(constant_elements)); | 1573 __ li(a1, Operand(constant_elements)); |
| 1574 if (MustCreateArrayLiteralWithRuntime(expr)) { | 1574 if (MustCreateArrayLiteralWithRuntime(expr)) { |
| 1575 __ li(a0, Operand(Smi::FromInt(expr->ComputeFlags()))); | 1575 __ li(a0, Operand(Smi::FromInt(expr->ComputeFlags()))); |
| 1576 __ Push(a3, a2, a1, a0); | 1576 __ Push(a3, a2, a1, a0); |
| 1577 __ CallRuntime(Runtime::kCreateArrayLiteral); | 1577 __ CallRuntime(Runtime::kCreateArrayLiteral); |
| 1578 } else { | 1578 } else { |
| 1579 FastCloneShallowArrayStub stub(isolate(), allocation_site_mode); | 1579 FastCloneShallowArrayStub stub(isolate(), allocation_site_mode); |
| 1580 __ CallStub(&stub); | 1580 __ CallStub(&stub); |
| 1581 RestoreContext(); |
| 1581 } | 1582 } |
| 1582 PrepareForBailoutForId(expr->CreateLiteralId(), BailoutState::TOS_REGISTER); | 1583 PrepareForBailoutForId(expr->CreateLiteralId(), BailoutState::TOS_REGISTER); |
| 1583 | 1584 |
| 1584 bool result_saved = false; // Is the result saved to the stack? | 1585 bool result_saved = false; // Is the result saved to the stack? |
| 1585 ZoneList<Expression*>* subexprs = expr->values(); | 1586 ZoneList<Expression*>* subexprs = expr->values(); |
| 1586 int length = subexprs->length(); | 1587 int length = subexprs->length(); |
| 1587 | 1588 |
| 1588 // Emit code to evaluate all the non-constant subexpressions and to store | 1589 // Emit code to evaluate all the non-constant subexpressions and to store |
| 1589 // them into the newly cloned array. | 1590 // them into the newly cloned array. |
| 1590 for (int array_index = 0; array_index < length; array_index++) { | 1591 for (int array_index = 0; array_index < length; array_index++) { |
| (...skipping 2125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3716 reinterpret_cast<uint32_t>( | 3717 reinterpret_cast<uint32_t>( |
| 3717 isolate->builtins()->OnStackReplacement()->entry())); | 3718 isolate->builtins()->OnStackReplacement()->entry())); |
| 3718 return ON_STACK_REPLACEMENT; | 3719 return ON_STACK_REPLACEMENT; |
| 3719 } | 3720 } |
| 3720 | 3721 |
| 3721 | 3722 |
| 3722 } // namespace internal | 3723 } // namespace internal |
| 3723 } // namespace v8 | 3724 } // namespace v8 |
| 3724 | 3725 |
| 3725 #endif // V8_TARGET_ARCH_MIPS | 3726 #endif // V8_TARGET_ARCH_MIPS |
| OLD | NEW |