Comment #5 on issue 2740 by [email protected]: r15156 slowed some array code WAY down
http://code.google.com/p/v8/issues/detail?id=2740

Ryan, thanks for the high-quality bug report!

What happens is that in unoptimized code, the keyed store stub misses and goes generic because it gets a heap number as the index value, which its bounds check can't deal with. That in turn causes Hydrogen to pick a generic store instruction too.
There are at least three issues at play here:

1) Since r15156, the HBoundsCheck unconditionally ignores Tagged input representations and treats them as Smi. It's trivial to add an "&& input->type().IsSmi()" to the condition to be a little more conservative there; and that's my suggestion for fixing the issue at hand.

2) The Tagged-to-Smi conversion is too limited as it simply does a Smi check. It should support heap number unboxing as well.

3) The heap number originally comes from the "size.val" load. It seems fishy to me that this field is using Double representation, I think it should be a Smi.

I have a fix for (1) which we can safely backport to trunk to make sure it gets into M29. I'm planning to fix (2) as well, hoping that emitting some more code won't lead to performance regressions.
Toon should look at (3) when he comes back.

--
You received this message because this project is configured to send all issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings

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