Fixed nits. I did some spelunking to find the purpose of the "if (loop)" foo, and I think it's just a bogus check. I can roll that into another patch though,
if that's the right thing to do.

https://codereview.chromium.org/15300018/diff/3001/src/ast.h
File src/ast.h (right):

https://codereview.chromium.org/15300018/diff/3001/src/ast.h#newcode860
src/ast.h:860: void Initialize(Expression* each,
On 2013/06/06 10:32:33, rossberg wrote:
Nit: doesn't this fit on one line?

Ah, yep.  Artifact from a previous patch; fixed.

https://codereview.chromium.org/15300018/diff/3001/src/ast.h#newcode2839
src/ast.h:2839: default:
On 2013/06/06 09:36:36, Michael Starzinger wrote:
Please avoid default cases in switches over enums.

Fixed as per Sven's recommendation.  I think it was my inner schemer
somehow modelling switch as a "match" in tail position, forgetting I had
"return" available to me :)

https://codereview.chromium.org/15300018/diff/3001/src/full-codegen.cc
File src/full-codegen.cc (right):

https://codereview.chromium.org/15300018/diff/3001/src/full-codegen.cc#newcode1395
src/full-codegen.cc:1395: void
FullCodeGenerator::VisitForOfStatement(ForOfStatement* stmt) {
On 2013/06/06 10:32:33, rossberg wrote:
Normally I'd want a TODO here, but since that's in flight already it
doesn't
really matter...

Well, why not :) Done.

https://codereview.chromium.org/15300018/diff/3001/src/parser.cc
File src/parser.cc (left):

https://codereview.chromium.org/15300018/diff/3001/src/parser.cc#oldcode2946
src/parser.cc:2946: if (loop) loop->Initialize(expression, enumerable,
body);
On 2013/06/06 10:32:33, rossberg wrote:
Weird, what was the purpose of this condition?

I... I don't know!  I think this is another vestige from an earlier
patch, but I'm almost certain it's correct.  The factory constructor
cannot possibly return a non-null value.  Likewise there are null checks
later in the function for normal For; I'll remove those in the next
patch.  This code was present in the initial V8 import in 2008.

https://codereview.chromium.org/15300018/diff/3001/test/mjsunit/harmony/iteration-syntax.js
File test/mjsunit/harmony/iteration-syntax.js (right):

https://codereview.chromium.org/15300018/diff/3001/test/mjsunit/harmony/iteration-syntax.js#newcode50
test/mjsunit/harmony/iteration-syntax.js:50: // Alack, this appears to
be valid.
On 2013/06/06 10:32:33, rossberg wrote:
However, "for (of x)" or "for (of of)" shouldn't be.

Done.

https://codereview.chromium.org/15300018/

--
--
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/groups/opt_out.


Reply via email to