Closed
Bug 869532
Opened 12 years ago
Closed 12 years ago
Simplify NaN check in BaselineIC-x86-shared.cpp
Categories
(Core :: JavaScript Engine, enhancement)
Tracking
()
RESOLVED
FIXED
mozilla23
People
(Reporter: sunfish, Assigned: sunfish)
References
Details
Attachments
(1 file, 2 obsolete files)
1.81 KB,
patch
|
nbp
:
review+
|
Details | Diff | Splinter Review |
The code in ICCompare_Double::Compiler::generateStubCode makes an unconditional NaN check, which could be avoided after the fix for bug 869507.
Assignee | ||
Updated•12 years ago
|
Assignee | ||
Comment 1•12 years ago
|
||
Comment 2•12 years ago
|
||
Comment on attachment 746493 [details] [diff] [review]
a patch containing a proposed fix
Review of attachment 746493 [details] [diff] [review]:
-----------------------------------------------------------------
This sounds good to me.
Just need to update the NaN_Unexpected by NaN_HandledByCond.
I will do this minor modification and push it for you.
Attachment #746493 -
Flags: review+
Comment 3•12 years ago
|
||
Comment on attachment 746493 [details] [diff] [review]
a patch containing a proposed fix
Review of attachment 746493 [details] [diff] [review]:
-----------------------------------------------------------------
::: js/src/ion/shared/BaselineIC-x86-shared.cpp
@@ +30,5 @@
> + // Check for NaN, if needed.
> + Assembler::NaNCond nanCond = Assembler::NaNCondFromDoubleCondition(cond);
> + if (nanCond != Assembler::NaN_Unexpected) {
> + masm.j(Assembler::NoParity, ¬NaN);
> + masm.moveValue(BooleanValue(nanCond == Assembler::NaN_IsTrue), dest);
nit: can you use masm.move(Int32(nanCond == Assembler::NaN_IsTrue), dest);
as we are packing the value after.
Attachment #746493 -
Flags: review+ → feedback+
Comment 4•12 years ago
|
||
(In reply to Nicolas B. Pierron [:nbp] from comment #3)
> Review of attachment 746493 [details] [diff] [review]:
> -----------------------------------------------------------------
>
> > + masm.moveValue(BooleanValue(nanCond == Assembler::NaN_IsTrue), dest);
>
> nit: can you use masm.move(Int32(nanCond == Assembler::NaN_IsTrue), dest);
>
> as we are packing the value after.
Thanks to jandem for catching this one.
Assignee: general → sunfish
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
Assignee | ||
Comment 5•12 years ago
|
||
Updated per review feedback.
Attachment #746493 -
Attachment is obsolete: true
Attachment #747177 -
Flags: review?(nicolas.b.pierron)
Assignee | ||
Comment 6•12 years ago
|
||
Sorry for all the trouble here. This patch now builds and passes tests on its own.
Attachment #747177 -
Attachment is obsolete: true
Attachment #747177 -
Flags: review?(nicolas.b.pierron)
Attachment #747185 -
Flags: review?(nicolas.b.pierron)
Updated•12 years ago
|
Attachment #747185 -
Flags: review?(nicolas.b.pierron) → review+
Comment 7•12 years ago
|
||
Comment 8•12 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla23
You need to log in
before you can comment on or make changes to this bug.
Description
•