Ignore:
Timestamp:
Dec 12, 2016, 1:46:45 PM (8 years ago)
Author:
[email protected]
Message:

REGRESSION(r209653): speedometer crashes making virtual slow path tailcalls
https://bugs.webkit.org/show_bug.cgi?id=165748

Reviewed by Filip Pizlo.

JSTests:

New regression test.

  • stress/regress-165748.js: Added.

(sum1):
(sum2):
(sum3):
(sum4):
(sum5):
(sum6):
(tailCaller):
(test):

Source/JavaScriptCore:

The virtual slow path for tailcalls always passes arguments on the stack.
The fix here is to link to the stack argument entrypoint instead of a register
argument entrypoint.

While fixing this bug, I found that we weren't clearing the code origin when
shuffling the call frame for a register argument tailcall.

Also rolling back in r209653, r209654, r209663, and r209673.

  • jit/CallFrameShuffler.cpp:

(JSC::CallFrameShuffler::prepareAny):

  • jit/ThunkGenerators.cpp:

(JSC::virtualThunkFor):

Source/WTF:

Rolling back in r209653, r209654, r209663, and r209673.

  • wtf/Platform.h:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/jit/CachedRecovery.h

    r209678 r209725  
    5151
    5252    const Vector<VirtualRegister, 1>& targets() const { return m_targets; }
     53    const Vector<JSValueRegs, 1>& gprTargets() const { return m_gprTargets; }
    5354
    5455    void addTarget(VirtualRegister reg)
     
    6970    }
    7071
    71     void setWantedJSValueRegs(JSValueRegs jsValueRegs)
    72     {
    73         ASSERT(m_wantedFPR == InvalidFPRReg);
    74         m_wantedJSValueRegs = jsValueRegs;
    75     }
     72    void addTargetJSValueRegs(JSValueRegs);
    7673
    7774    void setWantedFPR(FPRReg fpr)
    7875    {
    79         ASSERT(!m_wantedJSValueRegs);
     76        ASSERT(m_gprTargets.isEmpty());
    8077        m_wantedFPR = fpr;
    8178    }
     
    120117    void setRecovery(ValueRecovery recovery) { m_recovery = recovery; }
    121118
    122     JSValueRegs wantedJSValueRegs() const { return m_wantedJSValueRegs; }
     119    JSValueRegs wantedJSValueRegs() const
     120    {
     121        if (m_gprTargets.isEmpty())
     122            return JSValueRegs();
     123
     124        return m_gprTargets[0];
     125    }
    123126
    124127    FPRReg wantedFPR() const { return m_wantedFPR; }
    125128private:
    126129    ValueRecovery m_recovery;
    127     JSValueRegs m_wantedJSValueRegs;
    128130    FPRReg m_wantedFPR { InvalidFPRReg };
    129131    Vector<VirtualRegister, 1> m_targets;
     132    Vector<JSValueRegs, 1> m_gprTargets;
    130133};
    131134
Note: See TracChangeset for help on using the changeset viewer.