Title: [198570] trunk/Source/_javascript_Core
Revision
198570
Author
[email protected]
Date
2016-03-22 18:38:49 -0700 (Tue, 22 Mar 2016)

Log Message

We should FTL compile code when the debugger is enabled
https://bugs.webkit.org/show_bug.cgi?id=155740

Reviewed by Oliver Hunt.

There was no fundamental reason why we didn't support debugging
with the FTL. It looks like this was just an oversight. We had
a Breakpoint node in the DFG that amounted to a nop. By removing
this node, we now support debugging in the FTL. Anytime a breakpoint
is set, we will jettison any DFG/FTL CodeBlocks that contain the breakpoint
that was set.

* dfg/DFGAbstractInterpreterInlines.h:
(JSC::DFG::AbstractInterpreter<AbstractStateType>::executeEffects):
* dfg/DFGByteCodeParser.cpp:
(JSC::DFG::ByteCodeParser::parseBlock):
* dfg/DFGClobberize.h:
(JSC::DFG::clobberize):
* dfg/DFGDoesGC.cpp:
(JSC::DFG::doesGC):
* dfg/DFGFixupPhase.cpp:
(JSC::DFG::FixupPhase::fixupNode):
* dfg/DFGNodeType.h:
* dfg/DFGPredictionPropagationPhase.cpp:
(JSC::DFG::PredictionPropagationPhase::propagate):
* dfg/DFGSafeToExecute.h:
(JSC::DFG::safeToExecute):
* dfg/DFGSpeculativeJIT32_64.cpp:
(JSC::DFG::SpeculativeJIT::compile):
* dfg/DFGSpeculativeJIT64.cpp:
(JSC::DFG::SpeculativeJIT::compile):

Modified Paths

Diff

Modified: trunk/Source/_javascript_Core/ChangeLog (198569 => 198570)


--- trunk/Source/_javascript_Core/ChangeLog	2016-03-23 01:19:59 UTC (rev 198569)
+++ trunk/Source/_javascript_Core/ChangeLog	2016-03-23 01:38:49 UTC (rev 198570)
@@ -1,3 +1,37 @@
+2016-03-22  Saam Barati  <[email protected]>
+
+        We should FTL compile code when the debugger is enabled
+        https://bugs.webkit.org/show_bug.cgi?id=155740
+
+        Reviewed by Oliver Hunt.
+
+        There was no fundamental reason why we didn't support debugging
+        with the FTL. It looks like this was just an oversight. We had
+        a Breakpoint node in the DFG that amounted to a nop. By removing
+        this node, we now support debugging in the FTL. Anytime a breakpoint
+        is set, we will jettison any DFG/FTL CodeBlocks that contain the breakpoint
+        that was set.
+
+        * dfg/DFGAbstractInterpreterInlines.h:
+        (JSC::DFG::AbstractInterpreter<AbstractStateType>::executeEffects):
+        * dfg/DFGByteCodeParser.cpp:
+        (JSC::DFG::ByteCodeParser::parseBlock):
+        * dfg/DFGClobberize.h:
+        (JSC::DFG::clobberize):
+        * dfg/DFGDoesGC.cpp:
+        (JSC::DFG::doesGC):
+        * dfg/DFGFixupPhase.cpp:
+        (JSC::DFG::FixupPhase::fixupNode):
+        * dfg/DFGNodeType.h:
+        * dfg/DFGPredictionPropagationPhase.cpp:
+        (JSC::DFG::PredictionPropagationPhase::propagate):
+        * dfg/DFGSafeToExecute.h:
+        (JSC::DFG::safeToExecute):
+        * dfg/DFGSpeculativeJIT32_64.cpp:
+        (JSC::DFG::SpeculativeJIT::compile):
+        * dfg/DFGSpeculativeJIT64.cpp:
+        (JSC::DFG::SpeculativeJIT::compile):
+
 2016-03-22  Keith Miller  <[email protected]>
 
         REGRESSION(r197543): Use-after-free on storage/indexeddb/transaction-abort-private.html

Modified: trunk/Source/_javascript_Core/dfg/DFGAbstractInterpreterInlines.h (198569 => 198570)


--- trunk/Source/_javascript_Core/dfg/DFGAbstractInterpreterInlines.h	2016-03-23 01:19:59 UTC (rev 198569)
+++ trunk/Source/_javascript_Core/dfg/DFGAbstractInterpreterInlines.h	2016-03-23 01:38:49 UTC (rev 198570)
@@ -2624,7 +2624,6 @@
     case CheckWatchdogTimer:
         break;
 
-    case Breakpoint:
     case ProfileWillCall:
     case ProfileDidCall:
     case ProfileType:

Modified: trunk/Source/_javascript_Core/dfg/DFGByteCodeParser.cpp (198569 => 198570)


--- trunk/Source/_javascript_Core/dfg/DFGByteCodeParser.cpp	2016-03-23 01:19:59 UTC (rev 198569)
+++ trunk/Source/_javascript_Core/dfg/DFGByteCodeParser.cpp	2016-03-23 01:38:49 UTC (rev 198570)
@@ -3517,9 +3517,12 @@
 
         // === Misc operations ===
 
-        case op_debug:
-            addToGraph(Breakpoint);
+        case op_debug: {
+            // This is a nop in the DFG/FTL because when we set a breakpoint in the debugger,
+            // we will jettison all optimized CodeBlocks that contains the breakpoint.
+            addToGraph(Check); // We add a nop here so that basic block linking doesn't break.
             NEXT_OPCODE(op_debug);
+        }
 
         case op_profile_will_call: {
             addToGraph(ProfileWillCall);

Modified: trunk/Source/_javascript_Core/dfg/DFGClobberize.h (198569 => 198570)


--- trunk/Source/_javascript_Core/dfg/DFGClobberize.h	2016-03-23 01:19:59 UTC (rev 198569)
+++ trunk/Source/_javascript_Core/dfg/DFGClobberize.h	2016-03-23 01:38:49 UTC (rev 198570)
@@ -344,7 +344,6 @@
     case CheckTierUpAtReturn:
     case CheckTierUpAndOSREnter:
     case LoopHint:
-    case Breakpoint:
     case ProfileWillCall:
     case ProfileDidCall:
     case ProfileType:

Modified: trunk/Source/_javascript_Core/dfg/DFGDoesGC.cpp (198569 => 198570)


--- trunk/Source/_javascript_Core/dfg/DFGDoesGC.cpp	2016-03-23 01:19:59 UTC (rev 198569)
+++ trunk/Source/_javascript_Core/dfg/DFGDoesGC.cpp	2016-03-23 01:38:49 UTC (rev 198570)
@@ -142,7 +142,6 @@
     case ConstructForwardVarargs:
     case TailCallForwardVarargs:
     case TailCallForwardVarargsInlinedCaller:
-    case Breakpoint:
     case ProfileWillCall:
     case ProfileDidCall:
     case ProfileType:

Modified: trunk/Source/_javascript_Core/dfg/DFGFixupPhase.cpp (198569 => 198570)


--- trunk/Source/_javascript_Core/dfg/DFGFixupPhase.cpp	2016-03-23 01:19:59 UTC (rev 198569)
+++ trunk/Source/_javascript_Core/dfg/DFGFixupPhase.cpp	2016-03-23 01:38:49 UTC (rev 198570)
@@ -1486,7 +1486,6 @@
         case NewObject:
         case NewArrayBuffer:
         case NewRegexp:
-        case Breakpoint:
         case ProfileWillCall:
         case ProfileDidCall:
         case IsUndefined:

Modified: trunk/Source/_javascript_Core/dfg/DFGNodeType.h (198569 => 198570)


--- trunk/Source/_javascript_Core/dfg/DFGNodeType.h	2016-03-23 01:19:59 UTC (rev 198569)
+++ trunk/Source/_javascript_Core/dfg/DFGNodeType.h	2016-03-23 01:38:49 UTC (rev 198570)
@@ -285,7 +285,6 @@
     macro(MaterializeCreateActivation, NodeResultJS | NodeHasVarArgs) \
     \
     /* Nodes for misc operations. */\
-    macro(Breakpoint, NodeMustGenerate) \
     macro(ProfileWillCall, NodeMustGenerate) \
     macro(ProfileDidCall, NodeMustGenerate) \
     macro(OverridesHasInstance, NodeMustGenerate | NodeResultBoolean) \

Modified: trunk/Source/_javascript_Core/dfg/DFGPredictionPropagationPhase.cpp (198569 => 198570)


--- trunk/Source/_javascript_Core/dfg/DFGPredictionPropagationPhase.cpp	2016-03-23 01:19:59 UTC (rev 198569)
+++ trunk/Source/_javascript_Core/dfg/DFGPredictionPropagationPhase.cpp	2016-03-23 01:38:49 UTC (rev 198570)
@@ -744,7 +744,6 @@
         case DFG::Jump:
         case Branch:
         case Switch:
-        case Breakpoint:
         case ProfileWillCall:
         case ProfileDidCall:
         case ProfileType:

Modified: trunk/Source/_javascript_Core/dfg/DFGSafeToExecute.h (198569 => 198570)


--- trunk/Source/_javascript_Core/dfg/DFGSafeToExecute.h	2016-03-23 01:19:59 UTC (rev 198569)
+++ trunk/Source/_javascript_Core/dfg/DFGSafeToExecute.h	2016-03-23 01:38:49 UTC (rev 198570)
@@ -242,7 +242,6 @@
     case NewArrayWithSize:
     case NewArrayBuffer:
     case NewRegexp:
-    case Breakpoint:
     case ProfileWillCall:
     case ProfileDidCall:
     case ProfileType:

Modified: trunk/Source/_javascript_Core/dfg/DFGSpeculativeJIT32_64.cpp (198569 => 198570)


--- trunk/Source/_javascript_Core/dfg/DFGSpeculativeJIT32_64.cpp	2016-03-23 01:19:59 UTC (rev 198569)
+++ trunk/Source/_javascript_Core/dfg/DFGSpeculativeJIT32_64.cpp	2016-03-23 01:38:49 UTC (rev 198570)
@@ -4971,7 +4971,6 @@
         noResult(node);
         break;
 
-    case Breakpoint:
     case ProfileWillCall:
     case ProfileDidCall:
     case PhantomLocal:

Modified: trunk/Source/_javascript_Core/dfg/DFGSpeculativeJIT64.cpp (198569 => 198570)


--- trunk/Source/_javascript_Core/dfg/DFGSpeculativeJIT64.cpp	2016-03-23 01:19:59 UTC (rev 198569)
+++ trunk/Source/_javascript_Core/dfg/DFGSpeculativeJIT64.cpp	2016-03-23 01:38:49 UTC (rev 198570)
@@ -4658,7 +4658,6 @@
         noResult(node);
         break;
         
-    case Breakpoint:
     case ProfileWillCall:
     case ProfileDidCall:
     case PhantomLocal:
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to