Title: [225880] trunk/Source/_javascript_Core
Revision
225880
Author
sbar...@apple.com
Date
2017-12-13 16:31:58 -0800 (Wed, 13 Dec 2017)

Log Message

Take a value driven approach to how we emit structure checks in TypeCheckHoistingPhase to obviate the need for static_assert guards
https://bugs.webkit.org/show_bug.cgi?id=180771

Reviewed by JF Bastien.

* dfg/DFGTypeCheckHoistingPhase.cpp:
(JSC::DFG::TypeCheckHoistingPhase::run):

Modified Paths

Diff

Modified: trunk/Source/_javascript_Core/ChangeLog (225879 => 225880)


--- trunk/Source/_javascript_Core/ChangeLog	2017-12-14 00:29:31 UTC (rev 225879)
+++ trunk/Source/_javascript_Core/ChangeLog	2017-12-14 00:31:58 UTC (rev 225880)
@@ -1,5 +1,15 @@
 2017-12-13  Saam Barati  <sbar...@apple.com>
 
+        Take a value driven approach to how we emit structure checks in TypeCheckHoistingPhase to obviate the need for static_assert guards
+        https://bugs.webkit.org/show_bug.cgi?id=180771
+
+        Reviewed by JF Bastien.
+
+        * dfg/DFGTypeCheckHoistingPhase.cpp:
+        (JSC::DFG::TypeCheckHoistingPhase::run):
+
+2017-12-13  Saam Barati  <sbar...@apple.com>
+
         REGRESSION(r225844): Around 850 new JSC failures on 32-bit
         https://bugs.webkit.org/show_bug.cgi?id=180764
 

Modified: trunk/Source/_javascript_Core/dfg/DFGTypeCheckHoistingPhase.cpp (225879 => 225880)


--- trunk/Source/_javascript_Core/dfg/DFGTypeCheckHoistingPhase.cpp	2017-12-14 00:29:31 UTC (rev 225879)
+++ trunk/Source/_javascript_Core/dfg/DFGTypeCheckHoistingPhase.cpp	2017-12-14 00:31:58 UTC (rev 225880)
@@ -145,8 +145,7 @@
                         OpInfo(variable), Edge(node));
                     if (iter->value.m_structure) {
                         auto checkOp = CheckStructure;
-                        if (is64Bit()) {
-                            static_assert(is64Bit() || !(SpecCellCheck & SpecEmpty), "");
+                        if (SpecCellCheck & SpecEmpty) {
                             VirtualRegister local = node->variableAccessData()->local();
                             auto* inlineCallFrame = node->origin.semantic.inlineCallFrame;
                             if ((local - (inlineCallFrame ? inlineCallFrame->stackOffset : 0)) == virtualRegisterForArgument(0)) {
@@ -195,9 +194,8 @@
                         // to emit a node that explicitly handles the empty value. Most of the time, CheckStructureOrEmpty
                         // will be folded to CheckStructure because AI proves that the incoming value is
                         // definitely not empty.
-                        static_assert(is64Bit() || !(SpecCellCheck & SpecEmpty), "");
                         insertionSet.insertNode(
-                            indexForChecks, SpecNone, is64Bit() ? CheckStructureOrEmpty : CheckStructure,
+                            indexForChecks, SpecNone, (SpecCellCheck & SpecEmpty) ? CheckStructureOrEmpty : CheckStructure,
                             originForChecks.withSemantic(origin.semantic),
                             OpInfo(m_graph.addStructureSet(iter->value.m_structure)),
                             Edge(child1.node(), CellUse));
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to