#include "JSCJSValue.h"
#include "Opcode.h"
-#include <wtf/Platform.h>
namespace JSC {
class VM;
struct Instruction;
-#if ENABLE(LLINT_C_LOOP)
+#if !ENABLE(JIT)
typedef OpcodeID LLIntCode;
#else
typedef void (*LLIntCode)();
namespace LLInt {
-#if ENABLE(LLINT)
-
class Data {
public:
static void performAssertions(VM&);
private:
static Instruction* s_exceptionInstructions;
- static Opcode* s_opcodeMap;
+ static Opcode s_opcodeMap[numOpcodeIDs];
friend void initialize();
return reinterpret_cast<void*>(getOpcode(id));
}
-#else // !ENABLE(LLINT)
-
-#if COMPILER(CLANG)
-#pragma clang diagnostic push
-#pragma clang diagnostic ignored "-Wmissing-noreturn"
-#endif
-
-class Data {
-public:
- static void performAssertions(VM&) { }
-};
-
-#if COMPILER(CLANG)
-#pragma clang diagnostic pop
-#endif
-
-#endif // !ENABLE(LLINT)
-
-ALWAYS_INLINE void* getOpcode(void llintOpcode())
-{
- return bitwise_cast<void*>(llintOpcode);
-}
-
-ALWAYS_INLINE void* getCodePtr(void glueHelper())
+#if ENABLE(JIT)
+ALWAYS_INLINE LLIntCode getCodeFunctionPtr(OpcodeID codeId)
{
- return bitwise_cast<void*>(glueHelper);
+ return reinterpret_cast<LLIntCode>(getCodePtr(codeId));
}
+#endif
ALWAYS_INLINE void* getCodePtr(JSC::EncodedJSValue glueHelper())
{