https://codereview.chromium.org/939063002/diff/1/src/parser.cc
File src/parser.cc (right):
https://codereview.chromium.org/939063002/diff/1/src/parser.cc#newcode2884
src/parser.cc:2884: bool Parser::CheckInOrOf(bool accept_OF,
On 2015/02/19 12:34:22, marja wrote:
... could you move CheckInOrOf to ParserBase, seems pretty unnecessary
to have
it twice.
Done.
https://codereview.chromium.org/939063002/diff/1/src/preparser.cc
File src/preparser.cc (right):
https://codereview.chromium.org/939063002/diff/1/src/preparser.cc#newcode752
src/preparser.cc:752: if (*ok) {
On 2015/02/19 12:34:22, marja wrote:
Nit: I'd write this the same style as Parser, so,
if (!*ok) early return_;
go_on();
... just to keep the logic as unified as possible. It's just a tiny
thing but
Parser / PreParser are full of these unnecessary "let's inverse the
condition
and write the blocks in a different order" things which accumulate and
make the
eventual unification more tedious.
Done.
https://codereview.chromium.org/939063002/diff/1/test/mjsunit/strong/for-in.js
File test/mjsunit/strong/for-in.js (right):
https://codereview.chromium.org/939063002/diff/1/test/mjsunit/strong/for-in.js#newcode12
test/mjsunit/strong/for-in.js:12: assertThrows("'use strong'; for (var x
= 0 in []);", SyntaxError);
On 2015/02/19 12:34:22, marja wrote:
Can we has tests that for of still works?
Done. Also removed the nonsensical var tests, since that's illegal
anyway.
(In general, how are we going to test that the stuff we want to keep
working
stays working? Should we have a list of tests which should also work
w/ strong
mode and then run them w/ strong mode, so that we don't need to
duplicate them?)
Good question. Most existing tests will probably not work, for 'var'
alone. Maybe it's good enough to have a number of dedicated strong mode
test programs. If something really gets ruled out accidentally then I
suppose we gonna find out relatively quickly...
https://codereview.chromium.org/939063002/
--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
---
You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.