https://codereview.chromium.org/110123002/diff/20001/src/hydrogen.cc
File src/hydrogen.cc (right):

https://codereview.chromium.org/110123002/diff/20001/src/hydrogen.cc#newcode4174
src/hydrogen.cc:4174: for (int i = 0; i < clause_count; ++i) {
It seems like this loop can be rewritten to go over the clauses once,
generating the compares and the body blocks in one pass. If so, then we
can get rid of this body_blocks array altogether.

https://codereview.chromium.org/110123002/diff/20001/test/mjsunit/switch-opt.js
File test/mjsunit/switch-opt.js (right):

https://codereview.chromium.org/110123002/diff/20001/test/mjsunit/switch-opt.js#newcode40
test/mjsunit/switch-opt.js:40:
I would like to see several more tests for this optimization, as there
seem to be many things that can go wrong. E.g. this test doesn't even
have any fallthrough between blocks.

I would have more confidence if I saw ~10 or more different switch
statements in this test.

https://codereview.chromium.org/110123002/

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