On 6/12/15 8:21 PM, KOLANICH wrote:
No. I really think that -0 === +0 also should be false, because they are
different objects. So should be 0=="0". I don't think it will break a
lot of code
Theory is great, but experiment is better.
With that in mind, I have created a build of Firefox 38 that you can try
that has just your proposed modification for ==: test false when one
side is a string and the other is a number. Making -0 === +0 test false
would take more effort than I'm willing to put in right now, since the
JITs actually optimize that path, unlike the other one, and I'd have to
change the actual low-level assembly used in a pretty nontrivial (e.g.
ucomisd treats 0 and -0 as equal so I'd need to add manual tests for 0
vs -0).
In any case, you can try this build out and report back on whether you
find any problems on websites.
You can download the test builds at one of the following links,
depending on which one you want:
http://ftp.mozilla.org/pub/mozilla.org/firefox/try-builds/[email protected]/try-linux/firefox-38.0.6.en-US.linux-i686.tar.bz2
http://ftp.mozilla.org/pub/mozilla.org/firefox/try-builds/[email protected]/try-linux64/firefox-38.0.6.en-US.linux-x86_64.tar.bz2
http://ftp.mozilla.org/pub/mozilla.org/firefox/try-builds/[email protected]/try-win32/firefox-38.0.6.en-US.win32.zip
The Mac build is still in progress, but should appear in
http://ftp.mozilla.org/pub/mozilla.org/firefox/try-builds/[email protected]/try-macosx64/
in a few hours I expect.
-Boris
P.S. I've encountered at least one site in the past week that relied on
string vs number == just triaging bug reports. So I'm not too hopeful
about your chances of avoiding problems with this build, but I figure
you should give it a shot at least.
_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss