summaryrefslogtreecommitdiff
path: root/Source/JavaScriptCore/llint/LLIntExceptions.cpp
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@digia.com>2013-09-13 12:51:20 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-09-19 20:50:05 +0200
commitd441d6f39bb846989d95bcf5caf387b42414718d (patch)
treee367e64a75991c554930278175d403c072de6bb8 /Source/JavaScriptCore/llint/LLIntExceptions.cpp
parent0060b2994c07842f4c59de64b5e3e430525c4b90 (diff)
downloadqtwebkit-d441d6f39bb846989d95bcf5caf387b42414718d.tar.gz
Import Qt5x2 branch of QtWebkit for Qt 5.2
Importing a new snapshot of webkit. Change-Id: I2d01ad12cdc8af8cb015387641120a9d7ea5f10c Reviewed-by: Allan Sandfeld Jensen <allan.jensen@digia.com>
Diffstat (limited to 'Source/JavaScriptCore/llint/LLIntExceptions.cpp')
-rw-r--r--Source/JavaScriptCore/llint/LLIntExceptions.cpp35
1 files changed, 19 insertions, 16 deletions
diff --git a/Source/JavaScriptCore/llint/LLIntExceptions.cpp b/Source/JavaScriptCore/llint/LLIntExceptions.cpp
index 17c15aa51..d88c16e7e 100644
--- a/Source/JavaScriptCore/llint/LLIntExceptions.cpp
+++ b/Source/JavaScriptCore/llint/LLIntExceptions.cpp
@@ -34,6 +34,7 @@
#include "JITExceptions.h"
#include "LLIntCommon.h"
#include "LowLevelInterpreter.h"
+#include "Operations.h"
namespace JSC { namespace LLInt {
@@ -47,14 +48,14 @@ static void fixupPCforExceptionIfNeeded(ExecState* exec)
void interpreterThrowInCaller(ExecState* exec, ReturnAddressPtr pc)
{
- JSGlobalData* globalData = &exec->globalData();
- NativeCallFrameTracer tracer(globalData, exec);
+ VM* vm = &exec->vm();
+ NativeCallFrameTracer tracer(vm, exec);
#if LLINT_SLOW_PATH_TRACING
- dataLog("Throwing exception ", globalData->exception, ".\n");
+ dataLog("Throwing exception ", vm->exception, ".\n");
#endif
fixupPCforExceptionIfNeeded(exec);
genericThrow(
- globalData, exec, globalData->exception,
+ vm, exec, vm->exception,
exec->codeBlock()->bytecodeOffset(exec, pc));
}
@@ -64,29 +65,31 @@ Instruction* returnToThrowForThrownException(ExecState* exec)
return LLInt::exceptionInstructions();
}
+static void doThrow(ExecState* exec, Instruction* pc)
+{
+ VM* vm = &exec->vm();
+ NativeCallFrameTracer tracer(vm, exec);
+ fixupPCforExceptionIfNeeded(exec);
+ genericThrow(vm, exec, vm->exception, pc - exec->codeBlock()->instructions().begin());
+}
+
Instruction* returnToThrow(ExecState* exec, Instruction* pc)
{
- JSGlobalData* globalData = &exec->globalData();
- NativeCallFrameTracer tracer(globalData, exec);
#if LLINT_SLOW_PATH_TRACING
- dataLog("Throwing exception ", globalData->exception, " (returnToThrow).\n");
+ VM* vm = &exec->vm();
+ dataLog("Throwing exception ", vm->exception, " (returnToThrow).\n");
#endif
- fixupPCforExceptionIfNeeded(exec);
- genericThrow(globalData, exec, globalData->exception, pc - exec->codeBlock()->instructions().begin());
-
+ doThrow(exec, pc);
return LLInt::exceptionInstructions();
}
void* callToThrow(ExecState* exec, Instruction* pc)
{
- JSGlobalData* globalData = &exec->globalData();
- NativeCallFrameTracer tracer(globalData, exec);
#if LLINT_SLOW_PATH_TRACING
- dataLog("Throwing exception ", globalData->exception, " (callToThrow).\n");
+ VM* vm = &exec->vm();
+ dataLog("Throwing exception ", vm->exception, " (callToThrow).\n");
#endif
- fixupPCforExceptionIfNeeded(exec);
- genericThrow(globalData, exec, globalData->exception, pc - exec->codeBlock()->instructions().begin());
-
+ doThrow(exec, pc);
return LLInt::getCodePtr(llint_throw_during_call_trampoline);
}