Title: [159736] trunk
- Revision
- 159736
- Author
- fpi...@apple.com
- Date
- 2013-11-24 13:46:43 -0800 (Sun, 24 Nov 2013)
Log Message
Fix more fallout from failed attempts at div/mod DFG strength reductions
https://bugs.webkit.org/show_bug.cgi?id=124813
Reviewed by Geoffrey Garen.
Source/_javascript_Core:
* dfg/DFGSpeculativeJIT.cpp:
(JSC::DFG::SpeculativeJIT::compileArithMod):
LayoutTests:
* js/dfg-mod-1-int.html: Added.
* js/dfg-mod-1-int-expected.txt: Added.
* js/script-tests/dfg-mod-1-int.js: Added.
(foo):
Modified Paths
Added Paths
Diff
Modified: trunk/LayoutTests/ChangeLog (159735 => 159736)
--- trunk/LayoutTests/ChangeLog 2013-11-24 19:14:00 UTC (rev 159735)
+++ trunk/LayoutTests/ChangeLog 2013-11-24 21:46:43 UTC (rev 159736)
@@ -1,3 +1,15 @@
+2013-11-23 Filip Pizlo <fpi...@apple.com>
+
+ Fix more fallout from failed attempts at div/mod DFG strength reductions
+ https://bugs.webkit.org/show_bug.cgi?id=124813
+
+ Reviewed by Geoffrey Garen.
+
+ * js/dfg-mod-1-int.html: Added.
+ * js/dfg-mod-1-int-expected.txt: Added.
+ * js/script-tests/dfg-mod-1-int.js: Added.
+ (foo):
+
2013-11-23 Robert Hogan <rob...@webkit.org>
Remove lint from expected result.
Added: trunk/LayoutTests/js/dfg-mod-1-int-expected.txt (0 => 159736)
--- trunk/LayoutTests/js/dfg-mod-1-int-expected.txt (rev 0)
+++ trunk/LayoutTests/js/dfg-mod-1-int-expected.txt 2013-11-24 21:46:43 UTC (rev 159736)
@@ -0,0 +1,10 @@
+Tests that the DFG handles x % 1, where x is an integer, correctly.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+PASS foo(1) is 0 on all iterations including after DFG tier-up.
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
Added: trunk/LayoutTests/js/dfg-mod-1-int.html (0 => 159736)
--- trunk/LayoutTests/js/dfg-mod-1-int.html (rev 0)
+++ trunk/LayoutTests/js/dfg-mod-1-int.html 2013-11-24 21:46:43 UTC (rev 159736)
@@ -0,0 +1,10 @@
+<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
+<html>
+<head>
+<script src=""
+</head>
+<body>
+<script src=""
+<script src=""
+</body>
+</html>
Added: trunk/LayoutTests/js/script-tests/dfg-mod-1-int.js (0 => 159736)
--- trunk/LayoutTests/js/script-tests/dfg-mod-1-int.js (rev 0)
+++ trunk/LayoutTests/js/script-tests/dfg-mod-1-int.js 2013-11-24 21:46:43 UTC (rev 159736)
@@ -0,0 +1,7 @@
+description(
+"Tests that the DFG handles x % 1, where x is an integer, correctly."
+);
+
+function foo(x) { return x % 1; }
+
+dfgShouldBe(foo, "foo(1)", "0");
Modified: trunk/Source/_javascript_Core/ChangeLog (159735 => 159736)
--- trunk/Source/_javascript_Core/ChangeLog 2013-11-24 19:14:00 UTC (rev 159735)
+++ trunk/Source/_javascript_Core/ChangeLog 2013-11-24 21:46:43 UTC (rev 159736)
@@ -1,3 +1,13 @@
+2013-11-23 Filip Pizlo <fpi...@apple.com>
+
+ Fix more fallout from failed attempts at div/mod DFG strength reductions
+ https://bugs.webkit.org/show_bug.cgi?id=124813
+
+ Reviewed by Geoffrey Garen.
+
+ * dfg/DFGSpeculativeJIT.cpp:
+ (JSC::DFG::SpeculativeJIT::compileArithMod):
+
2013-11-22 Mark Hahnenberg <mhahnenb...@apple.com>
JSC Obj-C API should have real documentation
Modified: trunk/Source/_javascript_Core/dfg/DFGSpeculativeJIT.cpp (159735 => 159736)
--- trunk/Source/_javascript_Core/dfg/DFGSpeculativeJIT.cpp 2013-11-24 19:14:00 UTC (rev 159735)
+++ trunk/Source/_javascript_Core/dfg/DFGSpeculativeJIT.cpp 2013-11-24 21:46:43 UTC (rev 159736)
@@ -3539,8 +3539,7 @@
if (isInt32Constant(node->child2().node())) {
int32_t divisor = valueOfInt32Constant(node->child2().node());
- if (divisor > 0 && hasOneBitSet(divisor)) {
- ASSERT(divisor != 1);
+ if (divisor > 1 && hasOneBitSet(divisor)) {
unsigned logarithm = WTF::fastLog2(divisor);
GPRReg dividendGPR = op1.gpr();
GPRTemporary result(this);
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes