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

Specific arity jit cleanup #4390

Merged
merged 4 commits into from Dec 15, 2016
Merged

Conversation

@headius
Copy link
Member

@headius headius commented Dec 15, 2016

This PR cleans up method jit by only emitting one body regardless of whether there's a specific-arity path or not. Previously, both variable and specific paths were emitted in full. With this PR, the variable path will call the specific path. This reduces bytecode generated for a given method body by up to 50%, including all contained blocks and metaclass bodies.

headius added 4 commits Dec 15, 2016
* Clear StaticScope's dynscope constructor when variable names are
  altered.
* Clean up jitted top-level script boot logic.
Previously, in order to support a specific-arity path for Ruby
method bodies, we emitted both a variable-arity version (with
arity checks) and a specific-arity version. This doubled the
amount of bytecode emitted for a given method body, and also
doubled the code generated for any contained blocks or metaclass
bodies. This commit modifies method jit to make the variable-arity
path just call the specific-arity path when present, reducing
generated bytecode by up to 50%.
@headius headius added this to the JRuby 9.1.7.0 milestone Dec 15, 2016
@headius
Copy link
Member Author

@headius headius commented Dec 15, 2016

This PR depends on #4388.

@headius headius merged commit 131e748 into jruby:master Dec 15, 2016
1 check passed
1 check passed
continuous-integration/travis-ci/pr The Travis CI build passed
Details
@headius headius deleted the headius:specific-arity-jit-cleanup branch Dec 15, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

1 participant
You can’t perform that action at this time.