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 4 commits into from Dec 15, 2016


Copy link

@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.

* Clear StaticScope's dynscope constructor when variable names are
* 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 milestone Dec 15, 2016
Copy link
Member Author

headius commented Dec 15, 2016

This PR depends on #4388.

@headius headius merged commit 131e748 into jruby:master Dec 15, 2016
@headius headius deleted the specific-arity-jit-cleanup branch December 15, 2016 20:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
None yet

Successfully merging this pull request may close these issues.

None yet

1 participant