Diff
Modified: trunk/Source/_javascript_Core/ChangeLog (156241 => 156242)
--- trunk/Source/_javascript_Core/ChangeLog 2013-09-22 04:15:10 UTC (rev 156241)
+++ trunk/Source/_javascript_Core/ChangeLog 2013-09-22 05:00:45 UTC (rev 156242)
@@ -1,3 +1,46 @@
+2013-09-21 Filip Pizlo <[email protected]>
+
+ Interpreter::unwind() has no need for the bytecodeOffset
+ https://bugs.webkit.org/show_bug.cgi?id=121755
+
+ Reviewed by Oliver Hunt.
+
+ It was only using the bytecodeOffset for some debugger stuff, but the debugger could
+ just get the bytecodeOffset the same way the rest of the machinery does: by using the
+ CallFrame's location.
+
+ It turns out that a lot of really ugly code was in place just to supply this
+ bytecodeOffset. This patch kills most of that code, and allows us to kill even more
+ code in a future patch - though most likely that killage will involve further
+ refactorings as well, see https://bugs.webkit.org/show_bug.cgi?id=121734.
+
+ * dfg/DFGOperations.cpp:
+ * interpreter/CallFrame.cpp:
+ (JSC::CallFrame::bytecodeOffset):
+ (JSC::CallFrame::codeOrigin):
+ * interpreter/CallFrame.h:
+ * interpreter/Interpreter.cpp:
+ (JSC::Interpreter::unwind):
+ * interpreter/Interpreter.h:
+ * jit/JITExceptions.cpp:
+ (JSC::genericUnwind):
+ * jit/JITExceptions.h:
+ * jit/JITStubs.cpp:
+ (JSC::DEFINE_STUB_FUNCTION):
+ (JSC::cti_vm_handle_exception):
+ * llint/LLIntExceptions.cpp:
+ (JSC::LLInt::doThrow):
+ (JSC::LLInt::returnToThrow):
+ (JSC::LLInt::callToThrow):
+ * llint/LLIntExceptions.h:
+ * llint/LLIntSlowPaths.cpp:
+ (JSC::LLInt::LLINT_SLOW_PATH_DECL):
+ * runtime/CommonSlowPaths.cpp:
+ (JSC::SLOW_PATH_DECL):
+ * runtime/CommonSlowPathsExceptions.cpp:
+ (JSC::CommonSlowPaths::interpreterThrowInCaller):
+ * runtime/CommonSlowPathsExceptions.h:
+
2013-09-21 Darin Adler <[email protected]>
Add ExecState::uncheckedArgument and use where possible to shrink a bit
Modified: trunk/Source/_javascript_Core/dfg/DFGOperations.cpp (156241 => 156242)
--- trunk/Source/_javascript_Core/dfg/DFGOperations.cpp 2013-09-22 04:15:10 UTC (rev 156241)
+++ trunk/Source/_javascript_Core/dfg/DFGOperations.cpp 2013-09-22 05:00:45 UTC (rev 156242)
@@ -1906,31 +1906,34 @@
DFGHandlerEncoded DFG_OPERATION lookupExceptionHandler(ExecState* exec, uint32_t callIndex)
{
+ // FIXME: This isn't needed anymore.
+ // https://bugs.webkit.org/show_bug.cgi?id=121734
+ UNUSED_PARAM(callIndex);
+
VM* vm = &exec->vm();
NativeCallFrameTracer tracer(vm, exec);
JSValue exceptionValue = exec->exception();
ASSERT(exceptionValue);
- unsigned vPCIndex = exec->codeBlock()->bytecodeOffsetForCallAtIndex(callIndex);
- ExceptionHandler handler = genericUnwind(vm, exec, exceptionValue, vPCIndex);
+ ExceptionHandler handler = genericUnwind(vm, exec, exceptionValue);
ASSERT(handler.catchRoutine);
return dfgHandlerEncoded(handler.callFrame, handler.catchRoutine);
}
DFGHandlerEncoded DFG_OPERATION lookupExceptionHandlerInStub(ExecState* exec, StructureStubInfo* stubInfo)
{
+ // FIXME: This isn't needed anymore.
+ // https://bugs.webkit.org/show_bug.cgi?id=121734
+ UNUSED_PARAM(stubInfo);
+
VM* vm = &exec->vm();
NativeCallFrameTracer tracer(vm, exec);
JSValue exceptionValue = exec->exception();
ASSERT(exceptionValue);
- CodeOrigin codeOrigin = stubInfo->codeOrigin;
- while (codeOrigin.inlineCallFrame)
- codeOrigin = codeOrigin.inlineCallFrame->caller;
-
- ExceptionHandler handler = genericUnwind(vm, exec, exceptionValue, codeOrigin.bytecodeIndex);
+ ExceptionHandler handler = genericUnwind(vm, exec, exceptionValue);
ASSERT(handler.catchRoutine);
return dfgHandlerEncoded(handler.callFrame, handler.catchRoutine);
}
Modified: trunk/Source/_javascript_Core/interpreter/CallFrame.cpp (156241 => 156242)
--- trunk/Source/_javascript_Core/interpreter/CallFrame.cpp 2013-09-22 04:15:10 UTC (rev 156241)
+++ trunk/Source/_javascript_Core/interpreter/CallFrame.cpp 2013-09-22 05:00:45 UTC (rev 156242)
@@ -90,6 +90,31 @@
#endif // ENABLE(DFG_JIT)
+unsigned CallFrame::bytecodeOffset()
+{
+ if (!codeBlock())
+ return 0;
+#if ENABLE(DFG_JIT)
+ if (hasLocationAsCodeOriginIndex())
+ return bytecodeOffsetFromCodeOriginIndex();
+#endif
+ return locationAsBytecodeOffset();
+}
+
+CodeOrigin CallFrame::codeOrigin()
+{
+ if (!codeBlock())
+ return CodeOrigin(0);
+#if ENABLE(DFG_JIT)
+ if (hasLocationAsCodeOriginIndex()) {
+ unsigned index = locationAsCodeOriginIndex();
+ ASSERT(codeBlock()->canGetCodeOrigin(index));
+ return codeBlock()->codeOrigin(index);
+ }
+#endif
+ return CodeOrigin(locationAsBytecodeOffset());
+}
+
Register* CallFrame::frameExtentInternal()
{
CodeBlock* codeBlock = this->codeBlock();
Modified: trunk/Source/_javascript_Core/interpreter/CallFrame.h (156241 => 156242)
--- trunk/Source/_javascript_Core/interpreter/CallFrame.h 2013-09-22 04:15:10 UTC (rev 156241)
+++ trunk/Source/_javascript_Core/interpreter/CallFrame.h 2013-09-22 05:00:45 UTC (rev 156242)
@@ -164,6 +164,17 @@
#if ENABLE(DFG_JIT)
unsigned bytecodeOffsetFromCodeOriginIndex();
#endif
+
+ // This will try to get you the bytecode offset, but you should be aware that
+ // this bytecode offset may be bogus in the presence of inlining. This will
+ // also return 0 if the call frame has no notion of bytecode offsets (for
+ // example if it's native code).
+ // https://bugs.webkit.org/show_bug.cgi?id=121754
+ unsigned bytecodeOffset();
+
+ // This will get you a CodeOrigin. It will always succeed. May return
+ // CodeOrigin(0) if we're in native code.
+ CodeOrigin codeOrigin();
Register* frameExtent()
{
Modified: trunk/Source/_javascript_Core/interpreter/Interpreter.cpp (156241 => 156242)
--- trunk/Source/_javascript_Core/interpreter/Interpreter.cpp 2013-09-22 04:15:10 UTC (rev 156241)
+++ trunk/Source/_javascript_Core/interpreter/Interpreter.cpp 2013-09-22 05:00:45 UTC (rev 156242)
@@ -639,7 +639,7 @@
HandlerInfo*& m_handler;
};
-NEVER_INLINE HandlerInfo* Interpreter::unwind(CallFrame*& callFrame, JSValue& exceptionValue, unsigned bytecodeOffset)
+NEVER_INLINE HandlerInfo* Interpreter::unwind(CallFrame*& callFrame, JSValue& exceptionValue)
{
CodeBlock* codeBlock = callFrame->codeBlock();
bool isTermination = false;
@@ -662,6 +662,11 @@
// We need to clear the exception and the exception stack here in order to see if a new exception happens.
// Afterwards, the values are put back to continue processing this error.
ClearExceptionScope scope(&callFrame->vm());
+ // This code assumes that if the debugger is enabled then there is no inlining.
+ // If that assumption turns out to be false then we'll ignore the inlined call
+ // frames.
+ // https://bugs.webkit.org/show_bug.cgi?id=121754
+ unsigned bytecodeOffset = callFrame->bytecodeOffset();
int line = codeBlock->lineNumberForBytecodeOffset(bytecodeOffset);
int column = codeBlock->columnNumberForBytecodeOffset(bytecodeOffset);
DebuggerCallFrame debuggerCallFrame(callFrame, line, column, exceptionValue);
Modified: trunk/Source/_javascript_Core/interpreter/Interpreter.h (156241 => 156242)
--- trunk/Source/_javascript_Core/interpreter/Interpreter.h 2013-09-22 04:15:10 UTC (rev 156241)
+++ trunk/Source/_javascript_Core/interpreter/Interpreter.h 2013-09-22 05:00:45 UTC (rev 156242)
@@ -238,7 +238,7 @@
bool isInErrorHandlingMode() { return m_errorHandlingModeReentry; }
- NEVER_INLINE HandlerInfo* unwind(CallFrame*&, JSValue&, unsigned bytecodeOffset);
+ NEVER_INLINE HandlerInfo* unwind(CallFrame*&, JSValue&);
NEVER_INLINE void debug(CallFrame*, DebugHookID, int firstLine, int lastLine, int column);
JSString* stackTraceAsString(ExecState*, Vector<StackFrame>);
Modified: trunk/Source/_javascript_Core/jit/JITExceptions.cpp (156241 => 156242)
--- trunk/Source/_javascript_Core/jit/JITExceptions.cpp 2013-09-22 04:15:10 UTC (rev 156241)
+++ trunk/Source/_javascript_Core/jit/JITExceptions.cpp 2013-09-22 05:00:45 UTC (rev 156242)
@@ -38,19 +38,6 @@
namespace JSC {
-static unsigned getExceptionLocation(VM* vm, CallFrame* callFrame)
-{
- UNUSED_PARAM(vm);
- ASSERT(!callFrame->hasHostCallFrameFlag());
-
-#if ENABLE(DFG_JIT)
- if (callFrame->hasLocationAsCodeOriginIndex())
- return callFrame->bytecodeOffsetFromCodeOriginIndex();
-#endif
-
- return callFrame->locationAsBytecodeOffset();
-}
-
#if USE(JSVALUE32_64)
EncodedExceptionHandler encode(ExceptionHandler handler)
{
@@ -67,10 +54,10 @@
return exceptionHandler;
}
-ExceptionHandler genericUnwind(VM* vm, ExecState* callFrame, JSValue exceptionValue, unsigned vPCIndex)
+ExceptionHandler genericUnwind(VM* vm, ExecState* callFrame, JSValue exceptionValue)
{
RELEASE_ASSERT(exceptionValue);
- HandlerInfo* handler = vm->interpreter->unwind(callFrame, exceptionValue, vPCIndex); // This may update callFrame.
+ HandlerInfo* handler = vm->interpreter->unwind(callFrame, exceptionValue); // This may update callFrame.
void* catchRoutine;
Instruction* catchPCForInterpreter = 0;
@@ -89,18 +76,6 @@
return exceptionHandler;
}
-ExceptionHandler jitThrowNew(VM* vm, ExecState* callFrame, JSValue exceptionValue)
-{
- unsigned bytecodeOffset = getExceptionLocation(vm, callFrame);
-
- return genericUnwind(vm, callFrame, exceptionValue, bytecodeOffset);
}
-ExceptionHandler jitThrow(VM* vm, ExecState* callFrame, JSValue exceptionValue, ReturnAddressPtr faultLocation)
-{
- return genericUnwind(vm, callFrame, exceptionValue, callFrame->codeBlock()->bytecodeOffset(callFrame, faultLocation));
-}
-
-}
-
#endif
Modified: trunk/Source/_javascript_Core/jit/JITExceptions.h (156241 => 156242)
--- trunk/Source/_javascript_Core/jit/JITExceptions.h 2013-09-22 04:15:10 UTC (rev 156241)
+++ trunk/Source/_javascript_Core/jit/JITExceptions.h 2013-09-22 05:00:45 UTC (rev 156242)
@@ -58,11 +58,8 @@
#endif
ExceptionHandler uncaughtExceptionHandler();
-ExceptionHandler genericUnwind(VM*, ExecState*, JSValue exceptionValue, unsigned vPCIndex);
+ExceptionHandler genericUnwind(VM*, ExecState*, JSValue exceptionValue);
-ExceptionHandler jitThrowNew(VM*, ExecState*, JSValue exceptionValue);
-ExceptionHandler jitThrow(VM*, ExecState*, JSValue exceptionValue, ReturnAddressPtr faultLocation);
-
} // namespace JSC
#endif // ENABLE(JIT) || ENABLE(LLINT)
Modified: trunk/Source/_javascript_Core/jit/JITStubs.cpp (156241 => 156242)
--- trunk/Source/_javascript_Core/jit/JITStubs.cpp 2013-09-22 04:15:10 UTC (rev 156241)
+++ trunk/Source/_javascript_Core/jit/JITStubs.cpp 2013-09-22 05:00:45 UTC (rev 156242)
@@ -1979,7 +1979,7 @@
{
STUB_INIT_STACK_FRAME(stackFrame);
stackFrame.vm->throwException(stackFrame.callFrame, stackFrame.args[0].jsValue());
- ExceptionHandler handler = jitThrow(stackFrame.vm, stackFrame.callFrame, stackFrame.args[0].jsValue(), STUB_RETURN_ADDRESS);
+ ExceptionHandler handler = genericUnwind(stackFrame.vm, stackFrame.callFrame, stackFrame.args[0].jsValue());
STUB_SET_RETURN_ADDRESS(handler.catchRoutine);
return handler.callFrame;
}
@@ -2158,7 +2158,7 @@
{
STUB_INIT_STACK_FRAME(stackFrame);
VM* vm = stackFrame.vm;
- ExceptionHandler handler = jitThrow(vm, stackFrame.callFrame, vm->exception(), vm->exceptionLocation);
+ ExceptionHandler handler = genericUnwind(vm, stackFrame.callFrame, vm->exception());
STUB_SET_RETURN_ADDRESS(handler.catchRoutine);
return handler.callFrame;
}
@@ -2174,7 +2174,7 @@
VM* vm = callFrame->codeBlock()->vm();
vm->topCallFrame = callFrame;
- return encode(jitThrowNew(vm, callFrame, vm->exception()));
+ return encode(genericUnwind(vm, callFrame, vm->exception()));
}
#else
ExceptionHandler JIT_STUB cti_vm_handle_exception(CallFrame* callFrame)
@@ -2187,7 +2187,7 @@
VM* vm = callFrame->codeBlock()->vm();
vm->topCallFrame = callFrame;
- return jitThrowNew(vm, callFrame, vm->exception());
+ return genericUnwind(vm, callFrame, vm->exception());
}
#endif
Modified: trunk/Source/_javascript_Core/llint/LLIntExceptions.cpp (156241 => 156242)
--- trunk/Source/_javascript_Core/llint/LLIntExceptions.cpp 2013-09-22 04:15:10 UTC (rev 156241)
+++ trunk/Source/_javascript_Core/llint/LLIntExceptions.cpp 2013-09-22 05:00:45 UTC (rev 156242)
@@ -44,30 +44,30 @@
return LLInt::exceptionInstructions();
}
-static void doThrow(ExecState* exec, Instruction* pc)
+static void doThrow(ExecState* exec)
{
VM* vm = &exec->vm();
NativeCallFrameTracer tracer(vm, exec);
- genericUnwind(vm, exec, vm->exception(), pc - exec->codeBlock()->instructions().begin());
+ genericUnwind(vm, exec, vm->exception());
}
-Instruction* returnToThrow(ExecState* exec, Instruction* pc)
+Instruction* returnToThrow(ExecState* exec)
{
#if LLINT_SLOW_PATH_TRACING
VM* vm = &exec->vm();
dataLog("Throwing exception ", vm->exception(), " (returnToThrow).\n");
#endif
- doThrow(exec, pc);
+ doThrow(exec);
return LLInt::exceptionInstructions();
}
-void* callToThrow(ExecState* exec, Instruction* pc)
+void* callToThrow(ExecState* exec)
{
#if LLINT_SLOW_PATH_TRACING
VM* vm = &exec->vm();
dataLog("Throwing exception ", vm->exception(), " (callToThrow).\n");
#endif
- doThrow(exec, pc);
+ doThrow(exec);
return LLInt::getCodePtr(llint_throw_during_call_trampoline);
}
Modified: trunk/Source/_javascript_Core/llint/LLIntExceptions.h (156241 => 156242)
--- trunk/Source/_javascript_Core/llint/LLIntExceptions.h 2013-09-22 04:15:10 UTC (rev 156241)
+++ trunk/Source/_javascript_Core/llint/LLIntExceptions.h 2013-09-22 05:00:45 UTC (rev 156242)
@@ -44,17 +44,13 @@
// set up all information needed to throw the exception.
Instruction* returnToThrowForThrownException(ExecState*);
-// Saves the current PC in the global data for safe-keeping, and gives you a PC
-// that you can tell the interpreter to go to, which when advanced between 1
-// and 9 slots will give you an "instruction" that threads to the interpreter's
-// exception handler. Note that if you give it the PC for exception handling,
-// it's smart enough to just return that PC without doing anything else; this
-// lets you thread exception handling through common helper functions used by
-// other helpers.
-Instruction* returnToThrow(ExecState*, Instruction*);
+// Gives you a PC that you can tell the interpreter to go to, which when advanced
+// between 1 and 9 slots will give you an "instruction" that threads to the
+// interpreter's exception handler.
+Instruction* returnToThrow(ExecState*);
// Use this when you're throwing to a call thunk.
-void* callToThrow(ExecState*, Instruction*);
+void* callToThrow(ExecState*);
} } // namespace JSC::LLInt
Modified: trunk/Source/_javascript_Core/llint/LLIntSlowPaths.cpp (156241 => 156242)
--- trunk/Source/_javascript_Core/llint/LLIntSlowPaths.cpp 2013-09-22 04:15:10 UTC (rev 156241)
+++ trunk/Source/_javascript_Core/llint/LLIntSlowPaths.cpp 2013-09-22 05:00:45 UTC (rev 156242)
@@ -83,14 +83,14 @@
#define LLINT_END_IMPL() LLINT_RETURN_TWO(pc, exec)
#define LLINT_THROW(exceptionToThrow) do { \
- vm.throwException(exec, exceptionToThrow); \
- pc = returnToThrow(exec, pc); \
+ vm.throwException(exec, exceptionToThrow); \
+ pc = returnToThrow(exec); \
LLINT_END_IMPL(); \
} while (false)
#define LLINT_CHECK_EXCEPTION() do { \
- if (UNLIKELY(vm.exception())) { \
- pc = returnToThrow(exec, pc); \
+ if (UNLIKELY(vm.exception())) { \
+ pc = returnToThrow(exec); \
LLINT_END_IMPL(); \
} \
} while (false)
@@ -142,23 +142,20 @@
#define LLINT_CALL_THROW(exec, pc, exceptionToThrow) do { \
ExecState* __ct_exec = (exec); \
- Instruction* __ct_pc = (pc); \
- vm.throwException(__ct_exec, exceptionToThrow); \
- LLINT_CALL_END_IMPL(__ct_exec, callToThrow(__ct_exec, __ct_pc)); \
+ vm.throwException(__ct_exec, exceptionToThrow); \
+ LLINT_CALL_END_IMPL(__ct_exec, callToThrow(__ct_exec)); \
} while (false)
-#define LLINT_CALL_CHECK_EXCEPTION(exec, pc) do { \
+#define LLINT_CALL_CHECK_EXCEPTION(exec) do { \
ExecState* __cce_exec = (exec); \
- Instruction* __cce_pc = (pc); \
- if (UNLIKELY(vm.exception())) \
- LLINT_CALL_END_IMPL(__cce_exec, callToThrow(__cce_exec, __cce_pc)); \
+ if (UNLIKELY(vm.exception())) \
+ LLINT_CALL_END_IMPL(__cce_exec, callToThrow(__cce_exec)); \
} while (false)
#define LLINT_CALL_RETURN(exec, pc, callTarget) do { \
ExecState* __cr_exec = (exec); \
- Instruction* __cr_pc = (pc); \
void* __cr_callTarget = (callTarget); \
- LLINT_CALL_CHECK_EXCEPTION(__cr_exec->callerFrame(), __cr_pc); \
+ LLINT_CALL_CHECK_EXCEPTION(__cr_exec->callerFrame()); \
LLINT_CALL_END_IMPL(__cr_exec, __cr_callTarget); \
} while (false)
@@ -431,9 +428,8 @@
#endif
ASSERT(!exec->vm().interpreter->stack().containsAddress(&exec->registers()[-exec->codeBlock()->m_numCalleeRegisters]));
if (UNLIKELY(!vm.interpreter->stack().grow(&exec->registers()[-exec->codeBlock()->m_numCalleeRegisters]))) {
- ReturnAddressPtr returnPC = exec->returnPC();
exec = exec->callerFrame();
- CommonSlowPaths::interpreterThrowInCaller(exec, returnPC, createStackOverflowError(exec));
+ CommonSlowPaths::interpreterThrowInCaller(exec, createStackOverflowError(exec));
pc = returnToThrowForThrownException(exec);
}
LLINT_END_IMPL();
@@ -1089,7 +1085,7 @@
ExecState* execCallee = loadVarargs(
exec, &vm.interpreter->stack(),
LLINT_OP_C(3).jsValue(), LLINT_OP_C(4).jsValue(), pc[5].u.operand);
- LLINT_CALL_CHECK_EXCEPTION(exec, pc);
+ LLINT_CALL_CHECK_EXCEPTION(exec);
execCallee->uncheckedR(JSStack::Callee) = calleeAsValue;
execCallee->setCallerFrame(exec);
Modified: trunk/Source/_javascript_Core/runtime/CommonSlowPaths.cpp (156241 => 156242)
--- trunk/Source/_javascript_Core/runtime/CommonSlowPaths.cpp 2013-09-22 04:15:10 UTC (rev 156241)
+++ trunk/Source/_javascript_Core/runtime/CommonSlowPaths.cpp 2013-09-22 05:00:45 UTC (rev 156242)
@@ -71,7 +71,7 @@
#endif
#if ENABLE(LLINT)
-#define RETURN_TO_THROW(exec, pc) pc = LLInt::returnToThrow(exec, pc)
+#define RETURN_TO_THROW(exec, pc) pc = LLInt::returnToThrow(exec)
#else
#define RETURN_TO_THROW(exec, pc)
#endif
@@ -125,12 +125,12 @@
} while (false)
#if ENABLE(VALUE_PROFILER)
-#define RETURN_PROFILED(opcode, value) do { \
+#define RETURN_PROFILED(opcode, value) do { \
JSValue rpPeturnValue = (value); \
- CHECK_EXCEPTION(); \
- OP(1) = rpPeturnValue; \
- PROFILE_VALUE(opcode, rpPeturnValue); \
- END_IMPL(); \
+ CHECK_EXCEPTION(); \
+ OP(1) = rpPeturnValue; \
+ PROFILE_VALUE(opcode, rpPeturnValue); \
+ END_IMPL(); \
} while (false)
#define PROFILE_VALUE(opcode, value) do { \
@@ -147,18 +147,18 @@
#define CALL_END_IMPL(exec, callTarget) RETURN_TWO((callTarget), (exec))
-#define CALL_THROW(exec, pc, exceptionToThrow) do { \
- ExecState* ctExec = (exec); \
- Instruction* ctPC = (pc); \
+#define CALL_THROW(exec, pc, exceptionToThrow) do { \
+ ExecState* ctExec = (exec); \
+ Instruction* ctPC = (pc); \
vm.throwException(exec, exceptionToThrow); \
- CALL_END_IMPL(ctExec, LLInt::callToThrow(ctExec, ctPC)); \
+ CALL_END_IMPL(ctExec, LLInt::callToThrow(ctExec)); \
} while (false)
-#define CALL_CHECK_EXCEPTION(exec, pc) do { \
+#define CALL_CHECK_EXCEPTION(exec, pc) do { \
ExecState* cceExec = (exec); \
Instruction* ccePC = (pc); \
- if (UNLIKELY(vm.exception())) \
- CALL_END_IMPL(cceExec, LLInt::callToThrow(cceExec, ccePC)); \
+ if (UNLIKELY(vm.exception())) \
+ CALL_END_IMPL(cceExec, LLInt::callToThrow(cceExec)); \
} while (false)
#define CALL_RETURN(exec, pc, callTarget) do { \
@@ -174,9 +174,8 @@
BEGIN();
int SlotsToAdd = CommonSlowPaths::arityCheckFor(exec, &vm.interpreter->stack(), CodeForCall);
if (SlotsToAdd < 0) {
- ReturnAddressPtr returnPC = exec->returnPC();
exec = exec->callerFrame();
- CommonSlowPaths::interpreterThrowInCaller(exec, returnPC, createStackOverflowError(exec));
+ CommonSlowPaths::interpreterThrowInCaller(exec, createStackOverflowError(exec));
RETURN_TWO(bitwise_cast<void*>(static_cast<uintptr_t>(1)), exec);
}
RETURN_TWO(0, reinterpret_cast<ExecState*>(SlotsToAdd));
@@ -187,9 +186,8 @@
BEGIN();
int SlotsToAdd = CommonSlowPaths::arityCheckFor(exec, &vm.interpreter->stack(), CodeForConstruct);
if (SlotsToAdd < 0) {
- ReturnAddressPtr returnPC = exec->returnPC();
exec = exec->callerFrame();
- CommonSlowPaths::interpreterThrowInCaller(exec, returnPC, createStackOverflowError(exec));
+ CommonSlowPaths::interpreterThrowInCaller(exec, createStackOverflowError(exec));
RETURN_TWO(bitwise_cast<void*>(static_cast<uintptr_t>(1)), exec);
}
RETURN_TWO(0, reinterpret_cast<ExecState*>(SlotsToAdd));
Modified: trunk/Source/_javascript_Core/runtime/CommonSlowPathsExceptions.cpp (156241 => 156242)
--- trunk/Source/_javascript_Core/runtime/CommonSlowPathsExceptions.cpp 2013-09-22 04:15:10 UTC (rev 156241)
+++ trunk/Source/_javascript_Core/runtime/CommonSlowPathsExceptions.cpp 2013-09-22 05:00:45 UTC (rev 156242)
@@ -33,7 +33,7 @@
namespace JSC { namespace CommonSlowPaths {
-void interpreterThrowInCaller(ExecState* exec, ReturnAddressPtr pc, JSObject* error)
+void interpreterThrowInCaller(ExecState* exec, JSObject* error)
{
VM* vm = &exec->vm();
NativeCallFrameTracer tracer(vm, exec);
@@ -41,9 +41,7 @@
#if LLINT_SLOW_PATH_TRACING
dataLog("Throwing exception ", vm->exception(), ".\n");
#endif
- genericUnwind(
- vm, exec, vm->exception(),
- exec->codeBlock()->bytecodeOffset(exec, pc));
+ genericUnwind(vm, exec, vm->exception());
}
} } // namespace JSC::LLInt
Modified: trunk/Source/_javascript_Core/runtime/CommonSlowPathsExceptions.h (156241 => 156242)
--- trunk/Source/_javascript_Core/runtime/CommonSlowPathsExceptions.h 2013-09-22 04:15:10 UTC (rev 156241)
+++ trunk/Source/_javascript_Core/runtime/CommonSlowPathsExceptions.h 2013-09-22 05:00:45 UTC (rev 156242)
@@ -37,7 +37,7 @@
namespace CommonSlowPaths {
// Throw the currently active exception in the context of the caller's call frame.
-void interpreterThrowInCaller(ExecState* callerFrame, ReturnAddressPtr, JSObject*);
+void interpreterThrowInCaller(ExecState* callerFrame, JSObject*);
} } // namespace JSC::CommonSlowPaths