- Revision
- 160815
- Author
- [email protected]
- Date
- 2013-12-18 18:21:33 -0800 (Wed, 18 Dec 2013)
Log Message
CStack Branch: Stop threading callFrameRegister through LLIntSlowCalls
https://bugs.webkit.org/show_bug.cgi?id=125964
Reviewed by Geoffrey Garen.
Removed the general restoring of the call frame registers (cfr) after the return
from a LLInt slow calls. In most cases, the "exec" value of the LLInt slow
path return pair is set to 0. For llint_slow_path_call/construct and
llint_slow_path_size_and_alloc_frame_for_varargs the execCallee is returned in
the "exec" value. When an exception happens in a slow path handler we return 0,
because the llint_throw_from_slow_path_trampoline path will properly unwind by
making a slow call that will invoke genericUnwind() to do the real unwinding.
* llint/LLIntSlowPaths.cpp:
(JSC::LLInt::LLINT_SLOW_PATH_DECL):
* llint/LowLevelInterpreter.asm:
* llint/LowLevelInterpreter64.asm:
Modified Paths
Diff
Modified: branches/jsCStack/Source/_javascript_Core/ChangeLog (160814 => 160815)
--- branches/jsCStack/Source/_javascript_Core/ChangeLog 2013-12-19 01:55:46 UTC (rev 160814)
+++ branches/jsCStack/Source/_javascript_Core/ChangeLog 2013-12-19 02:21:33 UTC (rev 160815)
@@ -1,3 +1,23 @@
+2013-12-18 Michael Saboff <[email protected]>
+
+ CStack Branch: Stop threading callFrameRegister through LLIntSlowCalls
+ https://bugs.webkit.org/show_bug.cgi?id=125964
+
+ Reviewed by Geoffrey Garen.
+
+ Removed the general restoring of the call frame registers (cfr) after the return
+ from a LLInt slow calls. In most cases, the "exec" value of the LLInt slow
+ path return pair is set to 0. For llint_slow_path_call/construct and
+ llint_slow_path_size_and_alloc_frame_for_varargs the execCallee is returned in
+ the "exec" value. When an exception happens in a slow path handler we return 0,
+ because the llint_throw_from_slow_path_trampoline path will properly unwind by
+ making a slow call that will invoke genericUnwind() to do the real unwinding.
+
+ * llint/LLIntSlowPaths.cpp:
+ (JSC::LLInt::LLINT_SLOW_PATH_DECL):
+ * llint/LowLevelInterpreter.asm:
+ * llint/LowLevelInterpreter64.asm:
+
2013-12-18 Mark Lam <[email protected]>
CStack: Fix LLINT to baseline JIT OSR.
Modified: branches/jsCStack/Source/_javascript_Core/llint/LLIntSlowPaths.cpp (160814 => 160815)
--- branches/jsCStack/Source/_javascript_Core/llint/LLIntSlowPaths.cpp 2013-12-19 01:55:46 UTC (rev 160814)
+++ branches/jsCStack/Source/_javascript_Core/llint/LLIntSlowPaths.cpp 2013-12-19 02:21:33 UTC (rev 160815)
@@ -82,7 +82,7 @@
return encodeResult(first, second); \
} while (false)
-#define LLINT_END_IMPL() LLINT_RETURN_TWO(pc, exec)
+#define LLINT_END_IMPL() LLINT_RETURN_TWO(pc, 0)
#define LLINT_THROW(exceptionToThrow) do { \
vm.throwException(exec, exceptionToThrow); \
@@ -145,22 +145,28 @@
#define LLINT_CALL_THROW(exec, exceptionToThrow) do { \
ExecState* __ct_exec = (exec); \
vm.throwException(__ct_exec, exceptionToThrow); \
- LLINT_CALL_END_IMPL(__ct_exec, callToThrow(__ct_exec)); \
+ LLINT_CALL_END_IMPL(0, callToThrow(__ct_exec)); \
} while (false)
#define LLINT_CALL_CHECK_EXCEPTION(exec) do { \
ExecState* __cce_exec = (exec); \
if (UNLIKELY(vm.exception())) \
- LLINT_CALL_END_IMPL(__cce_exec, callToThrow(__cce_exec)); \
+ LLINT_CALL_END_IMPL(0, callToThrow(__cce_exec)); \
} while (false)
#define LLINT_CALL_RETURN(exec, callTarget) do { \
ExecState* __cr_exec = (exec); \
void* __cr_callTarget = (callTarget); \
- LLINT_CALL_CHECK_EXCEPTION(__cr_exec); \
+ LLINT_CALL_CHECK_EXCEPTION(__cr_exec); \
LLINT_CALL_END_IMPL(__cr_exec, __cr_callTarget); \
} while (false)
+#define LLINT_RETURN_CALLEE_FRAME(execCallee) do { \
+ ExecState* __rcf_exec = (execCallee); \
+ LLINT_RETURN_TWO(pc, __rcf_exec); \
+ } while (false)
+
+
extern "C" SlowPathReturnType llint_trace_operand(ExecState* exec, Instruction* pc, int fromWhere, int operand)
{
LLINT_BEGIN();
@@ -1117,7 +1123,7 @@
vm.newCallFrameReturnValue = execCallee;
- LLINT_END();
+ LLINT_RETURN_CALLEE_FRAME(execCallee);
}
LLINT_SLOW_PATH_DECL(slow_path_call_varargs)
Modified: branches/jsCStack/Source/_javascript_Core/llint/LowLevelInterpreter.asm (160814 => 160815)
--- branches/jsCStack/Source/_javascript_Core/llint/LowLevelInterpreter.asm 2013-12-19 01:55:46 UTC (rev 160814)
+++ branches/jsCStack/Source/_javascript_Core/llint/LowLevelInterpreter.asm 2013-12-19 02:21:33 UTC (rev 160815)
@@ -290,7 +290,9 @@
if C_LOOP
cloopCallJSFunction callee
else
+ btpz t1, .dontUpdateSP
addp CallerFrameAndPCSize, t1, sp
+ .dontUpdateSP:
call callee
restoreStackPointerAfterCall()
dispatchAfterCall()
@@ -798,10 +800,8 @@
traceExecution()
callSlowPath(_llint_slow_path_size_and_alloc_frame_for_varargs)
branchIfException(_llint_throw_from_slow_path_trampoline)
- loadp CodeBlock[cfr], t0
- loadp CodeBlock::m_vm[t0], t0
- loadp VM::newCallFrameReturnValue[t0], t0
- move t0, sp
+ # calleeFrame in t1
+ move t1, sp
slowPathForCall(_llint_slow_path_call_varargs)
Modified: branches/jsCStack/Source/_javascript_Core/llint/LowLevelInterpreter64.asm (160814 => 160815)
--- branches/jsCStack/Source/_javascript_Core/llint/LowLevelInterpreter64.asm 2013-12-19 01:55:46 UTC (rev 160814)
+++ branches/jsCStack/Source/_javascript_Core/llint/LowLevelInterpreter64.asm 2013-12-19 02:21:33 UTC (rev 160815)
@@ -300,7 +300,6 @@
macro restoreStateAfterCCall()
move t0, PC
- move t1, cfr
move t3, PB
subp PB, PC
rshiftp 3, PC
@@ -336,7 +335,6 @@
storei PC, ArgumentCount + TagOffset[cfr]
prepareStateForCCall()
cCall2(_llint_slow_path_handle_watchdog_timer, cfr, PC)
- move t1, cfr
btpnz t0, throwHandler
move t3, PB
loadi ArgumentCount + TagOffset[cfr], PC