[Webkit-unassigned] [Bug 151026] Destructuring Assignment: Properties are valid AssignmentElements
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Thu Nov 12 15:51:17 PST 2015
https://bugs.webkit.org/show_bug.cgi?id=151026
Geoffrey Garen <ggaren at apple.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Attachment #265428|review? |review-
Flags| |
--- Comment #7 from Geoffrey Garen <ggaren at apple.com> ---
Comment on attachment 265428
--> https://bugs.webkit.org/attachment.cgi?id=265428
Accept any LHS for AssignmentElements (no tests yet)
View in context: https://bugs.webkit.org/attachment.cgi?id=265428&action=review
Thanks for the patch. This looks pretty good.
Please add test cases. Also, a few comments below.
> Source/JavaScriptCore/bytecompiler/NodesCodegen.cpp:3454
> +void AssignmentElementNode::toString(StringBuilder& builder) const
> +{
> + if (m_assignmentTarget->isResolveNode())
> + builder.append(static_cast<ResolveNode*>(m_assignmentTarget)->identifier().string());
> +}
Can you add support for isDotAccessorNode and isBracketAccessorNode here?
> Source/JavaScriptCore/parser/Parser.cpp:864
> + if (!element || !context.isAssignmentLocation(element)) {
> + // TODO: Early SyntaxError per http://tc39.github.io/ecma262/#sec-assignment-operators-static-semantics-early-errors
> + return 0;
You can use "failIfFalse(element && context.isAssignmentLocation(element), message)" here.
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.webkit.org/pipermail/webkit-unassigned/attachments/20151112/18af7808/attachment.html>
More information about the webkit-unassigned
mailing list