<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[200958] trunk</title>
</head>
<body>
<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; }
#msg dl a { font-weight: bold}
#msg dl a:link { color:#fc3; }
#msg dl a:active { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/200958">200958</a></dd>
<dt>Author</dt> <dd>fpizlo@apple.com</dd>
<dt>Date</dt> <dd>2016-05-16 12:41:01 -0700 (Mon, 16 May 2016)</dd>
</dl>
<h3>Log Message</h3>
<pre>FixupPhase should be more eager to demote bit math to untyped
https://bugs.webkit.org/show_bug.cgi?id=157746
Reviewed by Mark Lam.
Source/JavaScriptCore:
This just makes the logic for how we fixup bit math match the way we do it in other places.
This doesn't affect performance on any major benchmark but it's a big win on new
microbenchmarks added in this change.
Details:
object-and 11.1610+-0.7602 ^ 4.8105+-0.1690 ^ definitely 2.3201x faster
object-or 11.0845+-0.2487 ^ 4.7146+-0.0374 ^ definitely 2.3511x faster
object-xor 10.2946+-0.9946 ^ 4.7278+-0.0814 ^ definitely 2.1775x faster
object-lshift 10.4896+-1.0867 ^ 4.7699+-0.0721 ^ definitely 2.1991x faster
object-rshift 11.1239+-0.5010 ^ 4.7194+-0.0445 ^ definitely 2.3570x faster
object-urshift 10.9745+-0.1315 ^ 4.7848+-0.0479 ^ definitely 2.2936x faster
* dfg/DFGFixupPhase.cpp:
(JSC::DFG::FixupPhase::fixupNode):
LayoutTests:
* js/regress/object-and-expected.txt: Added.
* js/regress/object-and.html: Added.
* js/regress/object-int-and-array-expected.txt: Added.
* js/regress/object-int-and-array.html: Added.
* js/regress/object-lshift-expected.txt: Added.
* js/regress/object-lshift.html: Added.
* js/regress/object-or-expected.txt: Added.
* js/regress/object-or.html: Added.
* js/regress/object-rshift-expected.txt: Added.
* js/regress/object-rshift.html: Added.
* js/regress/object-urshift-expected.txt: Added.
* js/regress/object-urshift.html: Added.
* js/regress/object-xor-expected.txt: Added.
* js/regress/object-xor.html: Added.
* js/regress/script-tests/object-and.js: Added.
(o.valueOf):
* js/regress/script-tests/object-int-and-array.js: Added.
(i.o.valueOf):
* js/regress/script-tests/object-lshift.js: Added.
(o.valueOf):
* js/regress/script-tests/object-or.js: Added.
(o.valueOf):
* js/regress/script-tests/object-rshift.js: Added.
(o.valueOf):
* js/regress/script-tests/object-urshift.js: Added.
(o.valueOf):
* js/regress/script-tests/object-xor.js: Added.
(o.valueOf):</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsChangeLog">trunk/LayoutTests/ChangeLog</a></li>
<li><a href="#trunkSourceJavaScriptCoreChangeLog">trunk/Source/JavaScriptCore/ChangeLog</a></li>
<li><a href="#trunkSourceJavaScriptCoredfgDFGFixupPhasecpp">trunk/Source/JavaScriptCore/dfg/DFGFixupPhase.cpp</a></li>
</ul>
<h3>Added Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsjsregressobjectandexpectedtxt">trunk/LayoutTests/js/regress/object-and-expected.txt</a></li>
<li><a href="#trunkLayoutTestsjsregressobjectandhtml">trunk/LayoutTests/js/regress/object-and.html</a></li>
<li><a href="#trunkLayoutTestsjsregressobjectintandarrayexpectedtxt">trunk/LayoutTests/js/regress/object-int-and-array-expected.txt</a></li>
<li><a href="#trunkLayoutTestsjsregressobjectintandarrayhtml">trunk/LayoutTests/js/regress/object-int-and-array.html</a></li>
<li><a href="#trunkLayoutTestsjsregressobjectlshiftexpectedtxt">trunk/LayoutTests/js/regress/object-lshift-expected.txt</a></li>
<li><a href="#trunkLayoutTestsjsregressobjectlshifthtml">trunk/LayoutTests/js/regress/object-lshift.html</a></li>
<li><a href="#trunkLayoutTestsjsregressobjectorexpectedtxt">trunk/LayoutTests/js/regress/object-or-expected.txt</a></li>
<li><a href="#trunkLayoutTestsjsregressobjectorhtml">trunk/LayoutTests/js/regress/object-or.html</a></li>
<li><a href="#trunkLayoutTestsjsregressobjectrshiftexpectedtxt">trunk/LayoutTests/js/regress/object-rshift-expected.txt</a></li>
<li><a href="#trunkLayoutTestsjsregressobjectrshifthtml">trunk/LayoutTests/js/regress/object-rshift.html</a></li>
<li><a href="#trunkLayoutTestsjsregressobjecturshiftexpectedtxt">trunk/LayoutTests/js/regress/object-urshift-expected.txt</a></li>
<li><a href="#trunkLayoutTestsjsregressobjecturshifthtml">trunk/LayoutTests/js/regress/object-urshift.html</a></li>
<li><a href="#trunkLayoutTestsjsregressobjectxorexpectedtxt">trunk/LayoutTests/js/regress/object-xor-expected.txt</a></li>
<li><a href="#trunkLayoutTestsjsregressobjectxorhtml">trunk/LayoutTests/js/regress/object-xor.html</a></li>
<li><a href="#trunkLayoutTestsjsregressscripttestsobjectandjs">trunk/LayoutTests/js/regress/script-tests/object-and.js</a></li>
<li><a href="#trunkLayoutTestsjsregressscripttestsobjectintandarrayjs">trunk/LayoutTests/js/regress/script-tests/object-int-and-array.js</a></li>
<li><a href="#trunkLayoutTestsjsregressscripttestsobjectlshiftjs">trunk/LayoutTests/js/regress/script-tests/object-lshift.js</a></li>
<li><a href="#trunkLayoutTestsjsregressscripttestsobjectorjs">trunk/LayoutTests/js/regress/script-tests/object-or.js</a></li>
<li><a href="#trunkLayoutTestsjsregressscripttestsobjectrshiftjs">trunk/LayoutTests/js/regress/script-tests/object-rshift.js</a></li>
<li><a href="#trunkLayoutTestsjsregressscripttestsobjecturshiftjs">trunk/LayoutTests/js/regress/script-tests/object-urshift.js</a></li>
<li><a href="#trunkLayoutTestsjsregressscripttestsobjectxorjs">trunk/LayoutTests/js/regress/script-tests/object-xor.js</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/ChangeLog (200957 => 200958)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/ChangeLog        2016-05-16 19:20:40 UTC (rev 200957)
+++ trunk/LayoutTests/ChangeLog        2016-05-16 19:41:01 UTC (rev 200958)
</span><span class="lines">@@ -1,3 +1,39 @@
</span><ins>+2016-05-16 Filip Pizlo <fpizlo@apple.com>
+
+ FixupPhase should be more eager to demote bit math to untyped
+ https://bugs.webkit.org/show_bug.cgi?id=157746
+
+ Reviewed by Mark Lam.
+
+ * js/regress/object-and-expected.txt: Added.
+ * js/regress/object-and.html: Added.
+ * js/regress/object-int-and-array-expected.txt: Added.
+ * js/regress/object-int-and-array.html: Added.
+ * js/regress/object-lshift-expected.txt: Added.
+ * js/regress/object-lshift.html: Added.
+ * js/regress/object-or-expected.txt: Added.
+ * js/regress/object-or.html: Added.
+ * js/regress/object-rshift-expected.txt: Added.
+ * js/regress/object-rshift.html: Added.
+ * js/regress/object-urshift-expected.txt: Added.
+ * js/regress/object-urshift.html: Added.
+ * js/regress/object-xor-expected.txt: Added.
+ * js/regress/object-xor.html: Added.
+ * js/regress/script-tests/object-and.js: Added.
+ (o.valueOf):
+ * js/regress/script-tests/object-int-and-array.js: Added.
+ (i.o.valueOf):
+ * js/regress/script-tests/object-lshift.js: Added.
+ (o.valueOf):
+ * js/regress/script-tests/object-or.js: Added.
+ (o.valueOf):
+ * js/regress/script-tests/object-rshift.js: Added.
+ (o.valueOf):
+ * js/regress/script-tests/object-urshift.js: Added.
+ (o.valueOf):
+ * js/regress/script-tests/object-xor.js: Added.
+ (o.valueOf):
+
</ins><span class="cx"> 2016-05-16 Michael Saboff <msaboff@apple.com>
</span><span class="cx">
</span><span class="cx"> RegExp /y flag incorrect handling of mixed-length alternation
</span></span></pre></div>
<a id="trunkLayoutTestsjsregressobjectandexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/js/regress/object-and-expected.txt (0 => 200958)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/js/regress/object-and-expected.txt         (rev 0)
+++ trunk/LayoutTests/js/regress/object-and-expected.txt        2016-05-16 19:41:01 UTC (rev 200958)
</span><span class="lines">@@ -0,0 +1,10 @@
</span><ins>+JSRegress/object-and
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+PASS no exception thrown
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
</ins></span></pre></div>
<a id="trunkLayoutTestsjsregressobjectandhtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/js/regress/object-and.html (0 => 200958)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/js/regress/object-and.html         (rev 0)
+++ trunk/LayoutTests/js/regress/object-and.html        2016-05-16 19:41:01 UTC (rev 200958)
</span><span class="lines">@@ -0,0 +1,12 @@
</span><ins>+<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
+<html>
+<head>
+<script src="../../resources/js-test-pre.js"></script>
+</head>
+<body>
+<script src="../../resources/regress-pre.js"></script>
+<script src="script-tests/object-and.js"></script>
+<script src="../../resources/regress-post.js"></script>
+<script src="../../resources/js-test-post.js"></script>
+</body>
+</html>
</ins></span></pre></div>
<a id="trunkLayoutTestsjsregressobjectintandarrayexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/js/regress/object-int-and-array-expected.txt (0 => 200958)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/js/regress/object-int-and-array-expected.txt         (rev 0)
+++ trunk/LayoutTests/js/regress/object-int-and-array-expected.txt        2016-05-16 19:41:01 UTC (rev 200958)
</span><span class="lines">@@ -0,0 +1,10 @@
</span><ins>+JSRegress/object-int-and-array
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+PASS no exception thrown
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
</ins></span></pre></div>
<a id="trunkLayoutTestsjsregressobjectintandarrayhtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/js/regress/object-int-and-array.html (0 => 200958)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/js/regress/object-int-and-array.html         (rev 0)
+++ trunk/LayoutTests/js/regress/object-int-and-array.html        2016-05-16 19:41:01 UTC (rev 200958)
</span><span class="lines">@@ -0,0 +1,12 @@
</span><ins>+<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
+<html>
+<head>
+<script src="../../resources/js-test-pre.js"></script>
+</head>
+<body>
+<script src="../../resources/regress-pre.js"></script>
+<script src="script-tests/object-int-and-array.js"></script>
+<script src="../../resources/regress-post.js"></script>
+<script src="../../resources/js-test-post.js"></script>
+</body>
+</html>
</ins></span></pre></div>
<a id="trunkLayoutTestsjsregressobjectlshiftexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/js/regress/object-lshift-expected.txt (0 => 200958)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/js/regress/object-lshift-expected.txt         (rev 0)
+++ trunk/LayoutTests/js/regress/object-lshift-expected.txt        2016-05-16 19:41:01 UTC (rev 200958)
</span><span class="lines">@@ -0,0 +1,10 @@
</span><ins>+JSRegress/object-lshift
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+PASS no exception thrown
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
</ins></span></pre></div>
<a id="trunkLayoutTestsjsregressobjectlshifthtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/js/regress/object-lshift.html (0 => 200958)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/js/regress/object-lshift.html         (rev 0)
+++ trunk/LayoutTests/js/regress/object-lshift.html        2016-05-16 19:41:01 UTC (rev 200958)
</span><span class="lines">@@ -0,0 +1,12 @@
</span><ins>+<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
+<html>
+<head>
+<script src="../../resources/js-test-pre.js"></script>
+</head>
+<body>
+<script src="../../resources/regress-pre.js"></script>
+<script src="script-tests/object-lshift.js"></script>
+<script src="../../resources/regress-post.js"></script>
+<script src="../../resources/js-test-post.js"></script>
+</body>
+</html>
</ins></span></pre></div>
<a id="trunkLayoutTestsjsregressobjectorexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/js/regress/object-or-expected.txt (0 => 200958)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/js/regress/object-or-expected.txt         (rev 0)
+++ trunk/LayoutTests/js/regress/object-or-expected.txt        2016-05-16 19:41:01 UTC (rev 200958)
</span><span class="lines">@@ -0,0 +1,10 @@
</span><ins>+JSRegress/object-or
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+PASS no exception thrown
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
</ins></span></pre></div>
<a id="trunkLayoutTestsjsregressobjectorhtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/js/regress/object-or.html (0 => 200958)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/js/regress/object-or.html         (rev 0)
+++ trunk/LayoutTests/js/regress/object-or.html        2016-05-16 19:41:01 UTC (rev 200958)
</span><span class="lines">@@ -0,0 +1,12 @@
</span><ins>+<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
+<html>
+<head>
+<script src="../../resources/js-test-pre.js"></script>
+</head>
+<body>
+<script src="../../resources/regress-pre.js"></script>
+<script src="script-tests/object-or.js"></script>
+<script src="../../resources/regress-post.js"></script>
+<script src="../../resources/js-test-post.js"></script>
+</body>
+</html>
</ins></span></pre></div>
<a id="trunkLayoutTestsjsregressobjectrshiftexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/js/regress/object-rshift-expected.txt (0 => 200958)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/js/regress/object-rshift-expected.txt         (rev 0)
+++ trunk/LayoutTests/js/regress/object-rshift-expected.txt        2016-05-16 19:41:01 UTC (rev 200958)
</span><span class="lines">@@ -0,0 +1,10 @@
</span><ins>+JSRegress/object-rshift
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+PASS no exception thrown
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
</ins></span></pre></div>
<a id="trunkLayoutTestsjsregressobjectrshifthtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/js/regress/object-rshift.html (0 => 200958)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/js/regress/object-rshift.html         (rev 0)
+++ trunk/LayoutTests/js/regress/object-rshift.html        2016-05-16 19:41:01 UTC (rev 200958)
</span><span class="lines">@@ -0,0 +1,12 @@
</span><ins>+<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
+<html>
+<head>
+<script src="../../resources/js-test-pre.js"></script>
+</head>
+<body>
+<script src="../../resources/regress-pre.js"></script>
+<script src="script-tests/object-rshift.js"></script>
+<script src="../../resources/regress-post.js"></script>
+<script src="../../resources/js-test-post.js"></script>
+</body>
+</html>
</ins></span></pre></div>
<a id="trunkLayoutTestsjsregressobjecturshiftexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/js/regress/object-urshift-expected.txt (0 => 200958)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/js/regress/object-urshift-expected.txt         (rev 0)
+++ trunk/LayoutTests/js/regress/object-urshift-expected.txt        2016-05-16 19:41:01 UTC (rev 200958)
</span><span class="lines">@@ -0,0 +1,10 @@
</span><ins>+JSRegress/object-urshift
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+PASS no exception thrown
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
</ins></span></pre></div>
<a id="trunkLayoutTestsjsregressobjecturshifthtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/js/regress/object-urshift.html (0 => 200958)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/js/regress/object-urshift.html         (rev 0)
+++ trunk/LayoutTests/js/regress/object-urshift.html        2016-05-16 19:41:01 UTC (rev 200958)
</span><span class="lines">@@ -0,0 +1,12 @@
</span><ins>+<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
+<html>
+<head>
+<script src="../../resources/js-test-pre.js"></script>
+</head>
+<body>
+<script src="../../resources/regress-pre.js"></script>
+<script src="script-tests/object-urshift.js"></script>
+<script src="../../resources/regress-post.js"></script>
+<script src="../../resources/js-test-post.js"></script>
+</body>
+</html>
</ins></span></pre></div>
<a id="trunkLayoutTestsjsregressobjectxorexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/js/regress/object-xor-expected.txt (0 => 200958)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/js/regress/object-xor-expected.txt         (rev 0)
+++ trunk/LayoutTests/js/regress/object-xor-expected.txt        2016-05-16 19:41:01 UTC (rev 200958)
</span><span class="lines">@@ -0,0 +1,10 @@
</span><ins>+JSRegress/object-xor
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+PASS no exception thrown
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
</ins></span></pre></div>
<a id="trunkLayoutTestsjsregressobjectxorhtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/js/regress/object-xor.html (0 => 200958)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/js/regress/object-xor.html         (rev 0)
+++ trunk/LayoutTests/js/regress/object-xor.html        2016-05-16 19:41:01 UTC (rev 200958)
</span><span class="lines">@@ -0,0 +1,12 @@
</span><ins>+<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
+<html>
+<head>
+<script src="../../resources/js-test-pre.js"></script>
+</head>
+<body>
+<script src="../../resources/regress-pre.js"></script>
+<script src="script-tests/object-xor.js"></script>
+<script src="../../resources/regress-post.js"></script>
+<script src="../../resources/js-test-post.js"></script>
+</body>
+</html>
</ins></span></pre></div>
<a id="trunkLayoutTestsjsregressscripttestsobjectandjs"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/js/regress/script-tests/object-and.js (0 => 200958)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/js/regress/script-tests/object-and.js         (rev 0)
+++ trunk/LayoutTests/js/regress/script-tests/object-and.js        2016-05-16 19:41:01 UTC (rev 200958)
</span><span class="lines">@@ -0,0 +1,17 @@
</span><ins>+(function() {
+ var m = 1000;
+ var n = 1000;
+ var o = {valueOf: function() { return 42; }};
+ var result = 0;
+ for (var i = 0; i < m; ++i) {
+ result += o & 2;
+ for (var j = 0; j < n; ++j)
+ result *= 1.1;
+ for (var j = 0; j < n; ++j)
+ result /= 2;
+ }
+
+ if (result != 4.610197065037039e-260)
+ throw "Error: bad result: " + result;
+})();
+
</ins></span></pre></div>
<a id="trunkLayoutTestsjsregressscripttestsobjectintandarrayjs"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/js/regress/script-tests/object-int-and-array.js (0 => 200958)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/js/regress/script-tests/object-int-and-array.js         (rev 0)
+++ trunk/LayoutTests/js/regress/script-tests/object-int-and-array.js        2016-05-16 19:41:01 UTC (rev 200958)
</span><span class="lines">@@ -0,0 +1,18 @@
</span><ins>+(function() {
+ var result = 0;
+ var m = 100;
+ var n = 100000;
+ var array = [];
+ for (var i = 0; i < 100; ++i)
+ array.push(12);
+ for (var i = 0; i < m; ++i) {
+ var value = 0;
+ var o = {valueOf: function() { return 42; }};
+ value += o;
+ var result = 0;
+ for (var j = 0; j < n; ++j)
+ result += array[value];
+ }
+ if (result != n * 12)
+ throw "Error: bad result: " + result;
+})();
</ins></span></pre></div>
<a id="trunkLayoutTestsjsregressscripttestsobjectlshiftjs"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/js/regress/script-tests/object-lshift.js (0 => 200958)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/js/regress/script-tests/object-lshift.js         (rev 0)
+++ trunk/LayoutTests/js/regress/script-tests/object-lshift.js        2016-05-16 19:41:01 UTC (rev 200958)
</span><span class="lines">@@ -0,0 +1,17 @@
</span><ins>+(function() {
+ var m = 1000;
+ var n = 1000;
+ var o = {valueOf: function() { return 1; }};
+ var result = 0;
+ for (var i = 0; i < m; ++i) {
+ result += 1 << o;
+ for (var j = 0; j < n; ++j)
+ result *= 1.1;
+ for (var j = 0; j < n; ++j)
+ result /= 2;
+ }
+
+ if (result != 4.610197065037039e-260)
+ throw "Error: bad result: " + result;
+})();
+
</ins></span></pre></div>
<a id="trunkLayoutTestsjsregressscripttestsobjectorjs"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/js/regress/script-tests/object-or.js (0 => 200958)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/js/regress/script-tests/object-or.js         (rev 0)
+++ trunk/LayoutTests/js/regress/script-tests/object-or.js        2016-05-16 19:41:01 UTC (rev 200958)
</span><span class="lines">@@ -0,0 +1,17 @@
</span><ins>+(function() {
+ var m = 1000;
+ var n = 1000;
+ var o = {valueOf: function() { return 42; }};
+ var result = 0;
+ for (var i = 0; i < m; ++i) {
+ result += o | 1;
+ for (var j = 0; j < n; ++j)
+ result *= 1.1;
+ for (var j = 0; j < n; ++j)
+ result /= 2;
+ }
+
+ if (result != 9.911923689829635e-259)
+ throw "Error: bad result: " + result;
+})();
+
</ins></span></pre></div>
<a id="trunkLayoutTestsjsregressscripttestsobjectrshiftjs"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/js/regress/script-tests/object-rshift.js (0 => 200958)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/js/regress/script-tests/object-rshift.js         (rev 0)
+++ trunk/LayoutTests/js/regress/script-tests/object-rshift.js        2016-05-16 19:41:01 UTC (rev 200958)
</span><span class="lines">@@ -0,0 +1,17 @@
</span><ins>+(function() {
+ var m = 1000;
+ var n = 1000;
+ var o = {valueOf: function() { return 1; }};
+ var result = 0;
+ for (var i = 0; i < m; ++i) {
+ result += 2 >> o;
+ for (var j = 0; j < n; ++j)
+ result *= 1.1;
+ for (var j = 0; j < n; ++j)
+ result /= 2;
+ }
+
+ if (result != 2.3050985325185195e-260)
+ throw "Error: bad result: " + result;
+})();
+
</ins></span></pre></div>
<a id="trunkLayoutTestsjsregressscripttestsobjecturshiftjs"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/js/regress/script-tests/object-urshift.js (0 => 200958)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/js/regress/script-tests/object-urshift.js         (rev 0)
+++ trunk/LayoutTests/js/regress/script-tests/object-urshift.js        2016-05-16 19:41:01 UTC (rev 200958)
</span><span class="lines">@@ -0,0 +1,17 @@
</span><ins>+(function() {
+ var m = 1000;
+ var n = 1000;
+ var o = {valueOf: function() { return 1; }};
+ var result = 0;
+ for (var i = 0; i < m; ++i) {
+ result += 2 >>> o;
+ for (var j = 0; j < n; ++j)
+ result *= 1.1;
+ for (var j = 0; j < n; ++j)
+ result /= 2;
+ }
+
+ if (result != 2.3050985325185195e-260)
+ throw "Error: bad result: " + result;
+})();
+
</ins></span></pre></div>
<a id="trunkLayoutTestsjsregressscripttestsobjectxorjs"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/js/regress/script-tests/object-xor.js (0 => 200958)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/js/regress/script-tests/object-xor.js         (rev 0)
+++ trunk/LayoutTests/js/regress/script-tests/object-xor.js        2016-05-16 19:41:01 UTC (rev 200958)
</span><span class="lines">@@ -0,0 +1,17 @@
</span><ins>+(function() {
+ var m = 1000;
+ var n = 1000;
+ var o = {valueOf: function() { return 42; }};
+ var result = 0;
+ for (var i = 0; i < m; ++i) {
+ result += o ^ 2;
+ for (var j = 0; j < n; ++j)
+ result *= 1.1;
+ for (var j = 0; j < n; ++j)
+ result /= 2;
+ }
+
+ if (result != 9.220394130074086e-259)
+ throw "Error: bad result: " + result;
+})();
+
</ins></span></pre></div>
<a id="trunkSourceJavaScriptCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/ChangeLog (200957 => 200958)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/ChangeLog        2016-05-16 19:20:40 UTC (rev 200957)
+++ trunk/Source/JavaScriptCore/ChangeLog        2016-05-16 19:41:01 UTC (rev 200958)
</span><span class="lines">@@ -1,3 +1,26 @@
</span><ins>+2016-05-16 Filip Pizlo <fpizlo@apple.com>
+
+ FixupPhase should be more eager to demote bit math to untyped
+ https://bugs.webkit.org/show_bug.cgi?id=157746
+
+ Reviewed by Mark Lam.
+
+ This just makes the logic for how we fixup bit math match the way we do it in other places.
+ This doesn't affect performance on any major benchmark but it's a big win on new
+ microbenchmarks added in this change.
+
+ Details:
+
+ object-and 11.1610+-0.7602 ^ 4.8105+-0.1690 ^ definitely 2.3201x faster
+ object-or 11.0845+-0.2487 ^ 4.7146+-0.0374 ^ definitely 2.3511x faster
+ object-xor 10.2946+-0.9946 ^ 4.7278+-0.0814 ^ definitely 2.1775x faster
+ object-lshift 10.4896+-1.0867 ^ 4.7699+-0.0721 ^ definitely 2.1991x faster
+ object-rshift 11.1239+-0.5010 ^ 4.7194+-0.0445 ^ definitely 2.3570x faster
+ object-urshift 10.9745+-0.1315 ^ 4.7848+-0.0479 ^ definitely 2.2936x faster
+
+ * dfg/DFGFixupPhase.cpp:
+ (JSC::DFG::FixupPhase::fixupNode):
+
</ins><span class="cx"> 2016-05-15 Michael Saboff <msaboff@apple.com>
</span><span class="cx">
</span><span class="cx"> RegExp /y flag incorrect handling of mixed-length alternation
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoredfgDFGFixupPhasecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/dfg/DFGFixupPhase.cpp (200957 => 200958)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/dfg/DFGFixupPhase.cpp        2016-05-16 19:20:40 UTC (rev 200957)
+++ trunk/Source/JavaScriptCore/dfg/DFGFixupPhase.cpp        2016-05-16 19:41:01 UTC (rev 200958)
</span><span class="lines">@@ -105,8 +105,7 @@
</span><span class="cx"> case BitRShift:
</span><span class="cx"> case BitLShift:
</span><span class="cx"> case BitURShift: {
</span><del>- if (Node::shouldSpeculateUntypedForBitOps(node->child1().node(), node->child2().node())
- && m_graph.hasExitSite(node->origin.semantic, BadType)) {
</del><ins>+ if (Node::shouldSpeculateUntypedForBitOps(node->child1().node(), node->child2().node())) {
</ins><span class="cx"> fixEdge<UntypedUse>(node->child1());
</span><span class="cx"> fixEdge<UntypedUse>(node->child2());
</span><span class="cx"> break;
</span></span></pre>
</div>
</div>
</body>
</html>