Skip to content

[Truffle] Adding #to_int to Array#at paramters.#2685

Merged
nirvdrum merged 1 commit intojruby:masterfrom
bjfish:truffle_array_at
Mar 11, 2015
Merged

[Truffle] Adding #to_int to Array#at paramters.#2685
nirvdrum merged 1 commit intojruby:masterfrom
bjfish:truffle_array_at

Conversation

@bjfish
Copy link
Contributor

@bjfish bjfish commented Mar 11, 2015

I removed lowerFixnumParameter because it wasn’t handling double.

I’m not sure if the guard is needed?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Safe to remove this?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Per my comment on the PR, I think this should stay and a new specialization for double added.

@nirvdrum
Copy link
Contributor

We could have FixnumLowerNode truncate, but that's probably not safe in every case. I think you're going to need a new a @Specialization on double that does the correct conversion. I think for the most part, Ruby truncates and then uses the resulting Fixnum for the index.

@bjfish bjfish force-pushed the truffle_array_at branch from 6f36fe5 to e492774 Compare March 11, 2015 22:34
nirvdrum added a commit that referenced this pull request Mar 11, 2015
[Truffle] Adding #to_int to Array#at paramters.
@nirvdrum nirvdrum merged commit 06be1c0 into jruby:master Mar 11, 2015
@chrisseaton chrisseaton added this to the truffle-dev milestone Mar 11, 2015
@bjfish bjfish deleted the truffle_array_at branch March 12, 2015 13:17
@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.

4 participants