]> git.saurik.com Git - apple/javascriptcore.git/blobdiff - llint/LLIntExceptions.cpp
JavaScriptCore-7601.1.46.3.tar.gz
[apple/javascriptcore.git] / llint / LLIntExceptions.cpp
index 20b0db3d9ff7ce8761b84a5a65364b8056546ad7..039936e73fea648871c984ca4f43bb76adcc6b5f 100644 (file)
 
 #include "config.h"
 #include "LLIntExceptions.h"
-
-#if ENABLE(LLINT)
-
 #include "CallFrame.h"
 #include "CodeBlock.h"
 #include "Instruction.h"
-#include "JITExceptions.h"
 #include "LLIntCommon.h"
 #include "LowLevelInterpreter.h"
+#include "JSCInlines.h"
 
 namespace JSC { namespace LLInt {
 
-void interpreterThrowInCaller(ExecState* exec, ReturnAddressPtr pc)
-{
-    JSGlobalData* globalData = &exec->globalData();
-    NativeCallFrameTracer tracer(globalData, exec);
-#if LLINT_SLOW_PATH_TRACING
-    dataLog("Throwing exception %s.\n", globalData->exception.description());
-#endif
-    genericThrow(
-        globalData, exec, globalData->exception,
-        exec->codeBlock()->bytecodeOffset(exec, pc));
-}
-
 Instruction* returnToThrowForThrownException(ExecState* exec)
 {
-    return exec->globalData().llintData.exceptionInstructions();
+    UNUSED_PARAM(exec);
+    return LLInt::exceptionInstructions();
 }
 
-Instruction* returnToThrow(ExecState* exec, Instruction* pc)
+Instruction* returnToThrow(ExecState* exec)
 {
-    JSGlobalData* globalData = &exec->globalData();
-    NativeCallFrameTracer tracer(globalData, exec);
+    UNUSED_PARAM(exec);
 #if LLINT_SLOW_PATH_TRACING
-    dataLog("Throwing exception %s (returnToThrow).\n", globalData->exception.description());
+    VM* vm = &exec->vm();
+    dataLog("Throwing exception ", vm->exception(), " (returnToThrow).\n");
 #endif
-    genericThrow(globalData, exec, globalData->exception, pc - exec->codeBlock()->instructions().begin());
-    
-    return globalData->llintData.exceptionInstructions();
+    return LLInt::exceptionInstructions();
 }
 
-void* callToThrow(ExecState* exec, Instruction* pc)
+void* callToThrow(ExecState* exec)
 {
-    JSGlobalData* globalData = &exec->globalData();
-    NativeCallFrameTracer tracer(globalData, exec);
+    UNUSED_PARAM(exec);
 #if LLINT_SLOW_PATH_TRACING
-    dataLog("Throwing exception %s (callToThrow).\n", globalData->exception.description());
+    VM* vm = &exec->vm();
+    dataLog("Throwing exception ", vm->exception(), " (callToThrow).\n");
 #endif
-    genericThrow(globalData, exec, globalData->exception, pc - exec->codeBlock()->instructions().begin());
-    
-    return bitwise_cast<void*>(&llint_throw_during_call_trampoline);
+    return LLInt::getCodePtr(llint_throw_during_call_trampoline);
 }
 
 } } // namespace JSC::LLInt
-
-#endif // ENABLE(LLINT)