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_ARM | 5 #if V8_TARGET_ARCH_ARM |
6 | 6 |
7 #include "src/ast/scopes.h" | 7 #include "src/ast/scopes.h" |
8 #include "src/code-factory.h" | 8 #include "src/code-factory.h" |
9 #include "src/code-stubs.h" | 9 #include "src/code-stubs.h" |
10 #include "src/codegen.h" | 10 #include "src/codegen.h" |
(...skipping 3685 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3696 } | 3696 } |
3697 } | 3697 } |
3698 | 3698 |
3699 __ add(r0, r0, Operand(Smi::FromInt(count_value)), SetCC); | 3699 __ add(r0, r0, Operand(Smi::FromInt(count_value)), SetCC); |
3700 __ b(vc, &done); | 3700 __ b(vc, &done); |
3701 // Call stub. Undo operation first. | 3701 // Call stub. Undo operation first. |
3702 __ sub(r0, r0, Operand(Smi::FromInt(count_value))); | 3702 __ sub(r0, r0, Operand(Smi::FromInt(count_value))); |
3703 __ jmp(&stub_call); | 3703 __ jmp(&stub_call); |
3704 __ bind(&slow); | 3704 __ bind(&slow); |
3705 } | 3705 } |
3706 if (!is_strong(language_mode())) { | 3706 |
3707 ToNumberStub convert_stub(isolate()); | 3707 // Convert old value into a number. |
3708 __ CallStub(&convert_stub); | 3708 ToNumberStub convert_stub(isolate()); |
3709 PrepareForBailoutForId(expr->ToNumberId(), TOS_REG); | 3709 __ CallStub(&convert_stub); |
3710 } | 3710 PrepareForBailoutForId(expr->ToNumberId(), TOS_REG); |
3711 | 3711 |
3712 // Save result for postfix expressions. | 3712 // Save result for postfix expressions. |
3713 if (expr->is_postfix()) { | 3713 if (expr->is_postfix()) { |
3714 if (!context()->IsEffect()) { | 3714 if (!context()->IsEffect()) { |
3715 // Save the result on the stack. If we have a named or keyed property | 3715 // Save the result on the stack. If we have a named or keyed property |
3716 // we store the result under the receiver that is currently on top | 3716 // we store the result under the receiver that is currently on top |
3717 // of the stack. | 3717 // of the stack. |
3718 switch (assign_type) { | 3718 switch (assign_type) { |
3719 case VARIABLE: | 3719 case VARIABLE: |
3720 PushOperand(r0); | 3720 PushOperand(r0); |
(...skipping 19 matching lines...) Expand all Loading... |
3740 __ mov(r1, r0); | 3740 __ mov(r1, r0); |
3741 __ mov(r0, Operand(Smi::FromInt(count_value))); | 3741 __ mov(r0, Operand(Smi::FromInt(count_value))); |
3742 | 3742 |
3743 SetExpressionPosition(expr); | 3743 SetExpressionPosition(expr); |
3744 | 3744 |
3745 Handle<Code> code = CodeFactory::BinaryOpIC(isolate(), Token::ADD).code(); | 3745 Handle<Code> code = CodeFactory::BinaryOpIC(isolate(), Token::ADD).code(); |
3746 CallIC(code, expr->CountBinOpFeedbackId()); | 3746 CallIC(code, expr->CountBinOpFeedbackId()); |
3747 patch_site.EmitPatchInfo(); | 3747 patch_site.EmitPatchInfo(); |
3748 __ bind(&done); | 3748 __ bind(&done); |
3749 | 3749 |
3750 if (is_strong(language_mode())) { | |
3751 PrepareForBailoutForId(expr->ToNumberId(), TOS_REG); | |
3752 } | |
3753 // Store the value returned in r0. | 3750 // Store the value returned in r0. |
3754 switch (assign_type) { | 3751 switch (assign_type) { |
3755 case VARIABLE: | 3752 case VARIABLE: |
3756 if (expr->is_postfix()) { | 3753 if (expr->is_postfix()) { |
3757 { EffectContext context(this); | 3754 { EffectContext context(this); |
3758 EmitVariableAssignment(expr->expression()->AsVariableProxy()->var(), | 3755 EmitVariableAssignment(expr->expression()->AsVariableProxy()->var(), |
3759 Token::ASSIGN, expr->CountSlot()); | 3756 Token::ASSIGN, expr->CountSlot()); |
3760 PrepareForBailoutForId(expr->AssignmentId(), TOS_REG); | 3757 PrepareForBailoutForId(expr->AssignmentId(), TOS_REG); |
3761 context.Plug(r0); | 3758 context.Plug(r0); |
3762 } | 3759 } |
(...skipping 507 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4270 DCHECK(interrupt_address == | 4267 DCHECK(interrupt_address == |
4271 isolate->builtins()->OsrAfterStackCheck()->entry()); | 4268 isolate->builtins()->OsrAfterStackCheck()->entry()); |
4272 return OSR_AFTER_STACK_CHECK; | 4269 return OSR_AFTER_STACK_CHECK; |
4273 } | 4270 } |
4274 | 4271 |
4275 | 4272 |
4276 } // namespace internal | 4273 } // namespace internal |
4277 } // namespace v8 | 4274 } // namespace v8 |
4278 | 4275 |
4279 #endif // V8_TARGET_ARCH_ARM | 4276 #endif // V8_TARGET_ARCH_ARM |
OLD | NEW |