LLIntExceptions.cpp [plain text]
#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"
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();
}
Instruction* returnToThrow(ExecState* exec, Instruction* pc)
{
JSGlobalData* globalData = &exec->globalData();
NativeCallFrameTracer tracer(globalData, exec);
#if LLINT_SLOW_PATH_TRACING
dataLog("Throwing exception %s (returnToThrow).\n", globalData->exception.description());
#endif
genericThrow(globalData, exec, globalData->exception, pc - exec->codeBlock()->instructions().begin());
return globalData->llintData.exceptionInstructions();
}
void* callToThrow(ExecState* exec, Instruction* pc)
{
JSGlobalData* globalData = &exec->globalData();
NativeCallFrameTracer tracer(globalData, exec);
#if LLINT_SLOW_PATH_TRACING
dataLog("Throwing exception %s (callToThrow).\n", globalData->exception.description());
#endif
genericThrow(globalData, exec, globalData->exception, pc - exec->codeBlock()->instructions().begin());
return bitwise_cast<void*>(&llint_throw_during_call_trampoline);
}
} }
#endif // ENABLE(LLINT)