Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1)

Side by Side Diff: src/full-codegen/mips64/full-codegen-mips64.cc

Issue 1736963002: Remove strong mode support from count operations. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/full-codegen/mips/full-codegen-mips.cc ('k') | src/full-codegen/ppc/full-codegen-ppc.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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_MIPS64 5 #if V8_TARGET_ARCH_MIPS64
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 3704 matching lines...) Expand 10 before | Expand all | Expand 10 after
3715 Register scratch1 = a1; 3715 Register scratch1 = a1;
3716 Register scratch2 = a4; 3716 Register scratch2 = a4;
3717 __ li(scratch1, Operand(Smi::FromInt(count_value))); 3717 __ li(scratch1, Operand(Smi::FromInt(count_value)));
3718 __ DadduAndCheckForOverflow(v0, v0, scratch1, scratch2); 3718 __ DadduAndCheckForOverflow(v0, v0, scratch1, scratch2);
3719 __ BranchOnNoOverflow(&done, scratch2); 3719 __ BranchOnNoOverflow(&done, scratch2);
3720 // Call stub. Undo operation first. 3720 // Call stub. Undo operation first.
3721 __ Move(v0, a0); 3721 __ Move(v0, a0);
3722 __ jmp(&stub_call); 3722 __ jmp(&stub_call);
3723 __ bind(&slow); 3723 __ bind(&slow);
3724 } 3724 }
3725 if (!is_strong(language_mode())) { 3725
3726 ToNumberStub convert_stub(isolate()); 3726 // Convert old value into a number.
3727 __ CallStub(&convert_stub); 3727 ToNumberStub convert_stub(isolate());
3728 PrepareForBailoutForId(expr->ToNumberId(), TOS_REG); 3728 __ CallStub(&convert_stub);
3729 } 3729 PrepareForBailoutForId(expr->ToNumberId(), TOS_REG);
3730 3730
3731 // Save result for postfix expressions. 3731 // Save result for postfix expressions.
3732 if (expr->is_postfix()) { 3732 if (expr->is_postfix()) {
3733 if (!context()->IsEffect()) { 3733 if (!context()->IsEffect()) {
3734 // Save the result on the stack. If we have a named or keyed property 3734 // Save the result on the stack. If we have a named or keyed property
3735 // we store the result under the receiver that is currently on top 3735 // we store the result under the receiver that is currently on top
3736 // of the stack. 3736 // of the stack.
3737 switch (assign_type) { 3737 switch (assign_type) {
3738 case VARIABLE: 3738 case VARIABLE:
3739 PushOperand(v0); 3739 PushOperand(v0);
(...skipping 18 matching lines...) Expand all
3758 __ mov(a1, v0); 3758 __ mov(a1, v0);
3759 __ li(a0, Operand(Smi::FromInt(count_value))); 3759 __ li(a0, Operand(Smi::FromInt(count_value)));
3760 3760
3761 SetExpressionPosition(expr); 3761 SetExpressionPosition(expr);
3762 3762
3763 Handle<Code> code = CodeFactory::BinaryOpIC(isolate(), Token::ADD).code(); 3763 Handle<Code> code = CodeFactory::BinaryOpIC(isolate(), Token::ADD).code();
3764 CallIC(code, expr->CountBinOpFeedbackId()); 3764 CallIC(code, expr->CountBinOpFeedbackId());
3765 patch_site.EmitPatchInfo(); 3765 patch_site.EmitPatchInfo();
3766 __ bind(&done); 3766 __ bind(&done);
3767 3767
3768 if (is_strong(language_mode())) {
3769 PrepareForBailoutForId(expr->ToNumberId(), TOS_REG);
3770 }
3771 // Store the value returned in v0. 3768 // Store the value returned in v0.
3772 switch (assign_type) { 3769 switch (assign_type) {
3773 case VARIABLE: 3770 case VARIABLE:
3774 if (expr->is_postfix()) { 3771 if (expr->is_postfix()) {
3775 { EffectContext context(this); 3772 { EffectContext context(this);
3776 EmitVariableAssignment(expr->expression()->AsVariableProxy()->var(), 3773 EmitVariableAssignment(expr->expression()->AsVariableProxy()->var(),
3777 Token::ASSIGN, expr->CountSlot()); 3774 Token::ASSIGN, expr->CountSlot());
3778 PrepareForBailoutForId(expr->AssignmentId(), TOS_REG); 3775 PrepareForBailoutForId(expr->AssignmentId(), TOS_REG);
3779 context.Plug(v0); 3776 context.Plug(v0);
3780 } 3777 }
(...skipping 450 matching lines...) Expand 10 before | Expand all | Expand 10 after
4231 reinterpret_cast<uint64_t>( 4228 reinterpret_cast<uint64_t>(
4232 isolate->builtins()->OsrAfterStackCheck()->entry())); 4229 isolate->builtins()->OsrAfterStackCheck()->entry()));
4233 return OSR_AFTER_STACK_CHECK; 4230 return OSR_AFTER_STACK_CHECK;
4234 } 4231 }
4235 4232
4236 4233
4237 } // namespace internal 4234 } // namespace internal
4238 } // namespace v8 4235 } // namespace v8
4239 4236
4240 #endif // V8_TARGET_ARCH_MIPS64 4237 #endif // V8_TARGET_ARCH_MIPS64
OLDNEW
« no previous file with comments | « src/full-codegen/mips/full-codegen-mips.cc ('k') | src/full-codegen/ppc/full-codegen-ppc.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698