Commit 78085e4d authored by bjaideep's avatar bjaideep Committed by Commit bot

PPC/s390: [ic] Unify CallIC feedback collection and handling.

Port 308788b3

Original commit message:

    Consistently collect CallIC feedback in fullcodegen and Ignition, even
    for possibly direct eval calls, that were treated specially so far, for
    no apparent reason. With the upcoming SharedFunctionInfo based CallIC
    feedback, we might be able to even inline certain direct eval calls, if
    they manage to hit the eval cache. More importantly, this patch
    simplifies the collection and dealing with CallIC feedback (and as a
    side effect fixes an inconsistency with feedback for super constructor
    calls).

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

BUG=
LOG=N

Review-Url: https://codereview.chromium.org/2425243003
Cr-Commit-Position: refs/heads/master@{#40412}
parent 0c6354e0
......@@ -2496,11 +2496,13 @@ void FullCodeGenerator::EmitPossiblyEvalCall(Call* expr) {
// Record source position for debugger.
SetCallPosition(expr);
Handle<Code> code = CodeFactory::CallIC(isolate(), ConvertReceiverMode::kAny,
expr->tail_call_mode())
.code();
__ LoadSmiLiteral(r6, SmiFromSlot(expr->CallFeedbackICSlot()));
__ LoadP(r4, MemOperand(sp, (arg_count + 1) * kPointerSize), r0);
__ mov(r3, Operand(arg_count));
__ Call(isolate()->builtins()->Call(ConvertReceiverMode::kAny,
expr->tail_call_mode()),
RelocInfo::CODE_TARGET);
__ Call(code, RelocInfo::CODE_TARGET);
OperandStackDepthDecrement(arg_count + 1);
RecordJSReturnSite(expr);
RestoreContext();
......
......@@ -2438,11 +2438,13 @@ void FullCodeGenerator::EmitPossiblyEvalCall(Call* expr) {
// Record source position for debugger.
SetCallPosition(expr);
Handle<Code> code = CodeFactory::CallIC(isolate(), ConvertReceiverMode::kAny,
expr->tail_call_mode())
.code();
__ LoadSmiLiteral(r5, SmiFromSlot(expr->CallFeedbackICSlot()));
__ LoadP(r3, MemOperand(sp, (arg_count + 1) * kPointerSize), r0);
__ mov(r2, Operand(arg_count));
__ Call(isolate()->builtins()->Call(ConvertReceiverMode::kAny,
expr->tail_call_mode()),
RelocInfo::CODE_TARGET);
__ Call(code, RelocInfo::CODE_TARGET);
OperandStackDepthDecrement(arg_count + 1);
RecordJSReturnSite(expr);
RestoreContext();
......
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