Title: [187678] branches/jsc-tailcall/Source/_javascript_Core
Revision
187678
Author
[email protected]
Date
2015-07-31 13:36:19 -0700 (Fri, 31 Jul 2015)

Log Message

jsc-tailcall: Emit a single callee-save restoration for fast and slow tail call paths
https://bugs.webkit.org/show_bug.cgi?id=147501

Reviewed by Michael Saboff.

We are currently emitting this twice for no reason.

* jit/JITCall.cpp:
(JSC::JIT::compileOpCall):
* jit/JITCall32_64.cpp:
(JSC::JIT::compileOpCall):

Modified Paths

Diff

Modified: branches/jsc-tailcall/Source/_javascript_Core/ChangeLog (187677 => 187678)


--- branches/jsc-tailcall/Source/_javascript_Core/ChangeLog	2015-07-31 20:34:50 UTC (rev 187677)
+++ branches/jsc-tailcall/Source/_javascript_Core/ChangeLog	2015-07-31 20:36:19 UTC (rev 187678)
@@ -1,5 +1,19 @@
 2015-07-31  Basile Clement  <[email protected]>
 
+        jsc-tailcall: Emit a single callee-save restoration for fast and slow tail call paths
+        https://bugs.webkit.org/show_bug.cgi?id=147501
+
+        Reviewed by Michael Saboff.
+
+        We are currently emitting this twice for no reason.
+
+        * jit/JITCall.cpp:
+        (JSC::JIT::compileOpCall):
+        * jit/JITCall32_64.cpp:
+        (JSC::JIT::compileOpCall):
+
+2015-07-31  Basile Clement  <[email protected]>
+
         jsc-tailcall: Don't waste stack space when arity fixup was performed
         https://bugs.webkit.org/show_bug.cgi?id=147447
 

Modified: branches/jsc-tailcall/Source/_javascript_Core/jit/JITCall.cpp (187677 => 187678)


--- branches/jsc-tailcall/Source/_javascript_Core/jit/JITCall.cpp	2015-07-31 20:34:50 UTC (rev 187677)
+++ branches/jsc-tailcall/Source/_javascript_Core/jit/JITCall.cpp	2015-07-31 20:36:19 UTC (rev 187678)
@@ -181,6 +181,9 @@
         return;
     }
 
+    if (opcodeID == op_tail_call || opcodeID == op_tail_call_varargs)
+        emitRestoreCalleeSaves();
+
     DataLabelPtr addressOfLinkedFunctionCheck;
     Jump slowCase = branchPtrWithPatch(NotEqual, regT0, addressOfLinkedFunctionCheck, TrustedImmPtr(0));
     addSlowCase(slowCase);
@@ -192,7 +195,6 @@
     m_callCompilationInfo[callLinkInfoIndex].callLinkInfo = info;
 
     if (opcodeID == op_tail_call || opcodeID == op_tail_call_varargs) {
-        emitRestoreCalleeSaves();
         prepareForTailCallSlow();
         m_callCompilationInfo[callLinkInfoIndex].hotPathOther = emitNakedTailCall();
         // We must never come back here
@@ -221,9 +223,6 @@
 
     move(TrustedImmPtr(m_callCompilationInfo[callLinkInfoIndex].callLinkInfo), regT2);
 
-    if (opcodeID == op_tail_call || opcodeID == op_tail_call_varargs)
-        emitRestoreCalleeSaves();
-
     m_callCompilationInfo[callLinkInfoIndex].callReturnLocation = emitNakedCall(m_vm->getCTIStub(linkCallThunkGenerator).code());
 
     if (opcodeID == op_tail_call || opcodeID == op_tail_call_varargs) {

Modified: branches/jsc-tailcall/Source/_javascript_Core/jit/JITCall32_64.cpp (187677 => 187678)


--- branches/jsc-tailcall/Source/_javascript_Core/jit/JITCall32_64.cpp	2015-07-31 20:34:50 UTC (rev 187677)
+++ branches/jsc-tailcall/Source/_javascript_Core/jit/JITCall32_64.cpp	2015-07-31 20:36:19 UTC (rev 187678)
@@ -262,6 +262,9 @@
         return;
     }
 
+    if (opcodeID == op_tail_call || opcodeID == op_tail_call_varargs)
+        emitRestoreCalleeSaves();
+
     addSlowCase(branch32(NotEqual, regT1, TrustedImm32(JSValue::CellTag)));
 
     DataLabelPtr addressOfLinkedFunctionCheck;
@@ -277,7 +280,6 @@
 
     checkStackPointerAlignment();
     if (opcodeID == op_tail_call || opcodeID == op_tail_call_varargs) {
-        emitRestoreCalleeSaves();
         prepareForTailCallSlow();
         m_callCompilationInfo[callLinkInfoIndex].hotPathOther = emitNakedTailCall();
         // We must never come back here
@@ -306,9 +308,6 @@
 
     move(TrustedImmPtr(m_callCompilationInfo[callLinkInfoIndex].callLinkInfo), regT2);
 
-    if (opcodeID == op_tail_call || opcodeID == op_tail_call_varargs)
-        emitRestoreCalleeSaves();
-
     m_callCompilationInfo[callLinkInfoIndex].callReturnLocation = emitNakedCall(m_vm->getCTIStub(linkCallThunkGenerator).code());
 
     if (opcodeID == op_tail_call || opcodeID == op_tail_call_varargs) {
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to