summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2026-05-04vm_insnhelper.c: refactor and optimize setivar cache revalidationJean Boussier
By only storing shape offsets in the cache, we're able to still match two equal objects that happen to be in different heaps, as well as to validate the object is neither frozen nor complex.
2026-05-04vm_insnhelper.c: share the cache revalidation logicJean Boussier
It's the same code duplicated in 3 places.
2026-05-04[ruby/prism] Optimize ripper `visit_token`Earlopain
It was showing up in profiles. So: * Don't splat `KEYWORDS` (also did the same for `BINARY_OPERATORS`) * Use `start_with?` if possible Overall gives a ~5% speed boost https://github.com/ruby/prism/commit/d611aa9d11
2026-05-04[ruby/prism] Freeze the parse result for the ripper translatorEarlopain
It's a small, somewhat hacky performance boost. Locations are lazy, by freezing the result they don't have to be pack/unpacked redundantly. This gives about a 4% speed boost. Other changes are to not modify the frozen AST https://github.com/ruby/prism/commit/9e93bd6bd5
2026-05-04[ruby/prism] Optimize ripper boundsEarlopain
Basically a port of https://github.com/ruby/ruby/commit/c45f781771314a71856c9b348c640ba532f54349 into ruby It's quite effective at ~97% hit rate for me. Speeds it up from ~6.77x slower to only 4.07x slower. For the lexer `on_sp` it also gives a bit of an improvement: 1.04x slower to 1.10x faster I guess the class may be universally useful but for now I just made it nodoc. https://github.com/ruby/prism/commit/3ad9db38fe
2026-05-04Fix typo and improve docs of Exception#exceptionBenoit Daloze
2026-05-04[DOC] Add feature 21796 in NEWS.mdJean Boussier
2026-05-04Fix coverage support for RubyVM::ISeq.compileJean Boussier
[Bug #22018] ISeq returned by `RubyVM::InstructionSequene.load_iseq` weren't handled by the coverage module.
2026-05-04test_shapes.rb: replace hardcoded MANY_IVS constantJean Boussier
Since more size pools have been added, this constant was outdated.
2026-05-04Update default gems list at 5ce5cc8ee24ad92890507a1b0d0c68 [ci skip]git
2026-05-04[ruby/json] Release 2.19.5Jean Boussier
https://github.com/ruby/json/commit/4a1a4a4861
2026-05-03Fix missing writebarrier on refined orig_meJohn Hawthorn
Caught by wbcheck. The same field is written with RB_OBJ_WRITE in rb_method_definition_set.
2026-05-03Use write barrier version for rb_proc_call_kwJohn Hawthorn
2026-05-03Add wbcheck GC with write barrier validationJohn Hawthorn
Initial implementation of the wbcheck GC, a modular GC that detects missed write barriers by collecting references from each object and comparing against the set of objects that were marked/written via rb_gc_writebarrier.
2026-05-04mswin: Suppress quirky warningNobuyoshi Nakada
Passing an array of const pointers within a struct as an argument seems to be too complex for cl.exe: ``` vm_eval.c(501): warning C4090: 'function': different 'const' qualifiers ```
2026-05-04Bump the github-actions group across 1 directory with 2 updatesdependabot[bot]
Bumps the github-actions group with 2 updates in the / directory: [github/codeql-action](https://github.com/github/codeql-action) and [taiki-e/install-action](https://github.com/taiki-e/install-action). Updates `github/codeql-action` from 4.35.2 to 4.35.3 - [Release notes](https://github.com/github/codeql-action/releases) - [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md) - [Commits](https://github.com/github/codeql-action/compare/95e58e9a2cdfd71adc6e0353d5c52f41a045d225...e46ed2cbd01164d986452f91f178727624ae40d7) Updates `taiki-e/install-action` from 2.75.27 to 2.75.30 - [Release notes](https://github.com/taiki-e/install-action/releases) - [Changelog](https://github.com/taiki-e/install-action/blob/main/CHANGELOG.md) - [Commits](https://github.com/taiki-e/install-action/compare/7769b73c2ec98c38dfcf2e18c83cfd4880c038c1...db5fb34fa772531a3ece57ca434f579eb334e0fb) --- updated-dependencies: - dependency-name: github/codeql-action dependency-version: 4.35.3 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: github-actions - dependency-name: taiki-e/install-action dependency-version: 2.75.30 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: github-actions ... Signed-off-by: dependabot[bot] <support@github.com>
2026-05-04enc_mbclen_needed: The condition when exact mbclen is neededNobuyoshi Nakada
2026-05-04Adjust styleNobuyoshi Nakada
2026-05-03[DOC] Fix hash style of docs in gc.cPeter Zhu
2026-05-03[DOC] Doc for Pathname#readBurdette Lamar
2026-05-03[ruby/strscan] Fix `call-seq` formattingEarlopain
(https://github.com/ruby/strscan/pull/203) They don't work in included markdown and also need a leading `:` <img width="791" height="442" alt="grafik" src="https://github.com/user-attachments/assets/eca5d4c2-9597-4c58-a0cc-a4e2c9109992" /> https://github.com/ruby/strscan/commit/b504b3b0ad
2026-05-03shape.h: also ignore obj_id flag when reading ivarsJean Boussier
It doesn't impact ivar lookup, because OBJ_ID fields change the offset.
2026-05-03shape: Get rid of the "raw_id" terminology in favor of "offset"Jean Boussier
It better describe that part of a `shape_id`.
2026-05-03class.h: store `classpath` earlier in the structJean Boussier
It's probably the most helpful field while debugging, having it toward the start of the struct ensure `rp` and other debugger helpers will display it.
2026-05-03shape.c: Add a fastpath in rb_shape_rebuildJean Boussier
When the shape doesn't have a SHAPE_OBJ_ID edge, we don't really have to rebuild it, we can simply combine the old shape offset with the new shape flags.
2026-05-03Add field in RObject for too complex hash casePeter Zhu
Avoids the need to cast fields into a st_table.
2026-05-03[Bug #22004] Fix short-circuited loop conditionsNobuyoshi Nakada
2026-05-03Refactor shape transition functionsJean Boussier
Expose both `rb_obj_shape_` functions that take a `VALUE` and `rb_shape_` functions that take a `shape_id`. Make common transition functions such as `complex` and `frozen` inlineable. Also get rid of RB_SET_SHAPE_ID and rb_set_boxed_class_shape_id.
2026-05-03shape.c: simplify `transition_complex`Jean Boussier
We don't need to call into `shape_transition_object_id`, we know we're transitioning to TOO_COMPLEX so the offset part of the id can only be `ROOT_TOO_COMPLEX_SHAPE_ID` or `ROOT_TOO_COMPLEX_WITH_OBJ_ID`. So there's no need to lookup the shape tree.
2026-05-02jits: don't assume `attr_index_t` is u16Jean Boussier
Extracted from: https://github.com/ruby/ruby/pull/16817 It's likely that it will be u8 soon.
2026-05-02shape.h: store `ancestor_index` as an offsetJean Boussier
This shrinks the `rb_shape_t` struct from 40B to 32B.
2026-05-02shape.h: declate rb_shape_t.type as enumJean Boussier
2026-05-02shape.c: reorganize rb_shape_tree_tJean Boussier
Embed and shrink the capacities array so that it can be queried more efficiently. Move `next_shape_id` and `cache_size` outside of the struct on their own cache line, as they're expected to be incremented atomically from concurrent threads, so we want to avoid false sharing. The also don't need to be exposed to the rest of the VM. Get rid of `root_shape` as it's always equal to `shape_list`.
2026-05-02Create imemo/fields with shape_idJean Boussier
Simplify the API by taking a shape_id upon creation.
2026-05-02Never increment `max_iv_count` on Object / BasicObject.Jean Boussier
Otherwise some code defining ivars on a naked object early during program boot can cause all objects to be larger than needed. This seem like it was always the intention, but wasn't quite properly prevented. Also stop updating `max_iv_count` during GC marking as it is redundant.
2026-05-01Add back note about regexp /x comment limitationEarlopain
It was dropped in https://github.com/ruby/ruby/commit/932dd9f10e684fa99b059054fbc934607d85b45a
2026-05-01ZJIT: Inline Class#allocateJohn Hawthorn
This adds specialization for Class#allocate to perform the same inlining that Class#new will do. This was done conservatively, only inlining when we see a known leaf allocator so that there's no difference between interpreter and JIT if the allocator happenes to observe the stack.
2026-05-01[ruby/json] Avoid spamming too many deprecations while parsingJean Boussier
https://github.com/ruby/json/commit/f6ca597cb1
2026-05-01Mark `$_` as box-dynamic to bypass Box gvar_tbl cachedak2
`$_` is updated through svar (rb_lastline_set), bypassing rb_gvar_set, so the Box gvar_tbl cache is never invalidated and returns a stale value. Call rb_gvar_box_dynamic so gvar_use_box_tbl() skips the cache. Fixes [Bug #21940](https://bugs.ruby-lang.org/issues/21940)
2026-05-01Bump insta in /zjit in the jit group across 1 directorydependabot[bot]
Bumps the jit group with 1 update in the /zjit directory: [insta](https://github.com/mitsuhiko/insta). Updates `insta` from 1.47.1 to 1.47.2 - [Release notes](https://github.com/mitsuhiko/insta/releases) - [Changelog](https://github.com/mitsuhiko/insta/blob/master/CHANGELOG.md) - [Commits](https://github.com/mitsuhiko/insta/compare/1.47.1...1.47.2) --- updated-dependencies: - dependency-name: insta dependency-version: 1.47.2 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: jit ... Signed-off-by: dependabot[bot] <support@github.com>
2026-05-01[ruby/rubygems] Bump rb_sys to >= 0.9.127Hiroshi SHIBATA
https://github.com/ruby/rubygems/commit/cf21e9113f Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-30[DOC] Doc for Set.newBurdette Lamar
2026-04-30[DOC] Harmonize basename methodsBurdetteLamar
2026-04-30Remove IMEMO allocation from match_named_capturesJohn Hawthorn
onig_foreach_name is totally synchronous (either a for loop or an st_foreach), so it should be safe to pass data on the stack rather than allocating an IMEMO.
2026-04-30[DOC] Harmonize birthtime methods (#16744)Burdette Lamar
2026-04-30Use flag to determine when MEMO.u3 is a VALUEJohn Hawthorn
We always know when this contains a VALUE and even fire a write barrier for it. We should use this when marking, support compaction, and no longer need conservative marking.
2026-04-30Remove MEMO.u3.funcJohn Hawthorn
This was no longer used anywhere
2026-04-30[ruby/prism] Fix UTF-8 code units to match the number of bytesVinicius Stock
(https://github.com/ruby/prism/pull/4098) https://github.com/ruby/prism/commit/442bd904ed
2026-04-30Update ext/Setup template files [ci skip]Nobuyoshi Nakada
2026-04-30Share common code between Enumerator and ArithmeticSequenceNobuyoshi Nakada