Title: [209708] trunk/Source/_javascript_Core
Revision
209708
Author
[email protected]
Date
2016-12-12 09:10:30 -0800 (Mon, 12 Dec 2016)

Log Message

FTL: Dumping disassembly requires that code origin is set when making polymorphic tail calls.
https://bugs.webkit.org/show_bug.cgi?id=165747

Reviewed by Filip Pizlo.

Setting the code origin needs to be done for both the fast and slow path as we might need
it when linking a polymorphic or virtual call stub.

* ftl/FTLLowerDFGToB3.cpp:
(JSC::FTL::DFG::LowerDFGToB3::compileTailCall):

Modified Paths

Diff

Modified: trunk/Source/_javascript_Core/ChangeLog (209707 => 209708)


--- trunk/Source/_javascript_Core/ChangeLog	2016-12-12 16:17:13 UTC (rev 209707)
+++ trunk/Source/_javascript_Core/ChangeLog	2016-12-12 17:10:30 UTC (rev 209708)
@@ -1,3 +1,16 @@
+2016-12-12  Michael Saboff  <[email protected]>
+
+        FTL: Dumping disassembly requires that code origin is set when making polymorphic tail calls.
+        https://bugs.webkit.org/show_bug.cgi?id=165747
+
+        Reviewed by Filip Pizlo.
+
+        Setting the code origin needs to be done for both the fast and slow path as we might need
+        it when linking a polymorphic or virtual call stub.
+
+        * ftl/FTLLowerDFGToB3.cpp:
+        (JSC::FTL::DFG::LowerDFGToB3::compileTailCall):
+
 2016-12-11  Saam Barati  <[email protected]>
 
         Unreviewed. Try to fix the linux build.

Modified: trunk/Source/_javascript_Core/ftl/FTLLowerDFGToB3.cpp (209707 => 209708)


--- trunk/Source/_javascript_Core/ftl/FTLLowerDFGToB3.cpp	2016-12-12 16:17:13 UTC (rev 209707)
+++ trunk/Source/_javascript_Core/ftl/FTLLowerDFGToB3.cpp	2016-12-12 17:10:30 UTC (rev 209708)
@@ -6144,6 +6144,13 @@
                 AllowMacroScratchRegisterUsage allowScratch(jit);
                 CallSiteIndex callSiteIndex = state->jitCode->common.addUniqueCallSiteIndex(codeOrigin);
 
+                // Yes, this is really necessary. You could throw an exception in a host call on the
+                // slow path. That'll route us to lookupExceptionHandler(), which unwinds starting
+                // with the call site index of our frame. Bad things happen if it's not set.
+                jit.store32(
+                    CCallHelpers::TrustedImm32(callSiteIndex.bits()),
+                    CCallHelpers::tagFor(VirtualRegister(CallFrameSlot::argumentCount)));
+
                 CallFrameShuffleData shuffleData;
                 shuffleData.numLocals = state->jitCode->common.frameRegisterCount;
                 shuffleData.callee = ValueRecovery::inGPR(GPRInfo::regT0, DataFormatJS);
@@ -6167,13 +6174,6 @@
 
                 slowPath.link(&jit);
 
-                // Yes, this is really necessary. You could throw an exception in a host call on the
-                // slow path. That'll route us to lookupExceptionHandler(), which unwinds starting
-                // with the call site index of our frame. Bad things happen if it's not set.
-                jit.store32(
-                    CCallHelpers::TrustedImm32(callSiteIndex.bits()),
-                    CCallHelpers::tagFor(VirtualRegister(CallFrameSlot::argumentCount)));
-
                 CallFrameShuffler slowPathShuffler(jit, shuffleData);
                 slowPathShuffler.setCalleeJSValueRegs(JSValueRegs(GPRInfo::regT0));
                 slowPathShuffler.prepareForSlowPath();
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to