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

X87: [Interpreter] Collect type feedback for calls in the bytecode handler.

  port fd420203 (r37700)

  original commit message:
  Collect type feedback in the call bytecode handler. The current
  implementation only collects feedback for JS function objects. The other
  objects and Array functions do not collect any feedback. They will be
  marked Megamorphic.

BUG=

Review-Url: https://codereview.chromium.org/2149493005
Cr-Commit-Position: refs/heads/master@{#37737}
parent 68f205b2
......@@ -732,7 +732,8 @@ static void Generate_InterpreterPushArgs(MacroAssembler* masm,
// static
void Builtins::Generate_InterpreterPushArgsAndCallImpl(
MacroAssembler* masm, TailCallMode tail_call_mode) {
MacroAssembler* masm, TailCallMode tail_call_mode,
CallableType function_type) {
// ----------- S t a t e -------------
// -- eax : the number of arguments (not including the receiver)
// -- ebx : the address of the first argument to be pushed. Subsequent
......@@ -755,9 +756,17 @@ void Builtins::Generate_InterpreterPushArgsAndCallImpl(
// Call the target.
__ Push(edx); // Re-push return address.
__ Jump(masm->isolate()->builtins()->Call(ConvertReceiverMode::kAny,
tail_call_mode),
RelocInfo::CODE_TARGET);
if (function_type == CallableType::kJSFunction) {
__ Jump(masm->isolate()->builtins()->CallFunction(ConvertReceiverMode::kAny,
tail_call_mode),
RelocInfo::CODE_TARGET);
} else {
DCHECK_EQ(function_type, CallableType::kAny);
__ Jump(masm->isolate()->builtins()->Call(ConvertReceiverMode::kAny,
tail_call_mode),
RelocInfo::CODE_TARGET);
}
}
......
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