AST incorrectly conflates readable and writable locations
authoroliver@apple.com <oliver@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 25 Mar 2014 20:06:07 +0000 (20:06 +0000)
committeroliver@apple.com <oliver@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 25 Mar 2014 20:06:07 +0000 (20:06 +0000)
commit71cc2f50c5c6611cb5c31a0a6b763e56596777be
treef836cadaf63497b44f23858402d8a9cb9695313e
parent0021e477617ef827847fc5ba35588823caf8c4d7
AST incorrectly conflates readable and writable locations
https://bugs.webkit.org/show_bug.cgi?id=130734

Reviewed by Filip Pizlo.

Source/JavaScriptCore:

We need to distinguish between "locations" that are valid for reading
and writing, vs those that may only be written.

* bytecompiler/NodesCodegen.cpp:
(JSC::ForInNode::emitBytecode):
(JSC::ForOfNode::emitBytecode):
* parser/Nodes.h:
(JSC::ExpressionNode::isAssignmentLocation):

LayoutTests:

More tests

* js/parser-syntax-check-expected.txt:
* js/script-tests/parser-syntax-check.js:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@166243 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/js/parser-syntax-check-expected.txt
LayoutTests/js/script-tests/parser-syntax-check.js
Source/JavaScriptCore/ChangeLog
Source/JavaScriptCore/bytecompiler/NodesCodegen.cpp
Source/JavaScriptCore/parser/Nodes.h