Thanks for the comments --- I think the various AST visitor questions I
asked
are probably responsible for the failing test case, so I'm going to see if
I can
get that fixed.
https://codereview.chromium.org/1309813007/diff/410001/src/expression-classifier.h
File src/expression-classifier.h (right):
https://codereview.chromium.org/1309813007/diff/410001/src/expression-classifier.h#newcode165
src/expression-classifier.h:165: void RecordExpressionError(const
Scanner::Location& loc,
On 2015/11/24 19:52:09, adamk wrote:
Was this added as a cleanup or to fix something that was broken
before?
Previously, CheckAndRewriteReferenceExpression() would immediately
report an error, which may have been a ReferenceError or SyntaxError
This change makes it possible to delay reporting the error in the event
an ObjectLiteral/ArrayLiteral LHS is used in a
maybe-expression-maybe-arrow-formals context. So, to do this, the error
type has to be recordable (otherwise we violate the spec by throwing
SyntaxErrors that need to be ReferenceErrors, etc).
https://codereview.chromium.org/1309813007/diff/410001/src/parser.h
File src/parser.h (right):
https://codereview.chromium.org/1309813007/diff/410001/src/parser.h#newcode1065
src/parser.h:1065: ASSIGNMENT_INITIALIZER
On 2015/11/24 19:52:10, adamk wrote:
Was this added to fix the mentioned test262 tests? If so can you give
an example
of what it fixes?
This was added to distinguish between AssignmentPattern initializers and
BindingPattern initializers. Since we rewrite variable proxies in
certain function parameter initializers, and this should not happen
(AFAICT) for initializers in assignment patterns.
So it makes it possible to keep the other initializer behaviours (`value
= IS_UNDEFINED(current_value_) ? initializer : current_value_`) while
still distinguishing between the binding context and assignment
contexts, in order to keep that rewriting behaviour working
https://codereview.chromium.org/1309813007/
--
--
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.