Skip to content

Comments

[pull] master from ruby:master#175

Merged
pull[bot] merged 8 commits intoturkdevops:masterfrom
ruby:master
Aug 15, 2025
Merged

[pull] master from ruby:master#175
pull[bot] merged 8 commits intoturkdevops:masterfrom
ruby:master

Conversation

@pull
Copy link

@pull pull bot commented Aug 15, 2025

See Commits and Changes for more details.


Created by pull[bot] (v2.0.0-alpha.3)

Can you help keep this open source service alive? 💖 Please sponsor : )

XrXr and others added 8 commits August 14, 2025 15:38
Previously, when `./configure --enable-yjit=dev --enable-zjit` JIT_DESCRIPTION was
defined to be "ZJIT", but when running with `--yjit`, ruby_set_yjit_description()
calls `define_ruby_description("+YJIT dev")`, which is longer than the
following assertion expects:

    RUBY_ASSERT(n <= ruby_description_opt_point + (int)rb_strlen_lit(JIT_DESCRIPTION));

Use the concatenation of the two strings -- the contents of the string
is never used. Minimize the scope of the macro, too.
Previously, YJIT returned truthy for the block given query at the top
level. That's incorrect because the top level script never receives a
block, and `yield` is a syntax error there.

Inside methods, the number of hops to get from `iseq` to
`iseq->body->local_iseq` is the same as the number of
`VM_ENV_PREV_EP(ep)` hops to get to an environment with
`VM_ENV_FLAG_LOCAL`. YJIT and the interpreter both rely on this as can
be seen in get_lvar_level(). However, this identity does not hold for
the top level frame because of vm_set_eval_stack(), which sets up
`TOPLEVEL_BINDING`.

Since only methods can take a block that `yield` goes to, have ISEQs
that are the child of a non-method ISEQ return falsy for the block given
query. This fixes the issue for the top level script and is an
optimization for non-method contexts such as inside `ISEQ_TYPE_CLASS`.
@pull pull bot locked and limited conversation to collaborators Aug 15, 2025
@pull pull bot added the ⤵️ pull label Aug 15, 2025
@pull pull bot merged commit 5e8f9ea into turkdevops:master Aug 15, 2025
1 of 2 checks passed
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