PPC: [compiler] Introduce initial StrictEqualStub.

Port 4acb492e14

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.

R=bmeurer@chromium.org, joransiu@ca.ibm.com, jyan@ca.ibm.com, michael_dawson@ca.ibm.com
BUG=

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

Cr-Commit-Position: refs/heads/master@{#34444}
This commit is contained in:
mbrandy 2016-03-02 11:24:55 -08:00 committed by Commit bot
parent 2fa1c88442
commit 017375f328

View File

@ -3295,10 +3295,17 @@ void CompareICStub::GenerateStrings(MacroAssembler* masm) {
// Handle more complex cases in runtime.
__ bind(&runtime);
__ Push(left, right);
if (equality) {
__ TailCallRuntime(Runtime::kStringEquals);
{
FrameAndConstantPoolScope scope(masm, StackFrame::INTERNAL);
__ Push(left, right);
__ CallRuntime(Runtime::kStringEqual);
}
__ LoadRoot(r4, Heap::kTrueValueRootIndex);
__ sub(r3, r3, r4);
__ Ret();
} else {
__ Push(left, right);
__ TailCallRuntime(Runtime::kStringCompare);
}