From 9364d9740e5874e3e59954cf4dab9eb566f722dc Mon Sep 17 00:00:00 2001 From: "bmeurer@chromium.org" Date: Mon, 22 Jul 2013 05:50:10 +0000 Subject: [PATCH] Unify SMI case inlining for ToNumberStub. Use ShouldInlineSmiCase() on arm, mips and x64 similar to the ia32 port. R=dslomov@chromium.org Review URL: https://codereview.chromium.org/19489003 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15787 ce2b1a6d-e550-0410-aec6-3dcde31c8c00 --- src/arm/full-codegen-arm.cc | 4 +++- src/mips/full-codegen-mips.cc | 4 +++- src/x64/full-codegen-x64.cc | 4 +++- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/src/arm/full-codegen-arm.cc b/src/arm/full-codegen-arm.cc index 1760fb8..6a5845d 100644 --- a/src/arm/full-codegen-arm.cc +++ b/src/arm/full-codegen-arm.cc @@ -4436,7 +4436,9 @@ void FullCodeGenerator::VisitCountOperation(CountOperation* expr) { // Call ToNumber only if operand is not a smi. Label no_conversion; - __ JumpIfSmi(r0, &no_conversion); + if (ShouldInlineSmiCase(expr->op())) { + __ JumpIfSmi(r0, &no_conversion); + } ToNumberStub convert_stub; __ CallStub(&convert_stub); __ bind(&no_conversion); diff --git a/src/mips/full-codegen-mips.cc b/src/mips/full-codegen-mips.cc index 51b71a6..9c610c3 100644 --- a/src/mips/full-codegen-mips.cc +++ b/src/mips/full-codegen-mips.cc @@ -4470,7 +4470,9 @@ void FullCodeGenerator::VisitCountOperation(CountOperation* expr) { // Call ToNumber only if operand is not a smi. Label no_conversion; - __ JumpIfSmi(v0, &no_conversion); + if (ShouldInlineSmiCase(expr->op())) { + __ JumpIfSmi(v0, &no_conversion); + } __ mov(a0, v0); ToNumberStub convert_stub; __ CallStub(&convert_stub); diff --git a/src/x64/full-codegen-x64.cc b/src/x64/full-codegen-x64.cc index 121ab2d..bac4e79 100644 --- a/src/x64/full-codegen-x64.cc +++ b/src/x64/full-codegen-x64.cc @@ -4420,7 +4420,9 @@ void FullCodeGenerator::VisitCountOperation(CountOperation* expr) { // Call ToNumber only if operand is not a smi. Label no_conversion; - __ JumpIfSmi(rax, &no_conversion, Label::kNear); + if (ShouldInlineSmiCase(expr->op())) { + __ JumpIfSmi(rax, &no_conversion, Label::kNear); + } ToNumberStub convert_stub; __ CallStub(&convert_stub); __ bind(&no_conversion); -- 2.7.4