I think it makes sense to distinguish between fully smi and fully string literal
cases and do not compile mixed switches.

When switch is fully string literal you can emit symbol check before all
comparisons (GVN will eliminate redundant checks automatically but why leave it
to GVN if we can do it easily manually).


http://codereview.chromium.org/8373029/diff/1/src/hydrogen.cc
File src/hydrogen.cc (right):

http://codereview.chromium.org/8373029/diff/1/src/hydrogen.cc#newcode2726
src/hydrogen.cc:2726: compare->SetSuccessorAt(0, body_block);
Can be moved outside of the if to avoid code duplication.

http://codereview.chromium.org/8373029/

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

Reply via email to