summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2022-12-01Improve packing of iseq_constant_body structJohn Hawthorn
By moving the two bools into a packing gap above the mark_bits pointer/union we can save 8 bytes in the struct and avoid an extra cache line (328 bytes vs 320 bytes). Co-authored-by: Adam Hess <HParker@github.com> Notes: Merged: https://github.com/ruby/ruby/pull/6847
2022-12-01YJIT: Respect destination num_bits on STUR (#6848)Takashi Kokubun
Notes: Merged-By: k0kubun <takashikkbn@gmail.com>
2022-12-01Relax the timeout of a YAML testTakashi Kokubun
https://cirrus-ci.com/task/4752663775019008
2022-12-01Add a macro for SHAPE_DEBUGJohn Hawthorn
Like before, default to VM_CHECK_MODE > 0, but this allows just enabling shape debug helpers without the rest of VM_CHECK_MODE. Notes: Merged: https://github.com/ruby/ruby/pull/6800
2022-12-01Inherit max_iv_count from superclassJohn Hawthorn
In 274870bd5434ab64ac3a3c9db9aa27d262c1d6d6 we gained the ability to make an educated guess at the max_iv_count of a class based on its initialize method. This commit makes subclasses inherit their super's max_iv_count, which makes the estimate work in cases that the subclass does not have an initialize method. Notes: Merged: https://github.com/ruby/ruby/pull/6800
2022-12-01[ruby/net-http] [DOC] Enhanced RDoc for Net::HTTPHeaderBurdette Lamar
(https://github.com/ruby/net-http/pull/83) https://github.com/ruby/net-http/commit/1ea5004098
2022-12-01Module#remove_method: Check frozen on the right objectJean byroot Boussier
Previously, the frozen check happened on `RCLASS_ORIGIN(self)`, which can return an iclass. The frozen check is supposed to respond to objects that users can call methods on while iclasses are hidden from users. Other mutation methods like Module#{define_method,alias_method,public} don't do this. Check frozen status on the module itself. Fixes [Bug #19164] and [Bug #19166]. Co-authored-by: Alan Wu <XrXr@users.noreply.github.com> Notes: Merged: https://github.com/ruby/ruby/pull/6842 Merged-By: XrXr
2022-12-02[Bug #19087] Merge to "trailing garbage" caseNobuyoshi Nakada
2022-12-02[Bug #19087] Fix an assertion of `String#to_c`Nobuyoshi Nakada
2022-12-02[Bug #19087] Disallow successive underscores in Complex stringNobuyoshi Nakada
Notes: Merged: https://github.com/ruby/ruby/pull/6645
2022-12-02parenthesize to macroS-H-GAMELINKS
Notes: Merged: https://github.com/ruby/ruby/pull/6700
2022-12-02Introduce encoding check macroS-H-GAMELINKS
Notes: Merged: https://github.com/ruby/ruby/pull/6700
2022-12-02Introduce argf_encoding functionS-H-GAMELINKS
Notes: Merged: https://github.com/ruby/ruby/pull/6672
2022-12-02Reuse NIL_OR_UNDEF_P macroS-H-GAMELINKS
Notes: Merged: https://github.com/ruby/ruby/pull/6787
2022-12-01YJIT: Reorder branches for Fixnum opt_case_dispatch (#6841)Takashi Kokubun
* YJIT: Reorder branches for Fixnum opt_case_dispatch Co-authored-by: Maxime Chevalier-Boisvert <maxime.chevalierboisvert@shopify.com> Co-authored-by: Alan Wu <alansi.xingwu@shopify.com> * YJIT: Don't support too large values Co-authored-by: Maxime Chevalier-Boisvert <maxime.chevalierboisvert@shopify.com> Co-authored-by: Alan Wu <alansi.xingwu@shopify.com> Notes: Merged-By: maximecb <maximecb@ruby-lang.org>
2022-12-02[Feature #19163] Marshal-loaded Data object also should be frozenNobuyoshi Nakada
Notes: Merged: https://github.com/ruby/ruby/pull/6843
2022-12-02[Feature #19163] Data object should be frozenNobuyoshi Nakada
Notes: Merged: https://github.com/ruby/ruby/pull/6843
2022-12-01YJIT: fix 32 and 16 bit register store (#6840)Jemma Issroff
* Fix 32 and 16 bit register store in YJIT Co-Authored-By: Takashi Kokubun <takashikkbn@gmail.com> * Remove an unnecessary diff * Reuse an rm_num_bits result * Use u16::MAX instead * Update the link Co-authored-by: Alan Wu <XrXr@users.noreply.github.com> * Just use sturh for 16 bits Co-authored-by: Takashi Kokubun <takashikkbn@gmail.com> Co-authored-by: Alan Wu <XrXr@users.noreply.github.com> Notes: Merged-By: maximecb <maximecb@ruby-lang.org>
2022-12-01Fix indents in NEWS [ci skip]Nobuyoshi Nakada
The MarkDown parser in RDoc requires 4 columns indentation for paragraphs following list items. Otherwise, the following paragraphs are not interpreted as the part of the preceeding list item,
2022-12-01Introduce `Fiber#storage` for inheritable fiber-scoped variables. (#6612)Samuel Williams
Notes: Merged-By: ioquatix <samuel@codeotaku.com>
2022-12-01[Bug #19108] Check for the encoding of pack/unpack formatNobuyoshi Nakada
Notes: Merged: https://github.com/ruby/ruby/pull/6785
2022-12-01[ruby/delegate] Revert "Fix `DelegateClass` block "method redefined" warning"Nobuyoshi Nakada
https://github.com/ruby/delegate/commit/2a91436284
2022-12-01[Feature #19138] Add `SyntaxError#path`Nobuyoshi Nakada
Notes: Merged: https://github.com/ruby/ruby/pull/6779
2022-11-30Use RTEST and add test for GH-6832Alan Wu
Technically we shouldn't see Qfalse now, but RTEST also compiles down to just one branch anyways. Pretty contrived issue, but easy to fix. Notes: Merged: https://github.com/ruby/ruby/pull/6832
2022-11-30struct.c (struct_ivar_get): add conditional for potential Qnil returned by ↵Zack Deveau
rb_class_superclass struct_ivar_get recently started using rb_class_superclass to resolve super instead of RCLASS_SUPER. This change made Qnil a possible case we need to return from within the struct_ivar_get for loop. Notes: Merged: https://github.com/ruby/ruby/pull/6832
2022-11-30YJIT: Optimize rb_int_equal (#6838)Takashi Kokubun
Notes: Merged-By: maximecb <maximecb@ruby-lang.org>
2022-11-30YJIT: add new counters for deferred compilation and queued blocks (#6837)Maxime Chevalier-Boisvert
Notes: Merged-By: maximecb <maximecb@ruby-lang.org>
2022-12-01Prevent segfault in String#scan with ObjectSpace.each_objectYusuke Endoh
Calling `String#scan` without a block creates an incomplete MatchData object whose `RMATCH(match)->str` is Qfalse. Usually this object is not leaked, but it was possible to pull it by using ObjectSpace.each_object. This change hides the internal MatchData object by using rb_obj_hide. Fixes [Bug #19159] Notes: Merged: https://github.com/ruby/ruby/pull/6836
2022-12-01[ruby/rdoc] Fix `=end` delimiterNobuyoshi Nakada
https://github.com/ruby/rdoc/commit/e1679fa7e4 Notes: Merged: https://github.com/ruby/ruby/pull/6835
2022-12-01[ruby/rdoc] Non-RD part feature has not been imported to RDocNobuyoshi Nakada
https://github.com/ruby/rdoc/commit/fe0159de2f Notes: Merged: https://github.com/ruby/ruby/pull/6835
2022-12-01[ruby/rdoc] Use TempfileNobuyoshi Nakada
https://github.com/ruby/rdoc/commit/0b9dde5ab4 Notes: Merged: https://github.com/ruby/ruby/pull/6835
2022-12-01Use class methods of `File` over `Kernel.open` and `IO.read`Nobuyoshi Nakada
Notes: Merged: https://github.com/ruby/ruby/pull/6834
2022-11-30YJIT: Deallocate `struct Block` to plug memory leaksAlan Wu
Previously we essentially never freed block even after invalidation. Their reference count never reached zero for a couple of reasons: 1. `Branch::block` formed a cycle with the block holding the branch 2. Strong count on a branch that has ever contained a stub never reached 0 because we increment the `.clone()` call for `BranchRef::into_raw()` didn't have a matching decrement. It's not safe to immediately deallocate blocks during invalidation since `branch_stub_hit()` can end up running with a branch pointer from an invalidated branch. To plug the leaks, we wait until code GC or global invalidation and deallocate the blocks for iseqs that are definitely not running. Notes: Merged: https://github.com/ruby/ruby/pull/6833
2022-11-30YJIT: Deallocate when assumptions tables are emptyAlan Wu
When we run global invalidation for TracePoints or code GC, we clear out all blocks in our assumptions table but we don't deallocate the backing buffers. Let's reclaim some memory during these rare events. Notes: Merged: https://github.com/ruby/ruby/pull/6833
2022-11-30YJIT: Fix IseqPayload::pages memory bloatAlan Wu
HashSet::clear() doesn't deallocate the backing buffer and shrink the capacity. Replace with a 0-capcity set instead so we reclaim some memory each code GC. Notes: Merged: https://github.com/ruby/ruby/pull/6833
2022-11-30Enable to dispatch Code scanning [ci skip]Nobuyoshi Nakada
2022-11-30[ruby/irb] Use class methods of `File` over `Kernel.open`Nobuyoshi Nakada
https://github.com/ruby/irb/commit/e0ec5e1bd8
2022-11-30[ruby/un] wait_writable: close opened fileNobuyoshi Nakada
https://github.com/ruby/un/commit/b08aeb9c48
2022-11-30Removed documentation for incomplete option about [Feature #17134]Hiroshi SHIBATA
2022-11-29MJIT: Revert FL_EXIVAR check optimizationTakashi Kokubun
It seems to slow down optcarrot. I'll revisit this later.
2022-11-29MJIT: Rename mjit_compile_attr to mjit_sp_incTakashi Kokubun
There's no mjit_compile.inc, so no need to use this prefix anymore.
2022-11-29MJIT: Merge mjit_unit.h into mjit_c.hTakashi Kokubun
The distinction doesn't make much difference today.
2022-11-29MJIT: Rename mjit_compiler.c to mjit_c.cTakashi Kokubun
It's no longer about the compiler logic itself.
2022-11-30[ruby/irb] Make sure ls doesn't return an arrayTakashi Kokubun
(https://github.com/ruby/irb/pull/461) https://github.com/ruby/irb/commit/367797bb05
2022-11-30Update default gems list at d6e91784ab78c25e864869b05a149e [ci skip]git
2022-11-30Update SyntaxSuggest to use angle brackets `>`schneems
``` $ ruby tool/sync_default_gems.rb syntax_suggest Sync ruby/syntax_suggest ``` https://github.com/ruby/syntax_suggest/pull/161 Notes: Merged: https://github.com/ruby/ruby/pull/6831
2022-11-30Mention Exception#detailed_message in NEWS.mdYusuke Endoh
2022-11-30Mention Regexp.timeout= in NEWS.mdYusuke Endoh
2022-11-29Fix unused variable warningsTakashi Kokubun
builtin seems to be not handling this correctly.
2022-11-29YJIT: Skip checking interrupt_mask (#6825)Takashi Kokubun
Notes: Merged-By: maximecb <maximecb@ruby-lang.org>