Title: [144219] trunk/Source/_javascript_Core
Revision
144219
Author
[email protected]
Date
2013-02-27 12:11:40 -0800 (Wed, 27 Feb 2013)

Log Message

Disable some unsound DFG DCE
https://bugs.webkit.org/show_bug.cgi?id=110948

Reviewed by Michael Saboff.
        
DCE of bitops is not sound since the bitops might call some variant of valueOf.
        
This used to work right because ValueToInt32 was MustGenerate. From the DFG IR
standpoint it feels weird to make ValueToInt32 be MustGenerate since that node is
implemented entirely as a pure conversion. If we ever gave the DFG the ability to
do effectful bitops, we would most likely implement them as special nodes not
related to the ValueToInt32 and bitop nodes we have now.
        
This change is performance neutral.

* dfg/DFGNodeType.h:
(DFG):

Modified Paths

Diff

Modified: trunk/Source/_javascript_Core/ChangeLog (144218 => 144219)


--- trunk/Source/_javascript_Core/ChangeLog	2013-02-27 20:04:58 UTC (rev 144218)
+++ trunk/Source/_javascript_Core/ChangeLog	2013-02-27 20:11:40 UTC (rev 144219)
@@ -1,3 +1,23 @@
+2013-02-26  Filip Pizlo  <[email protected]>
+
+        Disable some unsound DFG DCE
+        https://bugs.webkit.org/show_bug.cgi?id=110948
+
+        Reviewed by Michael Saboff.
+        
+        DCE of bitops is not sound since the bitops might call some variant of valueOf.
+        
+        This used to work right because ValueToInt32 was MustGenerate. From the DFG IR
+        standpoint it feels weird to make ValueToInt32 be MustGenerate since that node is
+        implemented entirely as a pure conversion. If we ever gave the DFG the ability to
+        do effectful bitops, we would most likely implement them as special nodes not
+        related to the ValueToInt32 and bitop nodes we have now.
+        
+        This change is performance neutral.
+
+        * dfg/DFGNodeType.h:
+        (DFG):
+
 2013-02-27  Glenn Adams  <[email protected]>
 
         Add ENABLE_CSS3_TEXT_LINE_BREAK flag.

Modified: trunk/Source/_javascript_Core/dfg/DFGNodeType.h (144218 => 144219)


--- trunk/Source/_javascript_Core/dfg/DFGNodeType.h	2013-02-27 20:04:58 UTC (rev 144218)
+++ trunk/Source/_javascript_Core/dfg/DFGNodeType.h	2013-02-27 20:11:40 UTC (rev 144219)
@@ -79,12 +79,12 @@
     macro(InlineStart, 0 | NodeDoesNotExit) \
     \
     /* Nodes for bitwise operations. */\
-    macro(BitAnd, NodeResultInt32) \
-    macro(BitOr, NodeResultInt32) \
-    macro(BitXor, NodeResultInt32) \
-    macro(BitLShift, NodeResultInt32) \
-    macro(BitRShift, NodeResultInt32) \
-    macro(BitURShift, NodeResultInt32) \
+    macro(BitAnd, NodeResultInt32 | NodeMustGenerate) \
+    macro(BitOr, NodeResultInt32 | NodeMustGenerate) \
+    macro(BitXor, NodeResultInt32 | NodeMustGenerate) \
+    macro(BitLShift, NodeResultInt32 | NodeMustGenerate) \
+    macro(BitRShift, NodeResultInt32 | NodeMustGenerate) \
+    macro(BitURShift, NodeResultInt32 | NodeMustGenerate) \
     /* Bitwise operators call ToInt32 on their operands. */\
     macro(ValueToInt32, NodeResultInt32) \
     /* Used to box the result of URShift nodes (result has range 0..2^32-1). */\
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to