js/src/jit-test/tests/jaeger/bug663910.js

changeset 0
6474c204b198
equal deleted inserted replaced
-1:000000000000 0:efa1c05910e8
1 var otherGlobalSameCompartment = newGlobal("same-compartment");
2 eval = otherGlobalSameCompartment.eval;
3 doesNotNeedParens(1, "if (xx) { }");
4 needParens(2, "if (1, xx) { }");
5 function doesNotNeedParens(section, pat) {
6 try {
7 f = new Function
8 } catch (e) {}
9 roundTripTest(section, f)
10 }
11 function needParens(section, pat, exp) {
12 var f, ft;
13 roundTripTest(section, f, exp)
14 }
15 function roundTripTest(section, f, exp) {
16 uf = "" + f
17 var euf;
18 try {
19 euf = eval("(" + uf + ")");
20 } catch (e) { }
21 + euf
22 }

mercurial