OLD | NEW |
1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 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 #include "src/v8.h" | 5 #include "src/v8.h" |
6 | 6 |
7 #if V8_TARGET_ARCH_ARM64 | 7 #if V8_TARGET_ARCH_ARM64 |
8 | 8 |
9 #include "src/code-factory.h" | 9 #include "src/code-factory.h" |
10 #include "src/code-stubs.h" | 10 #include "src/code-stubs.h" |
(...skipping 4690 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4701 } | 4701 } |
4702 } | 4702 } |
4703 | 4703 |
4704 __ Adds(x0, x0, Smi::FromInt(count_value)); | 4704 __ Adds(x0, x0, Smi::FromInt(count_value)); |
4705 __ B(vc, &done); | 4705 __ B(vc, &done); |
4706 // Call stub. Undo operation first. | 4706 // Call stub. Undo operation first. |
4707 __ Sub(x0, x0, Smi::FromInt(count_value)); | 4707 __ Sub(x0, x0, Smi::FromInt(count_value)); |
4708 __ B(&stub_call); | 4708 __ B(&stub_call); |
4709 __ Bind(&slow); | 4709 __ Bind(&slow); |
4710 } | 4710 } |
4711 ToNumberStub convert_stub(isolate()); | 4711 if (!is_strong(language_mode())) { |
4712 __ CallStub(&convert_stub); | 4712 ToNumberStub convert_stub(isolate()); |
4713 PrepareForBailoutForId(expr->ToNumberId(), TOS_REG); | 4713 __ CallStub(&convert_stub); |
| 4714 PrepareForBailoutForId(expr->ToNumberId(), TOS_REG); |
| 4715 } |
4714 | 4716 |
4715 // Save result for postfix expressions. | 4717 // Save result for postfix expressions. |
4716 if (expr->is_postfix()) { | 4718 if (expr->is_postfix()) { |
4717 if (!context()->IsEffect()) { | 4719 if (!context()->IsEffect()) { |
4718 // Save the result on the stack. If we have a named or keyed property | 4720 // Save the result on the stack. If we have a named or keyed property |
4719 // we store the result under the receiver that is currently on top | 4721 // we store the result under the receiver that is currently on top |
4720 // of the stack. | 4722 // of the stack. |
4721 switch (assign_type) { | 4723 switch (assign_type) { |
4722 case VARIABLE: | 4724 case VARIABLE: |
4723 __ Push(x0); | 4725 __ Push(x0); |
(...skipping 24 matching lines...) Expand all Loading... |
4748 { | 4750 { |
4749 Assembler::BlockPoolsScope scope(masm_); | 4751 Assembler::BlockPoolsScope scope(masm_); |
4750 Handle<Code> code = | 4752 Handle<Code> code = |
4751 CodeFactory::BinaryOpIC(isolate(), Token::ADD, | 4753 CodeFactory::BinaryOpIC(isolate(), Token::ADD, |
4752 strength(language_mode())).code(); | 4754 strength(language_mode())).code(); |
4753 CallIC(code, expr->CountBinOpFeedbackId()); | 4755 CallIC(code, expr->CountBinOpFeedbackId()); |
4754 patch_site.EmitPatchInfo(); | 4756 patch_site.EmitPatchInfo(); |
4755 } | 4757 } |
4756 __ Bind(&done); | 4758 __ Bind(&done); |
4757 | 4759 |
| 4760 if (is_strong(language_mode())) { |
| 4761 PrepareForBailoutForId(expr->ToNumberId(), TOS_REG); |
| 4762 } |
4758 // Store the value returned in x0. | 4763 // Store the value returned in x0. |
4759 switch (assign_type) { | 4764 switch (assign_type) { |
4760 case VARIABLE: | 4765 case VARIABLE: |
4761 if (expr->is_postfix()) { | 4766 if (expr->is_postfix()) { |
4762 { EffectContext context(this); | 4767 { EffectContext context(this); |
4763 EmitVariableAssignment(expr->expression()->AsVariableProxy()->var(), | 4768 EmitVariableAssignment(expr->expression()->AsVariableProxy()->var(), |
4764 Token::ASSIGN, expr->CountSlot()); | 4769 Token::ASSIGN, expr->CountSlot()); |
4765 PrepareForBailoutForId(expr->AssignmentId(), TOS_REG); | 4770 PrepareForBailoutForId(expr->AssignmentId(), TOS_REG); |
4766 context.Plug(x0); | 4771 context.Plug(x0); |
4767 } | 4772 } |
(...skipping 829 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5597 } | 5602 } |
5598 | 5603 |
5599 return INTERRUPT; | 5604 return INTERRUPT; |
5600 } | 5605 } |
5601 | 5606 |
5602 | 5607 |
5603 } // namespace internal | 5608 } // namespace internal |
5604 } // namespace v8 | 5609 } // namespace v8 |
5605 | 5610 |
5606 #endif // V8_TARGET_ARCH_ARM64 | 5611 #endif // V8_TARGET_ARCH_ARM64 |
OLD | NEW |