[pull] master from ruby:master - #1258
Merged
Merged
Conversation
Document the affected Clang and Autoconf versions.
We added state to `SetLocal` but didn't change `for_each_operand_impl`.
It's just an integer right shift.
st_table_size() is the number of entries, but ractor_memsize() adds the result to sizeof(rb_ractor_t) as a byte count, so a Ractor was reported as costing one byte per open port. Use st_memsize(), as ractor_selector_memsize() in this file already does for its own ports table.
Proc#refined memoizes {copied_iseq, cref} per source iseq in a
process-global map so the copy can be reused from any Ractor. The
cref's refinements table is already frozen and marked shareable for
that reason, but the copied iseq and the memo array holding it are
left unshareable, so the shared payload is not actually a shareable
object graph.
Complete that intent: mark the copied iseq subtree shareable (it is
self-contained -- nested block iseqs are copied too) and mark the
frozen memo array shareable. A copy's local_iseq/parent_iseq point at
already-shareable iseqs (other copies in the subtree, or the shareable
enclosing iseq), so the shareable check needs no special casing.
We only need the target blocks, not the argument vectors.
No need for hashing in LIR RPO.
Previously map_ptr<T>() took *const T, so a reference like &IseqPtr silently coerced to *const IseqPtr and mapped the address of the reference itself instead of the pointer value, which is how the bug fixed by the previous commit slipped in. Constrain the parameter with an ActualPtr trait implemented only for *const T and *mut T, so passing a reference no longer compiles. Co-authored-by: Max Bernstein <tekknolagi@gmail.com>
Co-authored-by: Alan Wu <XrXr@users.noreply.github.com>
The invokeblock fast path (InvokeBlockIseqDirect) passes captured self plus each block argument in C argument registers, but block_call_inlinable_iseq never bounded the argument count. Yielding 6+ arguments to a matching-arity block made gen_invoke_block_iseq_direct emit a CCall with more operands than C_ARG_OPNDS, which aborts the process in the backend: assertion failed: data.opnds.len() <= C_ARG_OPNDS.len() at zjit/src/backend/x86_64/mod.rs:302 Reject such blocks in block_call_inlinable_iseq so both the guarded and the inlined-caller yield paths fall back to VM dispatch.
Co-authored-by: Kevin Menard <kevin@nirvdrum.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 : )