https://codereview.chromium.org/217823003/diff/1/src/parser.cc
File src/parser.cc (right):
https://codereview.chromium.org/217823003/diff/1/src/parser.cc#newcode3031
src/parser.cc:3031: if (expression == NULL) {
On 2014/04/01 16:13:47, marja wrote:
I don't think that expression can be NULL here. Afaics the parsing
functions
such as ParseExpression only return NULL if they also set ok to false,
and we
check that above.
(Parser contains these checks here and there. Probably some historical
reason,
maybe from times when we didn't have the "ok" boolean but used a NULL
return
value to signal error.)
Good to know. :) Removed.
https://codereview.chromium.org/217823003/diff/1/src/preparser.h
File src/preparser.h (right):
https://codereview.chromium.org/217823003/diff/1/src/preparser.h#newcode428
src/preparser.h:428: // Rewrite an expression that denotes a reference
value.
On 2014/04/01 16:13:47, marja wrote:
The comment is a bit vague if the reader doesn't know already what
this is
doing.
How about e.g.:
Checks if the expression is a valid left hand side (takes into account
strict
mode), and produces the corresponding errors. Exception: calls are
allowed as
left hand sides for web compatibility, and they are rewritten to throw
expressions to produce run time errors.
Done.
And the name, how about <Something>LeftHandSideExpression?
CheckLeftHandSideExpression?
Renamed to CheckAndRewriteReferenceExpression. I think it is incorrect
to speak of LeftHandSideExpr here, since that is an independent
syntactic category -- this function is applied in places that are not
syntactically LHSexprs (e.g. for ++/--). "Reference" is spec terminology
for the respective semantic property. I renamed the IsValidLeftHandSide
predicate to match that.
https://codereview.chromium.org/217823003/
--
--
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.