#ifndef FTLState_h
#define FTLState_h
#if ENABLE(FTL_JIT)
#include "DFGCommon.h"
#include "DFGGraph.h"
#include "FTLAbbreviations.h"
#include "FTLGeneratedFunction.h"
#include "FTLInlineCacheDescriptor.h"
#include "FTLJITCode.h"
#include "FTLJITFinalizer.h"
#include "FTLJSCall.h"
#include "FTLJSCallVarargs.h"
#include "FTLStackMaps.h"
#include "FTLState.h"
#include <wtf/Noncopyable.h>
namespace JSC { namespace FTL {
inline bool verboseCompilationEnabled()
{
return DFG::verboseCompilationEnabled(DFG::FTLMode);
}
inline bool shouldShowDisassembly()
{
return DFG::shouldShowDisassembly(DFG::FTLMode);
}
class State {
WTF_MAKE_NONCOPYABLE(State);
public:
State(DFG::Graph& graph);
~State();
DFG::Graph& graph;
LContext context;
LModule module;
LValue function;
bool allocationFailed { false }; RefPtr<JITCode> jitCode;
GeneratedFunction generatedFunction;
JITFinalizer* finalizer;
unsigned handleStackOverflowExceptionStackmapID;
unsigned handleExceptionStackmapID;
unsigned capturedStackmapID;
unsigned varargsSpillSlotsStackmapID;
SegmentedVector<GetByIdDescriptor> getByIds;
SegmentedVector<PutByIdDescriptor> putByIds;
SegmentedVector<CheckInDescriptor> checkIns;
Vector<JSCall> jsCalls;
Vector<JSCallVarargs> jsCallVarargses;
Vector<CString> codeSectionNames;
Vector<CString> dataSectionNames;
void* unwindDataSection;
size_t unwindDataSectionSize;
RefPtr<DataSection> stackmapsSection;
void dumpState(const char* when);
void dumpState(LModule, const char* when);
HashSet<CString> nativeLoadedLibraries;
#if ENABLE(FTL_NATIVE_CALL_INLINING)
HashMap<CString, CString> symbolTable;
#endif
};
} }
#endif // ENABLE(FTL_JIT)
#endif // FTLState_h