summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2022-12-16[ruby/io-wait] Bump version to 0.3.0Hiroshi SHIBATA
https://github.com/ruby/io-wait/commit/940ba319d3
2022-12-16surpress warningKoichi Sasada
now `enc_table->list` is not a pointer.
2022-12-16[ruby/irb] Prefer to use File.open instead of Kernel.openHiroshi SHIBATA
https://github.com/ruby/irb/commit/ed9e435a6b
2022-12-16fixed encoding tableKoichi Sasada
This reduces global lock acquiring for reading. https://bugs.ruby-lang.org/issues/18949 Notes: Merged: https://github.com/ruby/ruby/pull/6935
2022-12-16Mentioned https://bugs.ruby-lang.org/issues/17767 on NEWS.mdHiroshi SHIBATA
2022-12-15Add NEWS entries about CGI and ERB [ci skip]Takashi Kokubun
2022-12-15YJIT: Fix `obj.send(:call)`Alan Wu
All the method call types need to handle argument shifting in case they're called by `.send`, and we weren't handling that in `OPTIMIZED_METHOD_TYPE_CALL`. Lack of shifting caused the stack size assertion in gen_leave() to fail. Discovered by Rails CI: https://buildkite.com/rails/rails/builds/91705#018516c4-f8f8-469e-bc2d-ddeb25ca8317/1920-2067 Diagnosed with help from `@eileencodes` and `@k0kubun`. Notes: Merged: https://github.com/ruby/ruby/pull/6943 Merged-By: XrXr
2022-12-15Indicate if a shape is too_complex in ObjectSpace#dumpJemma Issroff
Notes: Merged: https://github.com/ruby/ruby/pull/6939
2022-12-15Move definition of SIZE_POOL_COUNT back to gc.hPeter Zhu
SIZE_POOL_COUNT is a GC macro, it should belong in gc.h and not shape.h. SIZE_POOL_COUNT doesn't depend on shape.h so we can have shape.h depend on gc.h. Co-Authored-By: Matt Valentine-House <matt@eightbitraptor.com> Notes: Merged: https://github.com/ruby/ruby/pull/6940
2022-12-15[ruby/net-http] Enhanced RDoc for Net::HTTPBurdetteLamar
https://github.com/ruby/net-http/commit/da626e4e42
2022-12-15Improve Struct NEWS [ci skip]Takashi Kokubun
I meant to commit diff, but it was left uncommitted locally.
2022-12-15Refactor to only attempt to move movable objectsPeter Zhu
Moves check for gc_is_moveable_obj from try_move to gc_compact_plane. Co-Authored-By: Matt Valentine-House <matt@eightbitraptor.com> Notes: Merged: https://github.com/ruby/ruby/pull/6938
2022-12-15Fix Object Movement allocation in GCMatt Valentine-House
When moving Objects between size pools we have to assign a new shape. This happened during updating references - we tried to create a new shape tree that mirrored the existing tree, but based on the root shape of the new size pool. This causes allocations to happen if the new tree doesn't already exist, potentially triggering a GC, during GC. This commit changes object movement to look for a pre-existing new tree during object movement, and if that tree does not exist, we don't move the object to the new pool. This allows us to remove the shape allocation from update references. Co-Authored-By: Peter Zhu <peter@peterzhu.ca> Notes: Merged: https://github.com/ruby/ruby/pull/6938
2022-12-15YJIT: Fix code GC freeing stubs with a trampoline (#6937)Alan Wu
Stubs we generate for invalidation don't necessarily co-locate with the code that jump to the stub. Since we rely on co-location to keep stubs alive as they are in the outlined code block, it used to be possible for code GC inside branch_stub_hit() to free the stub that's its direct caller, leading us to return to freed code after. Stubs used to look like: ``` mov arg0, branch_ptr mov arg1, target_idx mov arg2, ec call branch_stub_hit jmp return_reg ``` Since the call and the jump after the call is the same for all stubs, we can extract them and use a static trampoline for them. That makes branch_stub_hit() always return to static code. Stubs now look like: ``` mov arg0, branch_ptr mov arg1, target_idx jmp trampoline ``` Where the trampoline is: ``` mov arg2, ec call branch_stub_hit jmp return_reg ``` Code GC can now free stubs without problems since we'll always return to the trampoline, which we generate once on boot and lives forever. This might save a small bit of memory due to factoring out the static part of stubs, but it's probably minor. [Bug #19234] Co-authored-by: Takashi Kokubun <takashikkbn@gmail.com> Notes: Merged-By: maximecb <maximecb@ruby-lang.org>
2022-12-15Add Struct examples to NEWS [ci skip]Takashi Kokubun
2022-12-15Add Data.define examples to NEWS [ci skip]Takashi Kokubun
2022-12-15Update NEWS.md to include shapes and gc bitmap markingJemma Issroff
Notes: Merged: https://github.com/ruby/ruby/pull/6941
2022-12-15Fix missing variablesTakashi Kokubun
It was a bad copy-paste.
2022-12-15Enable Slack notifications on more ActionsTakashi Kokubun
auto_request_review, codeql-analysis, scorecards don't have it either, but those are intentional.
2022-12-15Partially revert "Update bundled_gems"Takashi Kokubun
This reverts the net-imap upgrade of commit e3ed6c07832edf2a95bae3bdd908cc3f5b65eebe. net-imap tests of test-bundled-gems seem to be broken https://github.com/ruby/ruby/actions/runs/3704473689/jobs/6277145052.
2022-12-15Transition complex objects to "too complex" shapeJemma Issroff
When an object becomes "too complex" (in other words it has too many variations in the shape tree), we transition it to use a "too complex" shape and use a hash for storing instance variables. Without this patch, there were rare cases where shape tree growth could "explode" and cause performance degradation on what would otherwise have been cached fast paths. This patch puts a limit on shape tree growth, and gracefully degrades in the rare case where there could be a factorial growth in the shape tree. For example: ```ruby class NG; end HUGE_NUMBER.times do NG.new.instance_variable_set(:"@unique_ivar_#{_1}", 1) end ``` We consider objects to be "too complex" when the object's class has more than SHAPE_MAX_VARIATIONS (currently 8) leaf nodes in the shape tree and the object introduces a new variation (a new leaf node) associated with that class. For example, new variations on instances of the following class would be considered "too complex" because those instances create more than 8 leaves in the shape tree: ```ruby class Foo; end 9.times { Foo.new.instance_variable_set(":@uniq_#{_1}", 1) } ``` However, the following class is *not* too complex because it only has one leaf in the shape tree: ```ruby class Foo def initialize @a = @b = @c = @d = @e = @f = @g = @h = @i = nil end end 9.times { Foo.new } `` This case is rare, so we don't expect this change to impact performance of most applications, but it needs to be handled. Co-Authored-By: Aaron Patterson <tenderlove@ruby-lang.org> Notes: Merged: https://github.com/ruby/ruby/pull/6931
2022-12-15Add variation_count on classesJemma Issroff
Count how many "variations" each class creates. A "variation" is a a unique ordering of instance variables on a particular class. This can also be thought of as a branch in the shape tree. For example, the following Foo class will have 2 variations: ```ruby class Foo ; end Foo.new.instance_variable_set(:@a, 1) # case 1: creates one variation Foo.new.instance_variable_set(:@b, 1) # case 2: creates another variation foo = Foo.new foo.instance_variable_set(:@a, 1) # does not create a new variation foo.instance_variable_set(:@b, 1) # does not create a new variation (a continuation of the variation in case 1) ``` We will use this number to limit the amount of shapes that a class can create and fallback to using a hash iv lookup. Co-Authored-By: Aaron Patterson <tenderlove@ruby-lang.org> Notes: Merged: https://github.com/ruby/ruby/pull/6931
2022-12-15Revert "Fix Object Movement allocation in GC"Peter Zhu
This reverts commit 9c54466e299aa91af225bc2d92a3d7755730948f. We're seeing crashes in Shopify CI after this commit.
2022-12-15Fix Object Movement allocation in GCMatt Valentine-House
When moving Objects between size pools we have to assign a new shape. This happened during updating references - we tried to create a new shape tree that mirrored the existing tree, but based on the root shape of the new size pool. This causes allocations to happen if the new tree doesn't already exist, potentially triggering a GC, during GC. This commit changes object movement to look for a pre-existing new tree during object movement, and if that tree does not exist, we don't move the object to the new pool. This allows us to remove the shape allocation from update references. Co-Authored-By: Peter Zhu <peter@peterzhu.ca> Notes: Merged: https://github.com/ruby/ruby/pull/6926
2022-12-15Update bundled gems list at e3ed6c07832edf2a95bae3bdd908cc [ci skip]git
2022-12-15Update bundled_gemsKazuhiro NISHIYAMA
2022-12-15Merge RubyGems/Bundler masterHiroshi SHIBATA
Pick from https://github.com/rubygems/rubygems/commit/084f7d1f21f6fc3e2bb685b7bda3653fb2891c6e Notes: Merged: https://github.com/ruby/ruby/pull/6936
2022-12-15Disallow mixed usage of ... and */**Shugo Maeda
[Feature #19134] Notes: Merged: https://github.com/ruby/ruby/pull/6934
2022-12-15[Bug #19189] Fallback to the default "pkg-config"Nobuyoshi Nakada
Notes: Merged: https://github.com/ruby/ruby/pull/6927
2022-12-15Remove `require 'io/wait'` where it's no longer necessary. (#6932)Samuel Williams
* Remove `require 'io/wait'` as it's part of core now. * Update ruby specs using version gates. * Add note about why it's conditional. Notes: Merged-By: ioquatix <samuel@codeotaku.com>
2022-12-14[ruby/net-http] [DOC] New doc for responses classesBurdette Lamar
(https://github.com/ruby/net-http/pull/91) https://github.com/ruby/net-http/commit/d394404402
2022-12-14[ruby/net-http] [DOC] Correct formatting in header.rbBurdette Lamar
(https://github.com/ruby/net-http/pull/90) https://github.com/ruby/net-http/commit/d9d829ca53
2022-12-14YJIT: Remove duplicate call to jit_prepare_routine_call()Alan Wu
It's idempotent. Notes: Merged: https://github.com/ruby/ruby/pull/6930
2022-12-14Remove dead code in get_next_shape_internalPeter Zhu
If the rb_id_table_lookup fails, then res is not updated so it cannot be any value other than null. Notes: Merged: https://github.com/ruby/ruby/pull/6928
2022-12-15socket.rb - simplify check for the methodNobuyoshi Nakada
2022-12-15Add more comments why CRuby uses __pioinfoNARUSE, Yui
2022-12-14objspace_dump.c: don't dump class of T_IMEMOJean Boussier
They don't actually have a class. Notes: Merged: https://github.com/ruby/ruby/pull/6925
2022-12-14[ci skip] Add entry to NEWS.md about VWAPeter Zhu
Notes: Merged: https://github.com/ruby/ruby/pull/6919
2022-12-14[ruby/net-http] [DOC] Enhanced RDoc for Net::HTTPBurdette Lamar
(https://github.com/ruby/net-http/pull/89) https://github.com/ruby/net-http/commit/86b84eb307
2022-12-14[rubygems/rubygems] Clean up Indexer build files in testsNobuyoshi Nakada
https://github.com/rubygems/rubygems/commit/5479d99a1d
2022-12-14Update default gems list at 1a8d460534c7423091b790530bb3ea [ci skip]git
2022-12-14[ruby/securerandom] Bump version to 0.2.2Hiroshi SHIBATA
https://github.com/ruby/securerandom/commit/9e16b597f5
2022-12-14Update default gems list at 95d7b5e2e933cf74cc29782ce33b65 [ci skip]git
2022-12-14[ruby/resolv-replace] Bump version to 0.1.1Hiroshi SHIBATA
https://github.com/ruby/resolv-replace/commit/187e91d149
2022-12-14[ruby/date] Fixed wrong minimum version of RubyHiroshi SHIBATA
Fixed https://github.com/ruby/date/issues/83 https://github.com/ruby/date/commit/9731a3e732
2022-12-14Update default gems list at 15f5842a5fe57fdc9af28494609cbd [ci skip]git
2022-12-14[ruby/English] Bump version to 0.7.2Hiroshi SHIBATA
https://github.com/ruby/English/commit/736f819b3b
2022-12-14Update default gems list at 0b67e435ed07a2febf7c7bd4911257 [ci skip]git
2022-12-14[ruby/abbrev] Bump version to 0.1.1Hiroshi SHIBATA
https://github.com/ruby/abbrev/commit/8c3debac5a
2022-12-14Update default gems list at c6f41a3255e55d6a30bc8ef557bfba [ci skip]git