[pull] master from ruby:master#1188
Merged
Merged
Conversation
SHAPE_MAX_CAPACITY needed to be below or equal to the maximum capacity allocatable by the GC otherwise it would crash. This commit decouples that by adding back max_capacity in the rb_shape_tree_t and adding a new GC API function rb_gc_impl_max_allocation_size to report the maximum size allocatable by the GC.
Bumps the github-actions group with 1 update in the / directory: [taiki-e/install-action](https://github.com/taiki-e/install-action). Updates `taiki-e/install-action` from 2.82.9 to 2.82.10 - [Release notes](https://github.com/taiki-e/install-action/releases) - [Changelog](https://github.com/taiki-e/install-action/blob/main/CHANGELOG.md) - [Commits](taiki-e/install-action@4684b84...5041467) --- updated-dependencies: - dependency-name: taiki-e/install-action dependency-version: 2.82.10 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: github-actions ... Signed-off-by: dependabot[bot] <support@github.com>
Array#join now pre-calculates the length, so the string created in the tests were embedded anyways.
Follow up to GH-PR #16914
Co-authored-by: Jeremy Evans <code@jeremyevans.net>
Co-authored-by: Jeremy Evans <code@jeremyevans.net>
This section only had one method (#each), so move that method to the "Other Methods" section.
Followup: #17671 [Bug #22184] `onigmo.h` contains a lot of declarations that can easily conflict with third party code, hence it's better to keep it opaque. That however requires a few hacks.
This commit implements support in ZJIT for inlining GC fast path. The GC fast path is defined in gc_fastpath.rs for both the default GC and MMTk. For the default GC, the fast path uses the bump pointer allocator that was implemented in #17201. If the bump pointer region is full, it will bail out and fall back to the slow path. This GC fast path is used by the newarray instruction in ZJIT in the empty array case. We can see significant improvements in the following microbenchmark, which allocates 100 million empty arrays: def run(max) i = 0 while i < max a = [] i += 1 end end 30.times { run(2) } run(100_000_000) This microbenchmark runs 1.5x faster on my machine: Benchmark 1: master Time (mean ± σ): 583.3 ms ± 10.1 ms [User: 569.3 ms, System: 12.0 ms] Range (min … max): 571.9 ms … 600.0 ms 10 runs Benchmark 2: branch Time (mean ± σ): 389.5 ms ± 8.2 ms [User: 375.0 ms, System: 12.1 ms] Range (min … max): 380.2 ms … 405.3 ms 10 runs Summary branch ran 1.50 ± 0.04 times faster than master
If the slot size is dynamic, a string of length (max_embed_len - 1) will have exact capacity rather than rounded up to max_embed_len.
To avoid confusion with the actual capacity which may be larger if the object has been extended (ROBJECT_HEAP).
Like the capacity part, the layout part of an object shape almost never changes. The few exceptions are: - On allocation. - On being compacted by GC. - When RObject oberflows. As such it simplifies a lot of code if `RBASIC_SET_SHAPE_ID` strips the layout bits, as we often copy the shape from IMEMO/fields to the owner object and vice-versa. Also change `RBASIC_SET_SHAPE_ID_WITH_CAPACITY` into `RBASIC_SET_FULL_SHAPE_ID` so it can be used for assigning both capacity and layout.
Lean on `rb_newobj` to get the shape embedded capacity properly set.
Follow-up of GH-17190.
Fix unexpected `keyword_do_LAMBDA` inside string interpolation within default argument of lambda.
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 : )