Improve performance of keyed loads/stores which have a HeapNumber index.
authorfschneider@chromium.org <fschneider@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Thu, 12 Apr 2012 08:35:30 +0000 (08:35 +0000)
committerfschneider@chromium.org <fschneider@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Thu, 12 Apr 2012 08:35:30 +0000 (08:35 +0000)
commit71702e1da3918eea34eeadd28edacc3cf4c41eb6
treead3669d6d9e2ab78d5026709ad86f6a7ff53b954
parentde169b7d43ae1a623518d0c56a64638156efce65
Improve performance of keyed loads/stores which have a HeapNumber index.

Some GWT compiled code results in array access that has a heap number (e.g. -0)
as an index. Until now this would result in a generic IC.

For example:

a[-0] === a[0] or

a[0.25 * 4] === a[1]

This change detects heap numbers that are representable as a smi
and converts them. As a result we can still use the fast keyed monomorphic
ICs. Optimized code already handles keyed access with a double-key efficiently.

As a result the frame rate on the reported benchmark improves by roughly 2x.

BUG=v8:1388,v8:1295
Review URL: https://chromiumcodereview.appspot.com/9837109

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11282 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
src/arm/stub-cache-arm.cc
src/ia32/stub-cache-ia32.cc
src/ic.cc
src/x64/stub-cache-x64.cc