| 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 #include "src/v8.h" | 5 #include "src/v8.h" |
| 6 | 6 |
| 7 #if V8_TARGET_ARCH_ARM | 7 #if V8_TARGET_ARCH_ARM |
| 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 5002 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5013 } | 5013 } |
| 5014 } | 5014 } |
| 5015 | 5015 |
| 5016 __ add(r0, r0, Operand(Smi::FromInt(count_value)), SetCC); | 5016 __ add(r0, r0, Operand(Smi::FromInt(count_value)), SetCC); |
| 5017 __ b(vc, &done); | 5017 __ b(vc, &done); |
| 5018 // Call stub. Undo operation first. | 5018 // Call stub. Undo operation first. |
| 5019 __ sub(r0, r0, Operand(Smi::FromInt(count_value))); | 5019 __ sub(r0, r0, Operand(Smi::FromInt(count_value))); |
| 5020 __ jmp(&stub_call); | 5020 __ jmp(&stub_call); |
| 5021 __ bind(&slow); | 5021 __ bind(&slow); |
| 5022 } | 5022 } |
| 5023 ToNumberStub convert_stub(isolate()); | 5023 if (!is_strong(language_mode())) { |
| 5024 __ CallStub(&convert_stub); | 5024 ToNumberStub convert_stub(isolate()); |
| 5025 PrepareForBailoutForId(expr->ToNumberId(), TOS_REG); | 5025 __ CallStub(&convert_stub); |
| 5026 PrepareForBailoutForId(expr->ToNumberId(), TOS_REG); |
| 5027 } |
| 5026 | 5028 |
| 5027 // Save result for postfix expressions. | 5029 // Save result for postfix expressions. |
| 5028 if (expr->is_postfix()) { | 5030 if (expr->is_postfix()) { |
| 5029 if (!context()->IsEffect()) { | 5031 if (!context()->IsEffect()) { |
| 5030 // Save the result on the stack. If we have a named or keyed property | 5032 // Save the result on the stack. If we have a named or keyed property |
| 5031 // we store the result under the receiver that is currently on top | 5033 // we store the result under the receiver that is currently on top |
| 5032 // of the stack. | 5034 // of the stack. |
| 5033 switch (assign_type) { | 5035 switch (assign_type) { |
| 5034 case VARIABLE: | 5036 case VARIABLE: |
| 5035 __ push(r0); | 5037 __ push(r0); |
| (...skipping 21 matching lines...) Expand all Loading... |
| 5057 | 5059 |
| 5058 // Record position before stub call. | 5060 // Record position before stub call. |
| 5059 SetSourcePosition(expr->position()); | 5061 SetSourcePosition(expr->position()); |
| 5060 | 5062 |
| 5061 Handle<Code> code = CodeFactory::BinaryOpIC(isolate(), Token::ADD, | 5063 Handle<Code> code = CodeFactory::BinaryOpIC(isolate(), Token::ADD, |
| 5062 strength(language_mode())).code(); | 5064 strength(language_mode())).code(); |
| 5063 CallIC(code, expr->CountBinOpFeedbackId()); | 5065 CallIC(code, expr->CountBinOpFeedbackId()); |
| 5064 patch_site.EmitPatchInfo(); | 5066 patch_site.EmitPatchInfo(); |
| 5065 __ bind(&done); | 5067 __ bind(&done); |
| 5066 | 5068 |
| 5069 if (is_strong(language_mode())) { |
| 5070 PrepareForBailoutForId(expr->ToNumberId(), TOS_REG); |
| 5071 } |
| 5067 // Store the value returned in r0. | 5072 // Store the value returned in r0. |
| 5068 switch (assign_type) { | 5073 switch (assign_type) { |
| 5069 case VARIABLE: | 5074 case VARIABLE: |
| 5070 if (expr->is_postfix()) { | 5075 if (expr->is_postfix()) { |
| 5071 { EffectContext context(this); | 5076 { EffectContext context(this); |
| 5072 EmitVariableAssignment(expr->expression()->AsVariableProxy()->var(), | 5077 EmitVariableAssignment(expr->expression()->AsVariableProxy()->var(), |
| 5073 Token::ASSIGN, expr->CountSlot()); | 5078 Token::ASSIGN, expr->CountSlot()); |
| 5074 PrepareForBailoutForId(expr->AssignmentId(), TOS_REG); | 5079 PrepareForBailoutForId(expr->AssignmentId(), TOS_REG); |
| 5075 context.Plug(r0); | 5080 context.Plug(r0); |
| 5076 } | 5081 } |
| (...skipping 542 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5619 DCHECK(interrupt_address == | 5624 DCHECK(interrupt_address == |
| 5620 isolate->builtins()->OsrAfterStackCheck()->entry()); | 5625 isolate->builtins()->OsrAfterStackCheck()->entry()); |
| 5621 return OSR_AFTER_STACK_CHECK; | 5626 return OSR_AFTER_STACK_CHECK; |
| 5622 } | 5627 } |
| 5623 | 5628 |
| 5624 | 5629 |
| 5625 } // namespace internal | 5630 } // namespace internal |
| 5626 } // namespace v8 | 5631 } // namespace v8 |
| 5627 | 5632 |
| 5628 #endif // V8_TARGET_ARCH_ARM | 5633 #endif // V8_TARGET_ARCH_ARM |
| OLD | NEW |