Ignore:
Timestamp:
Aug 26, 2014, 9:46:10 AM (11 years ago)
Author:
[email protected]
Message:

Unreviewed, rolling out r172940.
https://bugs.webkit.org/show_bug.cgi?id=136256

Caused assertions on fast/storage/serialized-script-
value.html, and possibly flakiness on more tests (Requested by
ap on #webkit).

Reverted changeset:

"FTL should be able to do polymorphic call inlining"
https://bugs.webkit.org/show_bug.cgi?id=135145
http://trac.webkit.org/changeset/172940

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/bytecode/CallLinkStatus.h

    r172940 r172961  
    4747public:
    4848    CallLinkStatus()
    49         : m_couldTakeSlowPath(false)
     49        : m_executable(0)
     50        , m_couldTakeSlowPath(false)
    5051        , m_isProved(false)
    51         , m_canTrustCounts(false)
    5252    {
    5353    }
     
    6262    explicit CallLinkStatus(JSValue);
    6363   
    64     CallLinkStatus(CallVariant variant)
    65         : m_edges(1, CallEdge(variant, 1))
     64    CallLinkStatus(ExecutableBase* executable)
     65        : m_executable(executable)
    6666        , m_couldTakeSlowPath(false)
    6767        , m_isProved(false)
    68         , m_canTrustCounts(false)
    6968    {
    7069    }
     
    9493    // Computes the status assuming that we never took slow path and never previously
    9594    // exited.
    96     static CallLinkStatus computeFor(const ConcurrentJITLocker&, CodeBlock*, CallLinkInfo&);
    97     static CallLinkStatus computeFor(
    98         const ConcurrentJITLocker&, CodeBlock*, CallLinkInfo&, ExitSiteData);
     95    static CallLinkStatus computeFor(const ConcurrentJITLocker&, CallLinkInfo&);
     96    static CallLinkStatus computeFor(const ConcurrentJITLocker&, CallLinkInfo&, ExitSiteData);
    9997#endif
    10098   
     
    110108        CodeBlock*, CodeOrigin, const CallLinkInfoMap&, const ContextMap&);
    111109   
    112     bool isSet() const { return !m_edges.isEmpty() || m_couldTakeSlowPath; }
     110    bool isSet() const { return m_callTarget || m_executable || m_couldTakeSlowPath; }
    113111   
    114112    bool operator!() const { return !isSet(); }
    115113   
    116114    bool couldTakeSlowPath() const { return m_couldTakeSlowPath; }
     115    bool isClosureCall() const { return m_executable && !m_callTarget; }
    117116   
    118     CallEdgeList edges() const { return m_edges; }
    119     unsigned size() const { return m_edges.size(); }
    120     CallEdge at(unsigned i) const { return m_edges[i]; }
    121     CallEdge operator[](unsigned i) const { return at(i); }
     117    JSValue callTarget() const { return m_callTarget; }
     118    JSFunction* function() const;
     119    InternalFunction* internalFunction() const;
     120    Intrinsic intrinsicFor(CodeSpecializationKind) const;
     121    ExecutableBase* executable() const { return m_executable; }
    122122    bool isProved() const { return m_isProved; }
    123     bool canOptimize() const { return !m_edges.isEmpty(); }
    124     bool canTrustCounts() const { return m_canTrustCounts; }
    125    
    126     bool isClosureCall() const; // Returns true if any callee is a closure call.
     123    bool canOptimize() const { return (m_callTarget || m_executable) && !m_couldTakeSlowPath; }
    127124   
    128125    void dump(PrintStream&) const;
    129126   
    130127private:
    131     void makeClosureCall();
     128    void makeClosureCall()
     129    {
     130        ASSERT(!m_isProved);
     131        // Turn this into a closure call.
     132        m_callTarget = JSValue();
     133    }
    132134   
    133135    static CallLinkStatus computeFromLLInt(const ConcurrentJITLocker&, CodeBlock*, unsigned bytecodeIndex);
    134 #if ENABLE(JIT)
    135     static CallLinkStatus computeFromCallEdgeProfile(CallEdgeProfile*);
    136     static CallLinkStatus computeFromCallLinkInfo(
    137         const ConcurrentJITLocker&, CallLinkInfo&);
    138 #endif
    139136   
    140     CallEdgeList m_edges;
     137    JSValue m_callTarget;
     138    ExecutableBase* m_executable;
    141139    bool m_couldTakeSlowPath;
    142140    bool m_isProved;
    143     bool m_canTrustCounts;
    144141};
    145142
Note: See TracChangeset for help on using the changeset viewer.