Ignore:
Timestamp:
Jul 24, 2013, 8:58:38 PM (12 years ago)
Author:
[email protected]
Message:

fourthTier: Landing the initial FTL logic in a single commit to avoid spurious
broken builds.

Location:
trunk/Source/JavaScriptCore/ftl
Files:
1 added
1 copied

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/ftl/FTLValueSource.h

    r153120 r153121  
    2424 */
    2525
    26 #ifndef DFGOSRExitCompilerCommon_h
    27 #define DFGOSRExitCompilerCommon_h
     26#ifndef FTLValueSource_h
     27#define FTLValueSource_h
    2828
    2929#include <wtf/Platform.h>
    3030
    31 #if ENABLE(DFG_JIT)
     31#if ENABLE(FTL_JIT)
    3232
    33 #include "DFGCCallHelpers.h"
    34 #include "DFGOSRExit.h"
     33#include "DFGNode.h"
     34#include <wtf/PrintStream.h>
     35#include <wtf/StdLibExtras.h>
    3536
    36 namespace JSC { namespace DFG {
     37namespace JSC { namespace FTL {
    3738
    38 void handleExitCounts(CCallHelpers&, const OSRExit&);
    39 void reifyInlinedCallFrames(CCallHelpers&, const OSRExit&);
    40 void adjustAndJumpToTarget(CCallHelpers&, const OSRExit&);
     39enum ValueSourceKind {
     40    SourceNotSet,
     41    ValueInJSStack,
     42    Int32InJSStack,
     43    DoubleInJSStack,
     44    ValueInLocals,
     45    Int32InLocals,
     46    BooleanInLocals,
     47    DoubleInLocals,
     48    ArgumentsSource,
     49    SourceIsDead,
     50    HaveNode
     51};
    4152
    42 } } // namespace JSC::DFG
     53class ValueSource {
     54public:
     55    ValueSource()
     56        : m_value(SourceNotSet)
     57    {
     58    }
     59   
     60    explicit ValueSource(ValueSourceKind kind)
     61        : m_value(kind)
     62    {
     63    }
     64   
     65    explicit ValueSource(DFG::Node* node)
     66        : m_value(bitwise_cast<uintptr_t>(node))
     67    {
     68    }
     69   
     70    ValueSourceKind kind() const
     71    {
     72        if (m_value < static_cast<uintptr_t>(HaveNode))
     73            return static_cast<ValueSourceKind>(m_value);
     74        return HaveNode;
     75    }
     76   
     77    bool operator!() const { return kind() != SourceNotSet; }
     78   
     79    DFG::Node* node() const
     80    {
     81        ASSERT(kind() == HaveNode);
     82        return bitwise_cast<DFG::Node*>(m_value);
     83    }
     84   
     85    void dump(PrintStream&) const;
    4386
    44 #endif // ENABLE(DFG_JIT)
     87private:
     88    uintptr_t m_value;
     89};
    4590
    46 #endif // DFGOSRExitCompilerCommon_h
     91} } // namespace JSC::FTL
    4792
     93#endif // ENABLE(FTL_JIT)
     94
     95#endif // FTLValueSource_h
     96
Note: See TracChangeset for help on using the changeset viewer.