LGTM if you add a unit test.

Please add a mjsunit test that covers all the cases of your analysis: Hoisting
of checks with positive and negative offsets a[i] where i = expr-1, expr,
expr+1, etc. within a block, and also elimination of covered checks across
dominated blocks, etc.

You can look at existing test files how to force optimization of a function
(search for OptimizeFunctionOnNextCall).



http://codereview.chromium.org/10032029/diff/16001/src/hydrogen.cc
File src/hydrogen.cc (right):

http://codereview.chromium.org/10032029/diff/16001/src/hydrogen.cc#newcode2621
src/hydrogen.cc:2621:
Two lines space here.

http://codereview.chromium.org/10032029/diff/16001/src/hydrogen.cc#newcode2694
src/hydrogen.cc:2694:
Two lines space here.

http://codereview.chromium.org/10032029/diff/16001/src/hydrogen.cc#newcode2701
src/hydrogen.cc:2701:
Two lines space here.

http://codereview.chromium.org/10032029/diff/16001/src/hydrogen.cc#newcode2720
src/hydrogen.cc:2720:
Two lines space here.

http://codereview.chromium.org/10032029/diff/16001/src/hydrogen.cc#newcode2737
src/hydrogen.cc:2737: // TODO(mmassi): allocate key only when we create
a new table  entry...
If we plan to implement the TODO, we usually create an issue on the v8
issue tracker and write TODO(issue number).

As discussed offline, we leave it as is for now, so I'd remove the
TODO-line completely.

http://codereview.chromium.org/10032029/diff/16001/src/hydrogen.cc#newcode2781
src/hydrogen.cc:2781:
Two lines space here.

http://codereview.chromium.org/10032029/

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

Reply via email to