Commit 9364d974 authored by bmeurer@chromium.org's avatar bmeurer@chromium.org

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
parent 0963c220
......@@ -4436,7 +4436,9 @@ void FullCodeGenerator::VisitCountOperation(CountOperation* expr) {
// Call ToNumber only if operand is not a smi.
Label no_conversion;
if (ShouldInlineSmiCase(expr->op())) {
__ JumpIfSmi(r0, &no_conversion);
}
ToNumberStub convert_stub;
__ CallStub(&convert_stub);
__ bind(&no_conversion);
......
......@@ -4470,7 +4470,9 @@ void FullCodeGenerator::VisitCountOperation(CountOperation* expr) {
// Call ToNumber only if operand is not a smi.
Label no_conversion;
if (ShouldInlineSmiCase(expr->op())) {
__ JumpIfSmi(v0, &no_conversion);
}
__ mov(a0, v0);
ToNumberStub convert_stub;
__ CallStub(&convert_stub);
......
......@@ -4420,7 +4420,9 @@ void FullCodeGenerator::VisitCountOperation(CountOperation* expr) {
// Call ToNumber only if operand is not a smi.
Label no_conversion;
if (ShouldInlineSmiCase(expr->op())) {
__ JumpIfSmi(rax, &no_conversion, Label::kNear);
}
ToNumberStub convert_stub;
__ CallStub(&convert_stub);
__ bind(&no_conversion);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment