#ifndef JITCode_h
#define JITCode_h
-#include <wtf/Platform.h>
-
#if ENABLE(JIT)
#include "CallFrame.h"
}
// Execute the code!
- inline JSValue execute(RegisterFile* registerFile, CallFrame* callFrame, JSGlobalData* globalData, JSValue* exception)
+ inline JSValue execute(RegisterFile* registerFile, CallFrame* callFrame, JSGlobalData* globalData)
{
- return JSValue::decode(ctiTrampoline(m_ref.m_code.executableAddress(), registerFile, callFrame, exception, Profiler::enabledProfilerReference(), globalData));
+ JSValue result = JSValue::decode(ctiTrampoline(m_ref.m_code.executableAddress(), registerFile, callFrame, 0, Profiler::enabledProfilerReference(), globalData));
+ return globalData->exception ? jsNull() : result;
}
void* start()
return JITCode(code.dataLocation(), 0, 0);
}
+ void clear()
+ {
+ m_ref.~CodeRef();
+ new (&m_ref) CodeRef();
+ }
+
private:
JITCode(void* code, PassRefPtr<ExecutablePool> executablePool, size_t size)
: m_ref(code, executablePool, size)