Title: [170376] branches/ftlopt/Source/_javascript_Core
Revision
170376
Author
fpi...@apple.com
Date
2014-06-24 12:06:36 -0700 (Tue, 24 Jun 2014)

Log Message

[ftlopt] StructureAbstractValue::onlyStructure() should return nullptr if isClobbered()
https://bugs.webkit.org/show_bug.cgi?id=134256

Reviewed by Michael Saboff.
        
This isn't testable right now (i.e. it's benign) but we should get it right anyway. The
point is to be able to precisely model what goes on in the snippets of code between a
side-effect and an InvalidationPoint.
        
This patch also cleans up onlyStructure() by delegating more work to
StructureSet::onlyStructure().

* dfg/DFGStructureAbstractValue.h:
(JSC::DFG::StructureAbstractValue::onlyStructure):

Modified Paths

Diff

Modified: branches/ftlopt/Source/_javascript_Core/ChangeLog (170375 => 170376)


--- branches/ftlopt/Source/_javascript_Core/ChangeLog	2014-06-24 19:04:05 UTC (rev 170375)
+++ branches/ftlopt/Source/_javascript_Core/ChangeLog	2014-06-24 19:06:36 UTC (rev 170376)
@@ -1,5 +1,22 @@
 2014-06-24  Filip Pizlo  <fpi...@apple.com>
 
+        [ftlopt] StructureAbstractValue::onlyStructure() should return nullptr if isClobbered()
+        https://bugs.webkit.org/show_bug.cgi?id=134256
+
+        Reviewed by Michael Saboff.
+        
+        This isn't testable right now (i.e. it's benign) but we should get it right anyway. The
+        point is to be able to precisely model what goes on in the snippets of code between a
+        side-effect and an InvalidationPoint.
+        
+        This patch also cleans up onlyStructure() by delegating more work to
+        StructureSet::onlyStructure().
+
+        * dfg/DFGStructureAbstractValue.h:
+        (JSC::DFG::StructureAbstractValue::onlyStructure):
+
+2014-06-24  Filip Pizlo  <fpi...@apple.com>
+
         [ftlopt][REGRESSION] PutById AI is introducing watchable structures without watching them
         https://bugs.webkit.org/show_bug.cgi?id=134260
 

Modified: branches/ftlopt/Source/_javascript_Core/dfg/DFGStructureAbstractValue.h (170375 => 170376)


--- branches/ftlopt/Source/_javascript_Core/dfg/DFGStructureAbstractValue.h	2014-06-24 19:04:05 UTC (rev 170375)
+++ branches/ftlopt/Source/_javascript_Core/dfg/DFGStructureAbstractValue.h	2014-06-24 19:06:36 UTC (rev 170376)
@@ -181,14 +181,14 @@
     
     Structure* operator[](size_t i) const { return at(i); }
     
-    // FIXME: Eliminate all uses of this method. There shouldn't be any
-    // special-casing for the one-structure case.
-    // https://bugs.webkit.org/show_bug.cgi?id=133229
+    // In most cases, what you really want to do is verify whether the set is top or clobbered, and
+    // if not, enumerate the set of structures. Use this only in cases where the singleton case is
+    // meaningfully special, like for transitions.
     Structure* onlyStructure() const
     {
-        if (isTop() || size() != 1)
+        if (isTop() || isClobbered())
             return nullptr;
-        return at(0);
+        return m_set.onlyStructure();
     }
     
     void dumpInContext(PrintStream&, DumpContext*) const;
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to