Closed Bug 845016 Opened 9 years ago Closed 9 years ago

IonMonkey: Inline Math.abs on differing input/output types

Categories

(Core :: JavaScript Engine, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla22

People

(Reporter: shu, Unassigned)

Details

Attachments

(1 file)

We should inline Math.abs with double input and int output. Int input and double output is an impossible combination.
Attached patch patchSplinter Review
Attachment #718041 - Flags: review?(sstangl)
Attachment #718041 - Flags: review?(sstangl) → review+
Comment on attachment 718041 [details] [diff] [review]
patch

Just as a note, MToInt32 -> visitDoubleToInt32() contains a negative zero test and a bailout, which is obviously impossible in this scenario. We could optimize it better -- perhaps even doing the testing and negation on integers.
(In reply to Shu-yu Guo [:shu] from comment #0)
> We should inline Math.abs with double input and int output. Int input and
> double output is an impossible combination.

Except for INT_MIN, but this would work as soon as we support UInt32.
https://hg.mozilla.org/mozilla-central/rev/b9bdc1d96b6a
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla22
You need to log in before you can comment on or make changes to this bug.