-
Notifications
You must be signed in to change notification settings - Fork 286
Reenable unboxed values #969
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
Conversation
This will fail even with the current workaround
- Change INT to a type that remembers whether it was boxed or not. - We still need a way of specifying a plain unboxed int, so add a "phony" UNBOXED_INT. UNBOXED_INT is not usable as a variable type, but can be used to specify argument and return types. It's up to the receiver (irgen or type analysis) to convert UNBOXED_INT to a usable INT. Right now that's only guarded with a number of asserts (and not through, say, the C++ type system).
|
Automated message from Dropbox CLA bot @kmod, thanks for the pull request! It looks like you haven't yet signed the Dropbox CLA. Please sign it here and update the thread so we can consider merging your code. |
|
The message from Dropbox CLA bot.... LOL. This function is just enabled? |
|
from what I understood this PR looks good to me :-) |
|
well the bot was right, I hadn't signed the CLA :P |
|
@undingen thanks for looking at the pr :) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't quite understand these code for now. But if my understanding was correct. This change cause the error in #971. (I am reading the JIT part source code in these days. Hope I could gather enough questions before 0.4 release. )
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm yeah this PR did introduce that. Can you try merging #973 to see if that helps?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! I will try that.
Feels like more work than it was worth:
For now unboxed values can't get passed between BBs (compiler types don't have a hook to specify how to phi themselves, but that shouldn't be too hard to add if we need it). Even with this limitation we seem to get most (but not all) of the benefit.
I think there's still some cases that this is missing, but after working on this for a few days I think it's time to check in what's working and I'll just fix any issues if we notice any.