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 #if V8_TARGET_ARCH_ARM64 | 5 #if V8_TARGET_ARCH_ARM64 |
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 3476 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3487 } | 3487 } |
3488 } | 3488 } |
3489 | 3489 |
3490 __ Adds(x0, x0, Smi::FromInt(count_value)); | 3490 __ Adds(x0, x0, Smi::FromInt(count_value)); |
3491 __ B(vc, &done); | 3491 __ B(vc, &done); |
3492 // Call stub. Undo operation first. | 3492 // Call stub. Undo operation first. |
3493 __ Sub(x0, x0, Smi::FromInt(count_value)); | 3493 __ Sub(x0, x0, Smi::FromInt(count_value)); |
3494 __ B(&stub_call); | 3494 __ B(&stub_call); |
3495 __ Bind(&slow); | 3495 __ Bind(&slow); |
3496 } | 3496 } |
3497 if (!is_strong(language_mode())) { | 3497 |
3498 ToNumberStub convert_stub(isolate()); | 3498 // Convert old value into a number. |
3499 __ CallStub(&convert_stub); | 3499 ToNumberStub convert_stub(isolate()); |
3500 PrepareForBailoutForId(expr->ToNumberId(), TOS_REG); | 3500 __ CallStub(&convert_stub); |
3501 } | 3501 PrepareForBailoutForId(expr->ToNumberId(), TOS_REG); |
3502 | 3502 |
3503 // Save result for postfix expressions. | 3503 // Save result for postfix expressions. |
3504 if (expr->is_postfix()) { | 3504 if (expr->is_postfix()) { |
3505 if (!context()->IsEffect()) { | 3505 if (!context()->IsEffect()) { |
3506 // Save the result on the stack. If we have a named or keyed property | 3506 // Save the result on the stack. If we have a named or keyed property |
3507 // we store the result under the receiver that is currently on top | 3507 // we store the result under the receiver that is currently on top |
3508 // of the stack. | 3508 // of the stack. |
3509 switch (assign_type) { | 3509 switch (assign_type) { |
3510 case VARIABLE: | 3510 case VARIABLE: |
3511 PushOperand(x0); | 3511 PushOperand(x0); |
(...skipping 21 matching lines...) Expand all Loading... |
3533 SetExpressionPosition(expr); | 3533 SetExpressionPosition(expr); |
3534 | 3534 |
3535 { | 3535 { |
3536 Assembler::BlockPoolsScope scope(masm_); | 3536 Assembler::BlockPoolsScope scope(masm_); |
3537 Handle<Code> code = CodeFactory::BinaryOpIC(isolate(), Token::ADD).code(); | 3537 Handle<Code> code = CodeFactory::BinaryOpIC(isolate(), Token::ADD).code(); |
3538 CallIC(code, expr->CountBinOpFeedbackId()); | 3538 CallIC(code, expr->CountBinOpFeedbackId()); |
3539 patch_site.EmitPatchInfo(); | 3539 patch_site.EmitPatchInfo(); |
3540 } | 3540 } |
3541 __ Bind(&done); | 3541 __ Bind(&done); |
3542 | 3542 |
3543 if (is_strong(language_mode())) { | |
3544 PrepareForBailoutForId(expr->ToNumberId(), TOS_REG); | |
3545 } | |
3546 // Store the value returned in x0. | 3543 // Store the value returned in x0. |
3547 switch (assign_type) { | 3544 switch (assign_type) { |
3548 case VARIABLE: | 3545 case VARIABLE: |
3549 if (expr->is_postfix()) { | 3546 if (expr->is_postfix()) { |
3550 { EffectContext context(this); | 3547 { EffectContext context(this); |
3551 EmitVariableAssignment(expr->expression()->AsVariableProxy()->var(), | 3548 EmitVariableAssignment(expr->expression()->AsVariableProxy()->var(), |
3552 Token::ASSIGN, expr->CountSlot()); | 3549 Token::ASSIGN, expr->CountSlot()); |
3553 PrepareForBailoutForId(expr->AssignmentId(), TOS_REG); | 3550 PrepareForBailoutForId(expr->AssignmentId(), TOS_REG); |
3554 context.Plug(x0); | 3551 context.Plug(x0); |
3555 } | 3552 } |
(...skipping 711 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4267 } | 4264 } |
4268 | 4265 |
4269 return INTERRUPT; | 4266 return INTERRUPT; |
4270 } | 4267 } |
4271 | 4268 |
4272 | 4269 |
4273 } // namespace internal | 4270 } // namespace internal |
4274 } // namespace v8 | 4271 } // namespace v8 |
4275 | 4272 |
4276 #endif // V8_TARGET_ARCH_ARM64 | 4273 #endif // V8_TARGET_ARCH_ARM64 |
OLD | NEW |