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

Add keyword arguments support for zsuper #3589

Merged
merged 2 commits into from
Apr 6, 2016

Conversation

ahmadsherif
Copy link
Member

I'm not sure if the direction I took for solving this problem (using the placeholder, etc.) is right, so a feedback would be appreciated. Also, I didn't remove the "fails" tags for specs related to this problem because the changes here are needed for the specs to pass.

@yorickpeterse
Copy link
Contributor

@brixen I fiddled around with this last week but wasn't really sure about our current setup to begin with. For example, when keyword arguments are present we seem to allocate a Hash (basically the old options = {} argument) instead of using proper keyword arguments.

Since I'm not really sure about things I'll leave this one up to you.

@brixen
Copy link
Member

brixen commented Jan 25, 2016

@ahmadsherif I'll pull the AST stuff into https://github.com/rubinius/rubinius-code ASAP and we can work from there.

@yorickpeterse there's no such thing as proper keyword arguments, it's janky Hash all the way down in Ruby. We may be able to do some optimizations once we start cleaning up the instruction set.

@ahmadsherif ahmadsherif force-pushed the fix/zsuper-keyword-args branch from 6b8693d to 5a79072 Compare January 28, 2016 19:13
@yorickpeterse
Copy link
Contributor

With the stuff pulled in, can this be merged?

@brixen
Copy link
Member

brixen commented Jan 29, 2016

@yorickpeterse the changes to the functions need to be represented in the JIT as well. A good first step is writing JIT specs for these cases.

@brixen
Copy link
Member

brixen commented Jan 29, 2016

s/functions/instructions/

@ahmadsherif
Copy link
Member Author

@brixen Apparently JIT is disabled for methods with keyword arguments, should we fix this first? I would like to try but I don't know what's "compile policy checks" :).

@ahmadsherif ahmadsherif force-pushed the fix/zsuper-keyword-args branch 2 times, most recently from 205a5c5 to 19cd62b Compare February 12, 2016 12:35
@brixen brixen merged commit 19cd62b into rubinius:master Apr 6, 2016
@brixen
Copy link
Member

brixen commented Apr 6, 2016

@ahmadsherif sorry, somehow I didn't see your last message. I merged this since the JIT is disabled right now and we'll fix this up as part of re-enabling the JIT. Also, it's a good time to look at integrating keywords into the Arguments structure so eg we can optimize sites that have explicit keywords with the inline cache mechanism to pass the arguments straight through when they are not captured in a kwrest argument.

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

3 participants