Commit 07a6449f authored by zhengxing.li's avatar zhengxing.li Committed by Commit bot

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

  port d3ed71ed(r42021)

  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.

BUG=

Review-Url: https://codereview.chromium.org/2612693002
Cr-Commit-Position: refs/heads/master@{#42080}
parent a2e88aab
......@@ -1047,9 +1047,11 @@ void CompareICStub::GenerateGeneric(MacroAssembler* masm) {
if (cc == equal) {
{
FrameScope scope(masm, StackFrame::INTERNAL);
__ Push(edx);
__ Push(eax);
__ CallRuntime(strict() ? Runtime::kStrictEqual : Runtime::kEqual);
__ Push(esi);
__ Call(strict() ? isolate()->builtins()->StrictEqual()
: isolate()->builtins()->Equal(),
RelocInfo::CODE_TARGET);
__ Pop(esi);
}
// 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