On 2014/06/18 at 15:15:15, marja wrote:
On 2014/06/18 15:08:02, marja wrote:
> Hmm, though, detecting "eval" and such complicates the "is comma
separated
> parameter list" stuff a bit, I guess...
Argh, and the fact that the function can declare itself strict complicates
this even further.
We could maybe go with the approach that just says "invalid strict mode
parameter list" if there is eval or such in it, without pointing to the
location. rossberg@, would that be acceptable?
Like this:
(foo, bar, eval) => { "use strict"; }
^--------------^
malformed strict mode parameter list
This style of error reporting is now implemented in the last version of the
patch
set, which I have just uploaded. I have been able to remove ParamListFinder
--so
the Scanner does not get the performance hit-- by tracking whether an
expression
is parenthesized once or more than once. Implementation-wise, this is two
flag
bits in PreParserExpression (one of the bits is set for parenthesized
expressions,
another for being parenthesized more than once), and an integer value in
Expression
for the parenthesization level.
The only thing that PreParser cannot do now is detecting duplicated
identifiers,
which is tricky as PreParserIdentifier does not have the strings with the
names
of the identifiers (ugh!). For the moment I have decided to add a TODO item
for
revisiting duplicate identifier detection later on, so we can try to get
this CL
landed, and keep discussing how to solve the issue with duplicate
identifiers.
https://codereview.chromium.org/160073006/
--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
---
You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.