Commit c7c95673 authored by zhengxing.li's avatar zhengxing.li Committed by Commit bot

X87: [compiler] Introduce initial StrictEqualStub.

  port 4acb492e (r34423)

  original commit message:
  Initial version of a new StrictEqualStub written as TurboFan code stub,
  that implements the full strict equality comparison and is usable for
  both TurboFan and Ignition (and soon for the generic CompareIC case
  too). The stub is not fully optimized yet, i.e. we still go to the
  runtime for string comparisons, but that'll be addressed in a follow-up
  CL.

BUG=

Review URL: https://codereview.chromium.org/1762533002

Cr-Commit-Position: refs/heads/master@{#34454}
parent e8df3439
......@@ -2925,13 +2925,20 @@ void CompareICStub::GenerateStrings(MacroAssembler* masm) {
// Handle more complex cases in runtime.
__ bind(&runtime);
__ pop(tmp1); // Return address.
__ push(left);
__ push(right);
__ push(tmp1);
if (equality) {
__ TailCallRuntime(Runtime::kStringEquals);
{
FrameScope scope(masm, StackFrame::INTERNAL);
__ Push(left);
__ Push(right);
__ CallRuntime(Runtime::kStringEqual);
}
__ sub(eax, Immediate(masm->isolate()->factory()->true_value()));
__ Ret();
} else {
__ pop(tmp1); // Return address.
__ push(left);
__ push(right);
__ push(tmp1);
__ TailCallRuntime(Runtime::kStringCompare);
}
......
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