]> git.saurik.com Git - apple/javascriptcore.git/blobdiff - jit/JITCode.h
JavaScriptCore-903.5.tar.gz
[apple/javascriptcore.git] / jit / JITCode.h
index 5d889b52f9ac42f7a891803ec6bbe4b388636904..082d2a73756a4bf4245dd2420c0e32b8a4f1496a 100644 (file)
@@ -72,9 +72,10 @@ namespace JSC {
         }
 
         // 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()
@@ -100,6 +101,12 @@ namespace JSC {
             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)