Two changes, one a refactoring and one that affects V8's JS semantics.
authorkmillikin@chromium.org <kmillikin@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Wed, 30 Sep 2009 09:49:36 +0000 (09:49 +0000)
committerkmillikin@chromium.org <kmillikin@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Wed, 30 Sep 2009 09:49:36 +0000 (09:49 +0000)
commitfb038bf146532c1706dd0d92fb35da675ad0f129
treef6b319d2eb9838801f6ba3dba0aba721c62c43c8
parentb1a5bf4c5db0fb56bbd3d6f4d79b6dcc84edad2f
Two changes, one a refactoring and one that affects V8's JS semantics.

1. Change the AST node type CallNew to be a subclass of Expression
   rather than Call.  It's not really a call but it just happens to
   have the same fields.

2. Change our error reporting for invalid left-hand sides in for-in
   statements, pre- and postfix count expressions, and assignments.
   Before we signaled a syntax error at compile time *unless* the LHS
   was a function call or 'new' expression, in which case we signaled
   a reference error at runtime.  Now we signal a reference error at
   runtime in all cases.  This matches the JSC behavior in Safari 4.

Review URL: http://codereview.chromium.org/249039

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2994 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
src/ast.h
src/parser.cc
src/usage-analyzer.cc
test/mjsunit/invalid-lhs.js