Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.Sign up
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 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%.