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

Wed, 31 Dec 2014 06:09:35 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 06:09:35 +0100
changeset 0
6474c204b198
permissions
-rw-r--r--

Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.

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