Title: [203034] trunk/Source/_javascript_Core
- Revision
- 203034
- Author
- [email protected]
- Date
- 2016-07-09 14:07:45 -0700 (Sat, 09 Jul 2016)
Log Message
REGRESSION(201900): validation failure for GetByOffset/PutByOffset in VALIDATE((node), node->child1().node() == node->child2().node() || node->child1()->result() == NodeResultStorage)
https://bugs.webkit.org/show_bug.cgi?id=159603
Reviewed by Keith Miller.
This removes an incorrect validation rule and replaces it with a FIXME about how to make this
aspect of IR easier to validate soundly.
It's not valid to assert that two children of a node are the same. It should always be valid
to take:
Foo(@x, @x)
and turn it into:
a: ValueRep(@x)
b: ValueRep(@x)
Foo(@a, @b)
or even something like:
y: Identity(@y)
Foo(@x, @y)
That's because it should be possible to rewire any data flow edge something that produces an
equivalent value.
The validation rule that this patch removes meant that such rewirings were invalid on
GetByOffset/PutByOffset. FixupPhase did such a rewiring sometimes.
* dfg/DFGValidate.cpp:
* tests/stress/get-by-offset-double.js: Added.
Modified Paths
Added Paths
Diff
Modified: trunk/Source/_javascript_Core/ChangeLog (203033 => 203034)
--- trunk/Source/_javascript_Core/ChangeLog 2016-07-09 20:50:51 UTC (rev 203033)
+++ trunk/Source/_javascript_Core/ChangeLog 2016-07-09 21:07:45 UTC (rev 203034)
@@ -1,3 +1,38 @@
+2016-07-09 Filip Pizlo <[email protected]>
+
+ REGRESSION(201900): validation failure for GetByOffset/PutByOffset in VALIDATE((node), node->child1().node() == node->child2().node() || node->child1()->result() == NodeResultStorage)
+ https://bugs.webkit.org/show_bug.cgi?id=159603
+
+ Reviewed by Keith Miller.
+
+ This removes an incorrect validation rule and replaces it with a FIXME about how to make this
+ aspect of IR easier to validate soundly.
+
+ It's not valid to assert that two children of a node are the same. It should always be valid
+ to take:
+
+ Foo(@x, @x)
+
+ and turn it into:
+
+ a: ValueRep(@x)
+ b: ValueRep(@x)
+ Foo(@a, @b)
+
+ or even something like:
+
+ y: Identity(@y)
+ Foo(@x, @y)
+
+ That's because it should be possible to rewire any data flow edge something that produces an
+ equivalent value.
+
+ The validation rule that this patch removes meant that such rewirings were invalid on
+ GetByOffset/PutByOffset. FixupPhase did such a rewiring sometimes.
+
+ * dfg/DFGValidate.cpp:
+ * tests/stress/get-by-offset-double.js: Added.
+
2016-07-09 Keith Miller <[email protected]>
appendMemcpy might fail in concatAppendOne
Modified: trunk/Source/_javascript_Core/dfg/DFGValidate.cpp (203033 => 203034)
--- trunk/Source/_javascript_Core/dfg/DFGValidate.cpp 2016-07-09 20:50:51 UTC (rev 203033)
+++ trunk/Source/_javascript_Core/dfg/DFGValidate.cpp 2016-07-09 21:07:45 UTC (rev 203034)
@@ -299,7 +299,12 @@
break;
case GetByOffset:
case PutByOffset:
- VALIDATE((node), node->child1().node() == node->child2().node() || node->child1()->result() == NodeResultStorage);
+ // FIXME: We should be able to validate that GetByOffset and PutByOffset are
+ // using the same object for storage and base. I think this means finally
+ // splitting these nodes into two node types, one for inline and one for
+ // out-of-line. The out-of-line one will require that the first node is storage,
+ // while the inline one will not take a storage child at all.
+ // https://bugs.webkit.org/show_bug.cgi?id=159602
break;
default:
break;
Added: trunk/Source/_javascript_Core/tests/stress/get-by-offset-double.js (0 => 203034)
--- trunk/Source/_javascript_Core/tests/stress/get-by-offset-double.js (rev 0)
+++ trunk/Source/_javascript_Core/tests/stress/get-by-offset-double.js 2016-07-09 21:07:45 UTC (rev 203034)
@@ -0,0 +1,25 @@
+function foo(o, p) {
+ if (p)
+ return o.f;
+ else
+ return [o * 1.1, o * 1.2, o * 1.3];
+}
+
+for (var i = 0; i < 100; ++i)
+ foo({f:42}, true);
+
+function bar() {
+ var x = 4.5;
+ for (var i = 0; i < 10; ++i) {
+ x *= 1.1;
+ x += 0.05;
+ foo(x, false);
+ }
+ return x * 1.03;
+}
+
+noInline(bar);
+
+for (var i = 0; i < 10000; ++i)
+ bar();
+
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes