-
Notifications
You must be signed in to change notification settings - Fork 859
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bugs in number to string conversion #254
Comments
Of course it'd be great if you had time to work on that, but we have a few On Sat, Nov 14, 2015 at 12:21 AM, Hannes Wallnöfer <[email protected]
Greg Brail | apigee https://apigee.com/ | twitter @gbrail |
is anyone looking at this? I havent worked on rhino before, and it looks like an easy first task. Please advise |
Hannes was going to port some code from Nashorn but I don't think he has On Mon, Feb 1, 2016 at 2:00 PM, Gaurav [email protected] wrote:
Greg Brail | apigee https://apigee.com/ | twitter @gbrail |
Links to |
Dear Guys, I would appreciate the opportunity to work on these tasks. Could someone kindly provide me with a hint or guidance regarding the location of the error code? Thank you. |
I recently ported the V8 double-conversion package to Java for Nashorn. I've done this previously for Rhino, the code is in the v8dtoa package. Since I did the Rhino port, the code has been pulled into a standalone library and greatly enhanced. There's now code for all three kinds of conversion (shortest, fixed, precision) as well as a Bignum-based fallback implementation, and most of all there's a very good test suite (which may have existed before, but probably as part of the greater V8 test suite).
During the Nashorn port I realized that there probably are some bugs in the Rhino port, mostly subtle ones related to signed operations on longs/ints that should be treated as unsigned. In Nashorn I made use of the new unsigned Long/Integer arithmetic API in JDK8, which is probably not an option for Rhino. Still, the Nashorn code and test suite can probably help in spotting the these issues.
http://hg.openjdk.java.net/jdk9/dev/nashorn/file/53edf7f3f10c/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/runtime/doubleconv
http://hg.openjdk.java.net/jdk9/dev/nashorn/file/53edf7f3f10c/test/src/jdk/nashorn/internal/runtime/doubleconv/test
I'd be happy to help getting this fixed in Rhino. I don't have the time to do it right now. I hope I'll find some time for it soon, and of course I'd also be happy to assist anybody else willing to tackle it. A good first step would be to run FastDtoaTest against the FastDtoa.java class in Rhino.
The text was updated successfully, but these errors were encountered: