michael@0: // Binary: cache/js-dbg-64-acf3c1fb7c94-linux michael@0: // Flags: michael@0: // michael@0: michael@0: genexp = "x * x for (x in [])"; michael@0: genexpParened = "(" + genexp + ")"; michael@0: needParens(2, "if (1, xx) { }"); michael@0: function needParens(section, pat, exp) { michael@0: ft = pat.replace(/xx/, genexpParened); michael@0: try { michael@0: f = new Function(ft); michael@0: } catch(e) { } michael@0: overParenTest(section, f, exp); michael@0: } michael@0: function overParenTest(section, f, exp) { michael@0: var uf = "" + f; michael@0: if (uf.indexOf(genexpParened) != -1) { } michael@0: }