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

Sat, 03 Jan 2015 20:18:00 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Sat, 03 Jan 2015 20:18:00 +0100
branch
TOR_BUG_3246
changeset 7
129ffea94266
permissions
-rw-r--r--

Conditionally enable double key logic according to:
private browsing mode or privacy.thirdparty.isolate preference and
implement in GetCookieStringCommon and FindCookie where it counts...
With some reservations of how to convince FindCookie users to test
condition and pass a nullptr when disabling double key logic.

michael@0 1 function f0(p0) {
michael@0 2 var v0 = 0.5;
michael@0 3 var v1 = 1.5;
michael@0 4 var v2 = 2.5;
michael@0 5 var v3 = 3.5;
michael@0 6 var v4 = 4.5;
michael@0 7 var v5 = 5.5;
michael@0 8 var v6 = 6.5;
michael@0 9 var v7 = 7.5;
michael@0 10 var v8 = 8.5;
michael@0 11 var v9 = 9.5;
michael@0 12 var v10 = 10.5;
michael@0 13 var v11 = 11.5;
michael@0 14 var v12 = 12.5;
michael@0 15 var v13 = 13.5;
michael@0 16 var v14 = 14.5;
michael@0 17 var v15 = 15.5;
michael@0 18 var v16 = 16.5;
michael@0 19 // 0.125 is used to avoid the oracle choice for int32.
michael@0 20 while (0) {
michael@0 21 // p0 = false;
michael@0 22 var tmp = v0;
michael@0 23 v0 = 0.125 + v0 + v1;
michael@0 24 v1 = 0.125 + v1 + v2;
michael@0 25 v2 = 0.125 + v2 + v3;
michael@0 26 v3 = 0.125 + v3 + v4;
michael@0 27 v4 = 0.125 + v4 + v5;
michael@0 28 v5 = 0.125 + v5 + v6;
michael@0 29 v6 = 0.125 + v6 + v7;
michael@0 30 v7 = 0.125 + v7 + v8;
michael@0 31 v8 = 0.125 + v8 + v9;
michael@0 32 v9 = 0.125 + v9 + v10;
michael@0 33 v10 = 0.125 + v10 + v11;
michael@0 34 v11 = 0.125 + v11 + v12;
michael@0 35 v12 = 0.125 + v12 + v13;
michael@0 36 v13 = 0.125 + v13 + v14;
michael@0 37 v14 = 0.125 + v14 + v15;
michael@0 38 v15 = 0.125 + v15 + v16;
michael@0 39 v16 = 0.125 + v16 + tmp;
michael@0 40 }
michael@0 41 return 0.5 + v0 + v1 + v2 + v3 + v4 + v5 + v6 + v7 + v8 + v9 + v10 + v11 + v12 + v13 + v14 + v15 + v16;
michael@0 42 }
michael@0 43
michael@0 44 // expect 145
michael@0 45 assertEq(f0(false), 145);
michael@0 46

mercurial