[pull] master from ruby:master#893
Merged
pull[bot] merged 3 commits intoturkdevops:masterfrom Mar 28, 2026
Merged
Conversation
…ce.c` (#16587) Extract check_event_support helper to reduce duplication in vm_trace.c Five rb_tracearg_* functions repeated the same event validation pattern. Extract it into a check_event_support() helper.
RDoc now has a `--server` mode that starts a local HTTP server with live reload. Add an `html-server` make target so developers can preview Ruby documentation while editing source files. Usage: `make html-server` from the build directory, then visit http://localhost:4000. Editing any source file's documentation comment will automatically refresh the browser. Use `make html-server RDOC_SERVER_PORT=8080` to change the port.
…m gap
When a SendDirect lands in a callee that fails to compile, we need to
reconstruct the interpreter state at the entry point of the callee in
function_stub_hit().
SendDirect never leaves gaps in its args Vec, and consequently, it
contains no nils for unspecified optional parameters.
```ruby
def fail(a = a, b:) = ::RubyVM::ZJIT.induce_compile_failure!
def entry = fail(b: 0)
```
```
two views of the same two stack slots
│
caller's perspective │ callee's persepctive
┌────┐ │ ┌───┐
│ ?? │ │ │ b │
├────┤ │ ├───┤
│ -1 │ │ │ a │
└────┘ │ └───┘
(argc=1) │
```
It's up to function_stub_hit() to create the gap (of `a` in the example)
and move any non-optional arguments (`b` in the example) beyond the
slice of unspecified optional parameters to their proper place according
to the local table. We didn't do this movement previously so returned
the wrong result in some cases.
Fixes the included test cases. To keep the IseqCall struct 24 bytes while
accommodating for the new argc field, I've imposed a ~65K limit on the
number of arguments that codegen compiles. Should be plenty, and we already
have a similar limit on VM stack size.
Co-authored-by: Takashi Kokubun <takashikkbn@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
See Commits and Changes for more details.
Created by
pull[bot] (v2.0.0-alpha.4)
Can you help keep this open source service alive? 💖 Please sponsor : )