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

X87: [turbofan] Move JSCallFunction specialization to JSCallReducer.

    port e5edd66d (r32022)

    original commit message:
    This is the first part to refactoring the JSNativeContextSpecialization
    class, which has grown way too big recently.

    Also don't collect cross context feedback for the CallIC in general.
    Neither TurboFan nor Crankshaft can make any use of cross context
    JSFunction feedback that is collected by the CallIC, so there's no
    point in gathering that feedback at all (it just complicates the
    checking that is necessary in the compilers). What we should do
    instead at some point (when Crankshaft becomes less important) is
    to collect the SharedFunctionInfo as feedback for those cases.

BUG=

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

Cr-Commit-Position: refs/heads/master@{#32024}
parent 07c1d181
...@@ -1919,6 +1919,13 @@ void CallICStub::Generate(MacroAssembler* masm) { ...@@ -1919,6 +1919,13 @@ void CallICStub::Generate(MacroAssembler* masm) {
__ cmp(edi, ecx); __ cmp(edi, ecx);
__ j(equal, &miss); __ j(equal, &miss);
// Make sure the function belongs to the same native context (which implies
// the same global object).
__ mov(ecx, FieldOperand(edi, JSFunction::kContextOffset));
__ mov(ecx, ContextOperand(ecx, Context::GLOBAL_OBJECT_INDEX));
__ cmp(ecx, GlobalObjectOperand());
__ j(not_equal, &miss);
// Update stats. // Update stats.
__ add(FieldOperand(ebx, with_types_offset), Immediate(Smi::FromInt(1))); __ add(FieldOperand(ebx, with_types_offset), Immediate(Smi::FromInt(1)));
......
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