1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/js/src/jit-test/tests/auto-regress/bug691593.js Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,18 @@ 1.4 +// Binary: cache/js-dbg-64-acf3c1fb7c94-linux 1.5 +// Flags: 1.6 +// 1.7 + 1.8 +genexp = "x * x for (x in [])"; 1.9 +genexpParened = "(" + genexp + ")"; 1.10 +needParens(2, "if (1, xx) { }"); 1.11 +function needParens(section, pat, exp) { 1.12 + ft = pat.replace(/xx/, genexpParened); 1.13 + try { 1.14 + f = new Function(ft); 1.15 + } catch(e) { } 1.16 + overParenTest(section, f, exp); 1.17 +} 1.18 +function overParenTest(section, f, exp) { 1.19 + var uf = "" + f; 1.20 + if (uf.indexOf(genexpParened) != -1) { } 1.21 +}