Closed blickly closed 9 years ago
tangentially, does anyone keep a master table of which js interpreters implement which
parts of ES5, just so that people know how to repro issues like this?
Original issue reported on code.google.com by Nicholas.J.Santos
on 2009-12-27 16:59:18
This thread is relevant to ES5 implementations:
https://mail.mozilla.org/pipermail/es-discuss/2009-December/010472.html
Original issue reported on code.google.com by mikesamuel
on 2009-12-27 23:03:05
Is this a useful difference, or would an error on aliasing eval be sufficient?
Original issue reported on code.google.com by concavelenz
on 2010-01-01 01:12:10
I don't think it's possible to tell whether eval is aliased.
Unless your function types include parameter name info, you can't make accurate
aliasing decisions around parameters.
Consider:
function f(e, x) { return e(x); }
function g(eval, x) { return eval(x); }
(Math.random() < 0.5 ? f : g)(eval, '1 + 1);
You would have to be more restrictive and not just prevent aliasing, but prevent its
use as a first-class function.
Once you've done that, you're basically mandating that it be used as the eval
operator, and then for all uses, renaming would be bad because it would again
convert from eval operator to eval function.
Original issue reported on code.google.com by mikesamuel
on 2010-01-01 02:06:13
Yes, restricting it to be just the eval operator is what I was suggesting. Which may
not be appropriate for safe mode, but might be for advanced mode. The question is
how
burdensome would this restriction be.
Original issue reported on code.google.com by concavelenz
on 2010-01-02 06:45:46
Ah.
(0, eval)(foo) does something quite similar to (new Function(foo))() with a few
differences. So not having the eval function does not severely limit the set of
expressible programs.
Original issue reported on code.google.com by mikesamuel
on 2010-01-02 17:43:25
should be fixed in r79
Original issue reported on code.google.com by Nicholas.J.Santos
on 2010-01-28 01:23:15
Original issue reported on code.google.com by
mikesamuel
on 2009-12-26 19:47:19