Fix bug in the count operation where we statically know the input is a smi.
authorfschneider@chromium.org <fschneider@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Tue, 16 Mar 2010 16:03:40 +0000 (16:03 +0000)
committerfschneider@chromium.org <fschneider@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Tue, 16 Mar 2010 16:03:40 +0000 (16:03 +0000)
commit9202e05016c8f68507e3cfc2da104c74913f29b8
tree8bf02d078c31089424557b896c25ae6d9c06adf8
parent78f19f1ae94930b920e5e93ad098382abaf7ac6a
Fix bug in the count operation where we statically know the input is a smi.

Even if we know that the input to a count operation is a smi we still need to check if the result overflowed (and becomes a heap number).

Also fix the smi loop analysis to take two border cases correctly into account.

Review URL: http://codereview.chromium.org/1040002

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4147 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
src/data-flow.cc
src/ia32/codegen-ia32.cc
test/mjsunit/compiler/loopcount.js [new file with mode: 0644]