incorporated all feedback, thanks for the review, Lasse!

Martin


http://codereview.chromium.org/6335013/diff/1/src/messages.js
File src/messages.js (right):

http://codereview.chromium.org/6335013/diff/1/src/messages.js#newcode240
src/messages.js:240: strict_lhs_postfix:           "Operand of postfix
expression may not be eval or arguments in strict mode",
On 2011/01/26 08:03:59, Lasse Reichstein wrote:
Unless this is what Webkit uses as error message (we should generally
match
those), it should say that it's only increment/decrement postfix and
prefix
operators that must not be eval or arguments (i.e., when the operand
must be an
LValue), and not, e.g., the "!" operator.

Webkit only says "parse error". Updated the errors to refer to incr/decr
only. I still have the bug open to eventually go through all the error
messages and reconcile them with jsc and mozilla.

http://codereview.chromium.org/6335013/diff/1/src/parser.h
File src/parser.h (right):

http://codereview.chromium.org/6335013/diff/1/src/parser.h#newcode617
src/parser.h:617: void CheckStrictModeLHSName(Expression* expression,
On 2011/01/26 08:03:59, Lasse Reichstein wrote:
I prefer LValue to LHS. We *try*, without being completely successful,
to avoid
abbreviations in names, except where the abbreviation is the common
way to refer
to the concept (e.g., JSON, ASCII, etc.)
To me LValue is a canonical name, but LHS is just an abbreviation.
That's
obviously purely subjective :)

Renamed to CheckStrictModeLValue

http://codereview.chromium.org/6335013/diff/1/test/mjsunit/strict-mode.js
File test/mjsunit/strict-mode.js (right):

http://codereview.chromium.org/6335013/diff/1/test/mjsunit/strict-mode.js#newcode187
test/mjsunit/strict-mode.js:187:
On 2011/01/26 08:03:59, Lasse Reichstein wrote:
Try a compound assignment operator as well, e.g., "-=".

Done.

http://codereview.chromium.org/6335013/diff/1/test/mjsunit/strict-mode.js#newcode218
test/mjsunit/strict-mode.js:218: CheckStrictMode("function strict() {
var x = --arguments; }", SyntaxError)
On 2011/01/26 08:03:59, Lasse Reichstein wrote:
Check that not-lvalue-operand operators doesn't throw, e.g., "!" or
"-".

Done.

http://codereview.chromium.org/6335013/

--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev

Reply via email to