The implementation looks good already, just a nit. But can we try to increase
the test coverage? I left a list of suggestions in the test file.


https://codereview.chromium.org/15288011/diff/2001/src/parser.h
File src/parser.h (right):

https://codereview.chromium.org/15288011/diff/2001/src/parser.h#newcode662
src/parser.h:662: void InitializeForEachStatement(ForEachStatement*
stmt,
Let's move this declaration out of the block of parse methods (e.g. down
to where BuildObjectLiteralConstantProperties is declared).

https://codereview.chromium.org/15288011/diff/2001/test/mjsunit/harmony/iteration-semantics.js
File test/mjsunit/harmony/iteration-semantics.js (right):

https://codereview.chromium.org/15288011/diff/2001/test/mjsunit/harmony/iteration-semantics.js#newcode33
test/mjsunit/harmony/iteration-semantics.js:33:
Can we increase the test coverage for iterations. I was thinking about
the following cases which are not yet covered:

- Nested for-of statements, to verify that none of the internal
".result" and ".iterator" variables are destroyed.
- Using for-of on arbitrary iterator-like objects that have a next()
method as opposed to just generators.
- Using for-of on iterators that return non-standard result objects
(e.g. missing "done", missing "value", getters on these properties that
count number of accesses)
- Corner-cases where the the next() method is missing or disappears
after a certain number of iterations (to verify that the "iterator.next"
lookup is performed on every iteration).

https://codereview.chromium.org/15288011/

--
--
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