#include "config.h"
#include "DFGCommon.h"
#if ENABLE(DFG_JIT)
#include "DFGNode.h"
#include "JSCInlines.h"
namespace JSC { namespace DFG {
void startCrashing()
{
#if ENABLE(COMPARE_AND_SWAP)
static unsigned lock;
while (!WTF::weakCompareAndSwap(&lock, 0, 1))
std::this_thread::yield();
#endif
}
} }
namespace WTF {
using namespace JSC::DFG;
void printInternal(PrintStream& out, OptimizationFixpointState state)
{
switch (state) {
case BeforeFixpoint:
out.print("BeforeFixpoint");
return;
case FixpointNotConverged:
out.print("FixpointNotConverged");
return;
case FixpointConverged:
out.print("FixpointConverged");
return;
}
RELEASE_ASSERT_NOT_REACHED();
}
void printInternal(PrintStream& out, GraphForm form)
{
switch (form) {
case LoadStore:
out.print("LoadStore");
return;
case ThreadedCPS:
out.print("ThreadedCPS");
return;
case SSA:
out.print("SSA");
return;
}
RELEASE_ASSERT_NOT_REACHED();
}
void printInternal(PrintStream& out, UnificationState state)
{
switch (state) {
case LocallyUnified:
out.print("LocallyUnified");
return;
case GloballyUnified:
out.print("GloballyUnified");
return;
}
RELEASE_ASSERT_NOT_REACHED();
}
void printInternal(PrintStream& out, RefCountState state)
{
switch (state) {
case EverythingIsLive:
out.print("EverythingIsLive");
return;
case ExactRefCount:
out.print("ExactRefCount");
return;
}
RELEASE_ASSERT_NOT_REACHED();
}
void printInternal(PrintStream& out, ProofStatus status)
{
switch (status) {
case IsProved:
out.print("IsProved");
return;
case NeedsCheck:
out.print("NeedsCheck");
return;
}
RELEASE_ASSERT_NOT_REACHED();
}
}
#endif // ENABLE(DFG_JIT)