Allow any LeftHandSideExpression as a valid AssignmentElement
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 13 Nov 2015 19:13:39 +0000 (19:13 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 13 Nov 2015 19:13:39 +0000 (19:13 +0000)
commitca5e71ff02476bc6becaff87ced85f762684186e
tree0f5f5ea809bd329ee9573b8188428696a1dcb4bb
parentcb897ac5ba5747fdbf83140c22af87b368f050d5
Allow any LeftHandSideExpression as a valid AssignmentElement
https://bugs.webkit.org/show_bug.cgi?id=151026

Patch by Caitlin Potter <caitpotter88@gmail.com> on 2015-11-13
Reviewed by Geoffrey Garen.

* bytecompiler/NodesCodegen.cpp:
(JSC::AssignmentElementNode::collectBoundIdentifiers):
(JSC::AssignmentElementNode::bindValue):
(JSC::AssignmentElementNode::toString):
* parser/ASTBuilder.h:
(JSC::ASTBuilder::isAssignmentLocation):
(JSC::ASTBuilder::createAssignmentElement):
* parser/NodeConstructors.h:
(JSC::AssignmentElementNode::AssignmentElementNode):
* parser/Nodes.h:
(JSC::AssignmentElementNode::assignmentTarget):
(JSC::AssignmentElementNode::divotStart):
(JSC::AssignmentElementNode::divotEnd):
* parser/Parser.cpp:
(JSC::Parser<LexerType>::createAssignmentElement):
(JSC::Parser<LexerType>::parseDestructuringPattern):
* parser/Parser.h:
* parser/SyntaxChecker.h:
(JSC::SyntaxChecker::operatorStackPop):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@192436 268f45cc-cd09-0410-ab3c-d52691b4dbfc
13 files changed:
Source/JavaScriptCore/ChangeLog
Source/JavaScriptCore/bytecompiler/NodesCodegen.cpp
Source/JavaScriptCore/parser/ASTBuilder.h
Source/JavaScriptCore/parser/NodeConstructors.h
Source/JavaScriptCore/parser/Nodes.h
Source/JavaScriptCore/parser/Parser.cpp
Source/JavaScriptCore/parser/Parser.h
Source/JavaScriptCore/parser/SyntaxChecker.h
Source/JavaScriptCore/tests/es6.yaml
Source/JavaScriptCore/tests/es6/destructuring_assignment_non_simple_target.js [new file with mode: 0644]
Source/JavaScriptCore/tests/es6/destructuring_initializer_scoping.js [new file with mode: 0644]
Source/JavaScriptCore/tests/stress/destructuring-assignment-syntax.js [new file with mode: 0644]
Source/JavaScriptCore/tests/stress/rest-elements.js