js/src/jit-test/tests/ion/bug836102.js

Thu, 22 Jan 2015 13:21:57 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Thu, 22 Jan 2015 13:21:57 +0100
branch
TOR_BUG_9701
changeset 15
b8a032363ba2
permissions
-rw-r--r--

Incorporate requested changes from Mozilla in review:
https://bugzilla.mozilla.org/show_bug.cgi?id=1123480#c6

michael@0 1 function t() {
michael@0 2 var x = 0x123456789abcd;
michael@0 3 x = x + x; // x = 640511947003802
michael@0 4 x = x + x; // x = 1281023894007604
michael@0 5 x = x + x; // x = 2562047788015208
michael@0 6 x = x + x; // x = 5124095576030416
michael@0 7 x = x + x; // x = 10248191152060832
michael@0 8 assertEq(x+1 | 0, -248153696)
michael@0 9 }
michael@0 10 t()
michael@0 11
michael@0 12 function t2() {
michael@0 13 var x = -0x123456789abcd;
michael@0 14 x = x + x;
michael@0 15 x = x + x;
michael@0 16 x = x + x;
michael@0 17 x = x + x;
michael@0 18 x = x + x;
michael@0 19 assertEq(x + 7 | 0, 248153704)
michael@0 20 }
michael@0 21 t2()
michael@0 22
michael@0 23 function t() {
michael@0 24 var x = 4294967296+1;
michael@0 25 assertEq(x|0, 1);
michael@0 26 }

mercurial