Only have one implementation of JSDOUBLE_IS_NaN, not two-via-ifdefs

RESOLVED FIXED in mozilla12



JavaScript Engine
6 years ago
2 years ago


(Reporter: Waldo, Assigned: Waldo)



Firefox Tracking Flags

(Not tracked)



(1 attachment, 2 obsolete attachments)

Created attachment 590441 [details] [diff] [review]

JSDOUBLE_IS_NaN contains two separate implementations, one for MIPS, and one for everything else.  I don't see why there can't just be one.  The attached patch implements this.

(Tangentially, all this double-bit-manipulation/frobbing stuff needs to move out of the JS engine.  The same functionality is also coded up in content/ in different form, but there's no good reason to have to implement it all twice.  But that should be another bug.)
Attachment #590441 - Flags: review?(dvander)
Comment on attachment 590441 [details] [diff] [review]

Review of attachment 590441 [details] [diff] [review]:

Er, scratch that, I was looking at the wrong part of IEEE-754.  The right patch in a sec.
Attachment #590441 - Flags: review?(dvander)
Created attachment 590442 [details] [diff] [review]
Real patch
Assignee: general → jwalden+bmo
Attachment #590441 - Attachment is obsolete: true
Attachment #590442 - Flags: review?(dvander)
Comment on attachment 590442 [details] [diff] [review]
Real patch

glandium pointed me at the trail of tears in bug 640494 and bug 653056 -- namely, that MSVC+PGO miscompiles the MIPS bitwise algorithm here.  So this version's a no-go.  I'll do some experimenting and figure out an approach that'll appease all the compiler gods, then re-request review once I've done that.
Attachment #590442 - Flags: review?(dvander)
Created attachment 590547 [details] [diff] [review]
Patch that definitely passes try, including PGO builds

Okay, this should really do it.  I did a try push that also enabled PGO, and while there seems to be the usual level of orangeness to it, there doesn't seem to be any PGO-specific orange.

And despite that not mentioning PGO explicitly as a listed "Win pgo" item, PGO definitely happened.  Ed Morley says the string to search for in the logs is "linker max virtual size", and that's definitely present in them.  So I think this is good to go.
Attachment #590442 - Attachment is obsolete: true
Attachment #590547 - Flags: review?(dvander)
Attachment #590547 - Flags: review?(dvander) → review+

To be safe, this probably shouldn't be closed until we've had a round of PGO builds on m-c pass with it.
Target Milestone: --- → mozilla12

Is not PGO on inbound enough to close this?
Inbound doesn't do PGO builds, I thought.  But, looking back, I see it does them "sometimes", with no rhyme or reason I can see.  As long as those passed, we should be good.
pgo builds are made every 3 hours, on all trees. Nightlies are also PGO. Merges from inbound to central happen only on pushes that got a green pgo build+tests.
Last Resolved: 6 years ago
Resolution: --- → FIXED
In the interest of developer sanity at having to think about different implementations of on trunk and branches, it seemed a good idea to get this in branches as well.  I talked it over with akeybl, and he was persuaded to take it in aurora.
...and beta as well:
Blocks: 720070
You need to log in before you can comment on or make changes to this bug.