Commit dc4586ce authored by bjaideep's avatar bjaideep Committed by Commit bot

PPC/s390: [ic] Use StrictEqual/Equal builtins for CompareIC slow path.

Port d3ed71ed

Original Commit Message:

    Don't fallback to the %StrictEqual / %Equal runtime functions for the
    generic CompareIC slow path, but use the (new) StrictEqual and Equal
    builtins instead. This avoids a performance cliff when mixing input
    types for strict equality sites.

R=bmeurer@chromium.org, joransiu@ca.ibm.com, jyan@ca.ibm.com, michael_dawson@ca.ibm.com
BUG=v8:4773
LOG=N

Review-Url: https://codereview.chromium.org/2608283002
Cr-Commit-Position: refs/heads/master@{#42039}
parent db5cf84a
......@@ -653,8 +653,11 @@ void CompareICStub::GenerateGeneric(MacroAssembler* masm) {
if (cc == eq) {
{
FrameAndConstantPoolScope scope(masm, StackFrame::INTERNAL);
__ Push(lhs, rhs);
__ CallRuntime(strict() ? Runtime::kStrictEqual : Runtime::kEqual);
__ Push(cp);
__ Call(strict() ? isolate()->builtins()->StrictEqual()
: isolate()->builtins()->Equal(),
RelocInfo::CODE_TARGET);
__ Pop(cp);
}
// Turn true into 0 and false into some non-zero value.
STATIC_ASSERT(EQUAL == 0);
......
......@@ -636,8 +636,11 @@ void CompareICStub::GenerateGeneric(MacroAssembler* masm) {
if (cc == eq) {
{
FrameAndConstantPoolScope scope(masm, StackFrame::INTERNAL);
__ Push(lhs, rhs);
__ CallRuntime(strict() ? Runtime::kStrictEqual : Runtime::kEqual);
__ Push(cp);
__ Call(strict() ? isolate()->builtins()->StrictEqual()
: isolate()->builtins()->Equal(),
RelocInfo::CODE_TARGET);
__ Pop(cp);
}
// Turn true into 0 and false into some non-zero value.
STATIC_ASSERT(EQUAL == 0);
......
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