Skip to content
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

[Truffle] Adding Long Integer specialization for Fixnum coerce #2834

Merged
merged 1 commit into from Apr 15, 2015

Conversation

bjfish
Copy link
Contributor

@bjfish bjfish commented Apr 14, 2015

No description provided.

@bjfish
Copy link
Contributor Author

bjfish commented Apr 14, 2015

@nirvdrum Does this look right?

@eregon
Copy link
Member

eregon commented Apr 15, 2015

Looks good!

eregon added a commit that referenced this pull request Apr 15, 2015
[Truffle] Adding Long Integer specialization for Fixnum coerce
@eregon eregon merged commit 9f39aa1 into jruby:master Apr 15, 2015
@nirvdrum
Copy link
Contributor

This looks good. You might want to handle the BigInteger case as well just to round it out. Rubinius handles Fixnum and Bignum. I don't see where the String and coercible variants come from. I'll have to ask @chrisseaton about that.

@eregon
Copy link
Member

eregon commented Apr 15, 2015

Yes, there should really not be a String case, but maybe Rubinius code requires it?

eregon added a commit that referenced this pull request Apr 15, 2015
@eregon
Copy link
Member

eregon commented Apr 15, 2015

Removed the String and to_f cases, they are handled by Numeric#coerce.

@eregon
Copy link
Member

eregon commented Apr 15, 2015

And Bignum is not handled specially in MRI, so let's keep it as is.

> 2.coerce (1<<75)
=> [3.777893186295716e+22, 2.0]

@chrisseaton chrisseaton modified the milestone: truffle-dev May 4, 2015
@enebo enebo added this to the Non-Release milestone Dec 7, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants