Title: [168785] branches/safari-538.34-branch/Source

Diff

Modified: branches/safari-538.34-branch/Source/_javascript_Core/ChangeLog (168784 => 168785)


--- branches/safari-538.34-branch/Source/_javascript_Core/ChangeLog	2014-05-14 06:12:03 UTC (rev 168784)
+++ branches/safari-538.34-branch/Source/_javascript_Core/ChangeLog	2014-05-14 06:14:20 UTC (rev 168785)
@@ -1,5 +1,23 @@
 2014-04-17  Lucas Forschler  <[email protected]>
 
+        Merge r168497
+
+    2014-05-08  Filip Pizlo  <[email protected]>
+
+            deleteAllCompiledCode() shouldn't use the suspension worklist
+            https://bugs.webkit.org/show_bug.cgi?id=132708
+
+            Reviewed by Mark Hahnenberg.
+
+            * bytecode/CodeBlock.cpp:
+            (JSC::CodeBlock::setOptimizationThresholdBasedOnCompilationResult):
+            * dfg/DFGPlan.cpp:
+            (JSC::DFG::Plan::isStillValid):
+            * heap/Heap.cpp:
+            (JSC::Heap::deleteAllCompiledCode):
+
+2014-04-17  Lucas Forschler  <[email protected]>
+
         Merge r168459
 
     2014-05-07  Filip Pizlo  <[email protected]>

Modified: branches/safari-538.34-branch/Source/_javascript_Core/bytecode/CodeBlock.cpp (168784 => 168785)


--- branches/safari-538.34-branch/Source/_javascript_Core/bytecode/CodeBlock.cpp	2014-05-14 06:12:03 UTC (rev 168784)
+++ branches/safari-538.34-branch/Source/_javascript_Core/bytecode/CodeBlock.cpp	2014-05-14 06:14:20 UTC (rev 168785)
@@ -3112,8 +3112,22 @@
 #if ENABLE(DFG_JIT)
 void CodeBlock::setOptimizationThresholdBasedOnCompilationResult(CompilationResult result)
 {
-    RELEASE_ASSERT(jitType() == JITCode::BaselineJIT);
-    RELEASE_ASSERT((result == CompilationSuccessful) == (replacement() != this));
+    JITCode::JITType type = jitType();
+    if (type != JITCode::BaselineJIT) {
+        dataLog(*this, ": expected to have baseline code but have ", type, "\n");
+        RELEASE_ASSERT_NOT_REACHED();
+    }
+    
+    CodeBlock* theReplacement = replacement();
+    if ((result == CompilationSuccessful) != (theReplacement != this)) {
+        dataLog(*this, ": we have result = ", result, " but ");
+        if (theReplacement == this)
+            dataLog("we are our own replacement.\n");
+        else
+            dataLog("our replacement is ", pointerDump(theReplacement), "\n");
+        RELEASE_ASSERT_NOT_REACHED();
+    }
+    
     switch (result) {
     case CompilationSuccessful:
         RELEASE_ASSERT(JITCode::isOptimizingJIT(replacement()->jitType()));
@@ -3136,6 +3150,8 @@
         optimizeAfterWarmUp();
         return;
     }
+    
+    dataLog("Unrecognized result: ", static_cast<int>(result), "\n");
     RELEASE_ASSERT_NOT_REACHED();
 }
 

Modified: branches/safari-538.34-branch/Source/_javascript_Core/dfg/DFGPlan.cpp (168784 => 168785)


--- branches/safari-538.34-branch/Source/_javascript_Core/dfg/DFGPlan.cpp	2014-05-14 06:12:03 UTC (rev 168784)
+++ branches/safari-538.34-branch/Source/_javascript_Core/dfg/DFGPlan.cpp	2014-05-14 06:14:20 UTC (rev 168785)
@@ -386,6 +386,10 @@
     CodeBlock* replacement = codeBlock->replacement();
     if (!replacement)
         return false;
+    // FIXME: This is almost certainly not necessary. There's no way for the baseline
+    // code to be replaced during a compilation, except if we delete the plan, in which
+    // case we wouldn't be here.
+    // https://bugs.webkit.org/show_bug.cgi?id=132707
     if (codeBlock->alternative() != replacement->baselineVersion())
         return false;
     if (!watchpoints.areStillValid())

Modified: branches/safari-538.34-branch/Source/_javascript_Core/heap/Heap.cpp (168784 => 168785)


--- branches/safari-538.34-branch/Source/_javascript_Core/heap/Heap.cpp	2014-05-14 06:12:03 UTC (rev 168784)
+++ branches/safari-538.34-branch/Source/_javascript_Core/heap/Heap.cpp	2014-05-14 06:14:20 UTC (rev 168785)
@@ -886,9 +886,11 @@
     // means that we are running some hot JS code right now. Maybe causing
     // recompilations isn't a good idea.
 #if ENABLE(DFG_JIT)
-    for (auto worklist : m_suspendedCompilerWorklists) {
-        if (worklist->isActiveForVM(*vm()))
-            return;
+    for (unsigned i = DFG::numberOfWorklists(); i--;) {
+        if (DFG::Worklist* worklist = DFG::worklistForIndexOrNull(i)) {
+            if (worklist->isActiveForVM(*vm()))
+                return;
+        }
     }
 #endif // ENABLE(DFG_JIT)
 

Modified: branches/safari-538.34-branch/Source/WebKit2/WebProcess/cocoa/WebProcessCocoa.mm (168784 => 168785)


--- branches/safari-538.34-branch/Source/WebKit2/WebProcess/cocoa/WebProcessCocoa.mm	2014-05-14 06:12:03 UTC (rev 168784)
+++ branches/safari-538.34-branch/Source/WebKit2/WebProcess/cocoa/WebProcessCocoa.mm	2014-05-14 06:14:20 UTC (rev 168785)
@@ -192,13 +192,6 @@
     m_shouldForceScreenFontSubstitution = parameters.shouldForceScreenFontSubstitution;
     Font::setDefaultTypesettingFeatures(parameters.shouldEnableKerningAndLigaturesByDefault ? Kerning | Ligatures : 0);
 
-    if (!JSC::Options::useJITWasOverridden())
-        JSC::Options::useJIT() = parameters.shouldEnableJIT;
-#if ENABLE(FTL_JIT)
-    if (!JSC::Options::useFTLJITWasOverridden())
-        JSC::Options::useFTLJIT() = parameters.shouldEnableFTLJIT;
-#endif
-
     setEnhancedAccessibility(parameters.accessibilityEnhancedUserInterfaceEnabled);
 
 #if USE(APPKIT)
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to