| 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 3697 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3708 } | 3708 } |
| 3709 | 3709 |
| 3710 Register scratch1 = a1; | 3710 Register scratch1 = a1; |
| 3711 __ li(scratch1, Operand(Smi::FromInt(count_value))); | 3711 __ li(scratch1, Operand(Smi::FromInt(count_value))); |
| 3712 __ AddBranchNoOvf(v0, v0, Operand(scratch1), &done); | 3712 __ AddBranchNoOvf(v0, v0, Operand(scratch1), &done); |
| 3713 // Call stub. Undo operation first. | 3713 // Call stub. Undo operation first. |
| 3714 __ Move(v0, a0); | 3714 __ Move(v0, a0); |
| 3715 __ jmp(&stub_call); | 3715 __ jmp(&stub_call); |
| 3716 __ bind(&slow); | 3716 __ bind(&slow); |
| 3717 } | 3717 } |
| 3718 if (!is_strong(language_mode())) { | 3718 |
| 3719 ToNumberStub convert_stub(isolate()); | 3719 // Convert old value into a number. |
| 3720 __ CallStub(&convert_stub); | 3720 ToNumberStub convert_stub(isolate()); |
| 3721 PrepareForBailoutForId(expr->ToNumberId(), TOS_REG); | 3721 __ CallStub(&convert_stub); |
| 3722 } | 3722 PrepareForBailoutForId(expr->ToNumberId(), TOS_REG); |
| 3723 | 3723 |
| 3724 // Save result for postfix expressions. | 3724 // Save result for postfix expressions. |
| 3725 if (expr->is_postfix()) { | 3725 if (expr->is_postfix()) { |
| 3726 if (!context()->IsEffect()) { | 3726 if (!context()->IsEffect()) { |
| 3727 // Save the result on the stack. If we have a named or keyed property | 3727 // Save the result on the stack. If we have a named or keyed property |
| 3728 // we store the result under the receiver that is currently on top | 3728 // we store the result under the receiver that is currently on top |
| 3729 // of the stack. | 3729 // of the stack. |
| 3730 switch (assign_type) { | 3730 switch (assign_type) { |
| 3731 case VARIABLE: | 3731 case VARIABLE: |
| 3732 PushOperand(v0); | 3732 PushOperand(v0); |
| (...skipping 18 matching lines...) Expand all Loading... |
| 3751 __ mov(a1, v0); | 3751 __ mov(a1, v0); |
| 3752 __ li(a0, Operand(Smi::FromInt(count_value))); | 3752 __ li(a0, Operand(Smi::FromInt(count_value))); |
| 3753 | 3753 |
| 3754 SetExpressionPosition(expr); | 3754 SetExpressionPosition(expr); |
| 3755 | 3755 |
| 3756 Handle<Code> code = CodeFactory::BinaryOpIC(isolate(), Token::ADD).code(); | 3756 Handle<Code> code = CodeFactory::BinaryOpIC(isolate(), Token::ADD).code(); |
| 3757 CallIC(code, expr->CountBinOpFeedbackId()); | 3757 CallIC(code, expr->CountBinOpFeedbackId()); |
| 3758 patch_site.EmitPatchInfo(); | 3758 patch_site.EmitPatchInfo(); |
| 3759 __ bind(&done); | 3759 __ bind(&done); |
| 3760 | 3760 |
| 3761 if (is_strong(language_mode())) { | |
| 3762 PrepareForBailoutForId(expr->ToNumberId(), TOS_REG); | |
| 3763 } | |
| 3764 // Store the value returned in v0. | 3761 // Store the value returned in v0. |
| 3765 switch (assign_type) { | 3762 switch (assign_type) { |
| 3766 case VARIABLE: | 3763 case VARIABLE: |
| 3767 if (expr->is_postfix()) { | 3764 if (expr->is_postfix()) { |
| 3768 { EffectContext context(this); | 3765 { EffectContext context(this); |
| 3769 EmitVariableAssignment(expr->expression()->AsVariableProxy()->var(), | 3766 EmitVariableAssignment(expr->expression()->AsVariableProxy()->var(), |
| 3770 Token::ASSIGN, expr->CountSlot()); | 3767 Token::ASSIGN, expr->CountSlot()); |
| 3771 PrepareForBailoutForId(expr->AssignmentId(), TOS_REG); | 3768 PrepareForBailoutForId(expr->AssignmentId(), TOS_REG); |
| 3772 context.Plug(v0); | 3769 context.Plug(v0); |
| 3773 } | 3770 } |
| (...skipping 445 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4219 reinterpret_cast<uint32_t>( | 4216 reinterpret_cast<uint32_t>( |
| 4220 isolate->builtins()->OsrAfterStackCheck()->entry())); | 4217 isolate->builtins()->OsrAfterStackCheck()->entry())); |
| 4221 return OSR_AFTER_STACK_CHECK; | 4218 return OSR_AFTER_STACK_CHECK; |
| 4222 } | 4219 } |
| 4223 | 4220 |
| 4224 | 4221 |
| 4225 } // namespace internal | 4222 } // namespace internal |
| 4226 } // namespace v8 | 4223 } // namespace v8 |
| 4227 | 4224 |
| 4228 #endif // V8_TARGET_ARCH_MIPS | 4225 #endif // V8_TARGET_ARCH_MIPS |
| OLD | NEW |