X87: [compiler] Introduce initial StrictEqualStub.

port 4acb492e14 (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}
This commit is contained in:
zhengxing.li 2016-03-02 19:18:58 -08:00 committed by Commit bot
parent e8df3439c8
commit c7c9567376

View File

@ -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);
}