Title: [206841] trunk/Source/_javascript_Core
Revision
206841
Author
[email protected]
Date
2016-10-05 17:50:59 -0700 (Wed, 05 Oct 2016)

Log Message

PCToCodeOriginMap builder should use labelIgnoringWatchpoints() inside the DFG
https://bugs.webkit.org/show_bug.cgi?id=162936

Reviewed by Michael Saboff.

label() may insert nops because of an InvalidationPoint. It does that
because we don't want code that comes after an InvalidationPoint that isn't
effected by the invalidation point to be overwritten if we fire the
InvalidationPoint. PCToCodeOriginMap just grabs labels to build
a mapping, it never emits code that actually jumps to those labels.
Therefore, it should never cause us to emit nops.

* dfg/DFGJITCompiler.cpp:
(JSC::DFG::JITCompiler::compile):
(JSC::DFG::JITCompiler::compileFunction):
* dfg/DFGSpeculativeJIT.cpp:
(JSC::DFG::SpeculativeJIT::runSlowPathGenerators):
(JSC::DFG::SpeculativeJIT::compileCurrentBlock):

Modified Paths

Diff

Modified: trunk/Source/_javascript_Core/ChangeLog (206840 => 206841)


--- trunk/Source/_javascript_Core/ChangeLog	2016-10-06 00:47:39 UTC (rev 206840)
+++ trunk/Source/_javascript_Core/ChangeLog	2016-10-06 00:50:59 UTC (rev 206841)
@@ -1,3 +1,24 @@
+2016-10-05  Saam Barati  <[email protected]>
+
+        PCToCodeOriginMap builder should use labelIgnoringWatchpoints() inside the DFG
+        https://bugs.webkit.org/show_bug.cgi?id=162936
+
+        Reviewed by Michael Saboff.
+
+        label() may insert nops because of an InvalidationPoint. It does that
+        because we don't want code that comes after an InvalidationPoint that isn't
+        effected by the invalidation point to be overwritten if we fire the
+        InvalidationPoint. PCToCodeOriginMap just grabs labels to build
+        a mapping, it never emits code that actually jumps to those labels.
+        Therefore, it should never cause us to emit nops.
+
+        * dfg/DFGJITCompiler.cpp:
+        (JSC::DFG::JITCompiler::compile):
+        (JSC::DFG::JITCompiler::compileFunction):
+        * dfg/DFGSpeculativeJIT.cpp:
+        (JSC::DFG::SpeculativeJIT::runSlowPathGenerators):
+        (JSC::DFG::SpeculativeJIT::compileCurrentBlock):
+
 2016-10-05  Myles C. Maxfield  <[email protected]>
 
         Put variation fonts work behind a compile-time flag

Modified: trunk/Source/_javascript_Core/dfg/DFGJITCompiler.cpp (206840 => 206841)


--- trunk/Source/_javascript_Core/dfg/DFGJITCompiler.cpp	2016-10-06 00:47:39 UTC (rev 206840)
+++ trunk/Source/_javascript_Core/dfg/DFGJITCompiler.cpp	2016-10-06 00:50:59 UTC (rev 206841)
@@ -366,7 +366,7 @@
 
     // Generate slow path code.
     m_speculative->runSlowPathGenerators(m_pcToCodeOriginMapBuilder);
-    m_pcToCodeOriginMapBuilder.appendItem(label(), PCToCodeOriginMapBuilder::defaultCodeOrigin());
+    m_pcToCodeOriginMapBuilder.appendItem(labelIgnoringWatchpoints(), PCToCodeOriginMapBuilder::defaultCodeOrigin());
     
     compileExceptionHandlers();
     linkOSRExits();
@@ -459,7 +459,7 @@
     
     // Generate slow path code.
     m_speculative->runSlowPathGenerators(m_pcToCodeOriginMapBuilder);
-    m_pcToCodeOriginMapBuilder.appendItem(label(), PCToCodeOriginMapBuilder::defaultCodeOrigin());
+    m_pcToCodeOriginMapBuilder.appendItem(labelIgnoringWatchpoints(), PCToCodeOriginMapBuilder::defaultCodeOrigin());
     
     compileExceptionHandlers();
     linkOSRExits();

Modified: trunk/Source/_javascript_Core/dfg/DFGSpeculativeJIT.cpp (206840 => 206841)


--- trunk/Source/_javascript_Core/dfg/DFGSpeculativeJIT.cpp	2016-10-06 00:47:39 UTC (rev 206840)
+++ trunk/Source/_javascript_Core/dfg/DFGSpeculativeJIT.cpp	2016-10-06 00:50:59 UTC (rev 206841)
@@ -385,7 +385,7 @@
 void SpeculativeJIT::runSlowPathGenerators(PCToCodeOriginMapBuilder& pcToCodeOriginMapBuilder)
 {
     for (auto& slowPathGenerator : m_slowPathGenerators) {
-        pcToCodeOriginMapBuilder.appendItem(m_jit.label(), slowPathGenerator->origin().semantic);
+        pcToCodeOriginMapBuilder.appendItem(m_jit.labelIgnoringWatchpoints(), slowPathGenerator->origin().semantic);
         slowPathGenerator->generate(this);
     }
     for (auto& slowPathLambda : m_slowPathLambdas) {
@@ -392,7 +392,7 @@
         Node* currentNode = slowPathLambda.currentNode;
         m_currentNode = currentNode;
         m_outOfLineStreamIndex = slowPathLambda.streamIndex;
-        pcToCodeOriginMapBuilder.appendItem(m_jit.label(), currentNode->origin.semantic);
+        pcToCodeOriginMapBuilder.appendItem(m_jit.labelIgnoringWatchpoints(), currentNode->origin.semantic);
         slowPathLambda.generator();
         m_outOfLineStreamIndex = Nullopt;
     }
@@ -1740,7 +1740,7 @@
         if (Options::validateDFGExceptionHandling() && (mayExit(m_jit.graph(), m_currentNode) != DoesNotExit || m_currentNode->isTerminal()))
             m_jit.jitReleaseAssertNoException();
 
-        m_jit.pcToCodeOriginMapBuilder().appendItem(m_jit.label(), m_origin.semantic);
+        m_jit.pcToCodeOriginMapBuilder().appendItem(m_jit.labelIgnoringWatchpoints(), m_origin.semantic);
 
         compile(m_currentNode);
         
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to