Skip to content

[pull] master from ruby:master#893

Merged
pull[bot] merged 3 commits intoturkdevops:masterfrom
ruby:master
Mar 28, 2026
Merged

[pull] master from ruby:master#893
pull[bot] merged 3 commits intoturkdevops:masterfrom
ruby:master

Conversation

@pull
Copy link
Copy Markdown

@pull pull bot commented Mar 28, 2026

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 : )

st0012 and others added 3 commits March 28, 2026 13:12
…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>
@pull pull bot locked and limited conversation to collaborators Mar 28, 2026
@pull pull bot added the ⤵️ pull label Mar 28, 2026
@pull pull bot merged commit 64e1036 into turkdevops:master Mar 28, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants