summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2022-11-25MJIT: Remove the code to optimize shape transitionTakashi Kokubun
because this code crashes on railsbench. I'll try adding a repro for it later, but I don't know shapes enough to craft it right away.
2022-11-25YJIT: Run test-all tests without requiring RUN_OPTSAlan Wu
Most tests in test_yjit.rb use a sub process, so we can run them even when the parent process is not running with YJIT. Run them so simply running `make check` tests YJIT a bit. [Misc #19149] Notes: Merged: https://github.com/ruby/ruby/pull/6814
2022-11-25Fix autoload status of statically linked extensionsAlan Wu
Previously, for statically-linked extensions, we used `vm->loading_table` to delay calling the init function until the extensions are required. This caused the extensions to look like they are in the middle of being loaded even before they're required. (`rb_feature_p()` returned true with a loading path output.) Combined with autoload, queries like `defined?(CONST)` and `Module#autoload?` were confused by this and returned nil incorrectly. RubyGems uses `defined?` to detect if OpenSSL is available and failed when OpenSSL was available in builds using `--with-static-linked-ext`. Use a dedicated table for the init functions instead of adding them to the loading table. This lets us remove some logic from non-EXTSTATIC builds. [Bug #19115] Notes: Merged: https://github.com/ruby/ruby/pull/6756
2022-11-25[StepSecurity] ci: Harden GitHub ActionsStepSecurity Bot
Signed-off-by: StepSecurity Bot <bot@stepsecurity.io> Notes: Merged: https://github.com/ruby/ruby/pull/6810
2022-11-25NEWS: "Find pattern" is not related to find.rb [ci skip]Nobuyoshi Nakada
2022-11-25[Feature #18925] [DOC] Add `FileUtils.ln_sr` to NEWSNobuyoshi Nakada
2022-11-25[DOC] Fix AST documentsNobuyoshi Nakada
- Fix indents of `tokens`, to make the contents of Token a list - Move the example of `tokens` to separate from the above list - Markup keyword argument and method name
2022-11-25[DOC] Remove extraneous backticksNobuyoshi Nakada
So cross-references to defined classes/modules/methods work.
2022-11-25Fix indents in NEWS [ci skip]Nobuyoshi Nakada
The MarkDown parser in RDoc requires 4 columns indentation for paragraphs following list items.
2022-11-25[ruby/erb] Keep ERB::Util#html_escape privateTakashi Kokubun
ERB::Util.html_escape has been public, but ERB::Util#html_escape had been private. https://github.com/ruby/erb/commit/e62210bf56
2022-11-25[rubygems/rubygems] Stop installing everything under "lib" at the top in all ↵Nobuyoshi Nakada
tests https://github.com/rubygems/rubygems/commit/f9772d62e1
2022-11-25`remain` no longer starts with 0Nobuyoshi Nakada
Notes: Merged: https://github.com/ruby/ruby/pull/6809
2022-11-25[Bug #18971] Add precheck to enumeratorNobuyoshi Nakada
Notes: Merged: https://github.com/ruby/ruby/pull/6809
2022-11-25[Bug #19145] `volatile` on an argument may not be effectiveNobuyoshi Nakada
Notes: Merged: https://github.com/ruby/ruby/pull/6807
2022-11-25The mode flags may be clobbered by tag jumpsNobuyoshi Nakada
Notes: Merged: https://github.com/ruby/ruby/pull/6807
2022-11-25Add examples to error_tolerant option in NEWS [ci skip]yui-knk
Notes: Merged: https://github.com/ruby/ruby/pull/6808
2022-11-25add debug context APIs for debuggers (frame depth)Koichi Sasada
The following new debug context APIs are for implementing debugger's `next` (step over) and similar functionality. * `rb_debug_inspector_frame_depth(dc, index)` returns `index`-th frame's depth. * `rb_debug_inspector_current_depth()` returns current frame depth. The frame depth is not related to the frame index because debug context API skips some special frames but proposed `_depth()` APIs returns the count of all frames (raw depth). Notes: Merged: https://github.com/ruby/ruby/pull/6805
2022-11-24Make String#rstrip{,!} raise Encoding::CompatibilityError for broken coderangeJeremy Evans
It's questionable whether we want to allow rstrip to work for strings where the broken coderange occurs before the trailing whitespace and not after, but this approach is probably simpler, and I don't think users should expect string operations like rstrip to work on broken strings. In some cases, this changes rstrip to raise Encoding::CompatibilityError instead of ArgumentError. However, as the problem is related to an encoding issue in the receiver, and due not due to an issue with an argument, I think Encoding::CompatibilityError is the more appropriate error. Fixes [Bug #18931] Notes: Merged: https://github.com/ruby/ruby/pull/6282
2022-11-25[ruby/fileutils] [Feature #18925] Add `ln_sr` method and `relative:` option ↵Nobuyoshi Nakada
to `ln_s` https://github.com/ruby/fileutils/commit/5116088d5c
2022-11-25Use `rb_sprintf` instead of deprecated `sprintf`Nobuyoshi Nakada
2022-11-24[ruby/erb] Allow requiring erb/escape.so aloneTakashi Kokubun
(https://github.com/ruby/erb/pull/37) Prior to this commit, requiring erb/escape first and then requiring erb did not work as expected.
2022-11-24[ruby/erb] Split erb.rb into files for each module under ERBTakashi Kokubun
(https://github.com/ruby/erb/pull/36) https://github.com/ruby/erb/commit/f74833cc07
2022-11-24[ruby/erb] Rename erb.so to erb/escape.soTakashi Kokubun
(https://github.com/ruby/erb/pull/35) https://github.com/ruby/erb/commit/1280046952
2022-11-24Raise TypeError for endless non-numeric range include?Jeremy Evans
Beginless ranges previously raised TypeError for this case, except for string ranges, which had unexpected behavior: ('a'..'z').include?('ww') # false (..'z').include?('ww') # previously true, now TypeError Use of include? with endless ranges could previously result in an infinite loop. This splits off a range_string_cover_internal function from range_include_internal. Fixes [Bug #18580] Notes: Merged: https://github.com/ruby/ruby/pull/6261
2022-11-24Add a NEWS entry about erb -S removal [ci skip]Takashi Kokubun
2022-11-24[ruby/erb] Drop deprecated -S option from erb commandTakashi Kokubun
We attempted to remove things like this and reverted all of them, but I think nobody relies on this unlike the positional arguments of `ERB#initialize`. https://github.com/ruby/erb/commit/92fde7e403
2022-11-24[ruby/erb] Suppress warnings to fix ruby-head CITakashi Kokubun
(https://github.com/ruby/erb/pull/34) There seems to be no way to fix this. It doesn't happen in an installed directory, so it's likely a false positive and/or a bug in rubygems. | <internal:/home/runner/.rubies/ruby-head/lib/ruby/3.2.0+3/rubygems/core_ext/kernel_require.rb>:85: warning: <internal:/home/runner/.rubies/ruby-head/lib/ruby/3.2.0+3/rubygems/core_ext/kernel_require.rb>:85: warning: loading in progress, circular require considered harmful - /home/runner/.rubies/ruby-head/lib/ruby/3.2.0+3/bundler/setup.rb | from /home/runner/work/erb/erb/libexec/erb:0:in `require' | from /home/runner/.rubies/ruby-head/lib/ruby/3.2.0+3/bundler/setup.rb:3:in `<top (required)>' | from /home/runner/.rubies/ruby-head/lib/ruby/3.2.0+3/bundler/setup.rb:3:in `require_relative' | from /home/runner/.rubies/ruby-head/lib/ruby/3.2.0+3/bundler/shared_helpers.rb:8:in `<top (required)>' | from /home/runner/.rubies/ruby-head/lib/ruby/3.2.0+3/bundler/shared_helpers.rb:8:in `require_relative' | from /home/runner/.rubies/ruby-head/lib/ruby/3.2.0+3/bundler/rubygems_integration.rb:3:in `<top (required)>' | from /home/runner/.rubies/ruby-head/lib/ruby/3.2.0+3/bundler/rubygems_integration.rb:3:in `require' | from /home/runner/.rubies/ruby-head/lib/ruby/3.2.0+3/rubygems.rb:1352:in `<top (required)>' | from <internal:/home/runner/.rubies/ruby-head/lib/ruby/3.2.0+3/rubygems/core_ext/kernel_require.rb>:85:in `require' | from <internal:/home/runner/.rubies/ruby-head/lib/ruby/3.2.0+3/rubygems/core_ext/kernel_require.rb>:85:in `require'
2022-11-24Reduce duplication in pack by sharing code for some casesJeremy Evans
s/S, i/I, l/L, and q/Q had the same code in both cases, so combine the cases. Alternatively, we could actually the size of the unsigned type, but I doubt there are any platforms where the unsigned type is a different size than the signed type. Notes: Merged: https://github.com/ruby/ruby/pull/6495
2022-11-24Fix the position of rescue clause without exc_listJeremy Evans
If the rescue clause has only exc_var and not exc_list, use the exc_var position instead of the rescue body position. This issue appears to have been introduced in 688169fd83b24564b653c03977c168cea50ccd35 when "opt_list" was split into "exc_list exc_var". Fixes [Bug #18974] Notes: Merged: https://github.com/ruby/ruby/pull/6283
2022-11-24Update YJIT section of `NEWS.md` (#6803)Maxime Chevalier-Boisvert
* Update YJIT section of `NEWS.md` * Update NEWS.md Notes: Merged-By: maximecb <maximecb@ruby-lang.org>
2022-11-24YJIT: Make sure rustc's target matches before enabling (#6804)Alan Wu
For people using Rosetta 2 on ARM Macs, it can happen that the rustc in the PATH compiles for x86_64 while clang is targeting ARM. We were enabling YJIT in these situations because the test program compiled fine, but caused linking failure later due to the architecture mismatch. Adjust the test program to fail when rustc's target arch is different from ruby's target arch. [Bug #19146] Notes: Merged-By: maximecb <maximecb@ruby-lang.org>
2022-11-24[ruby/cgi] Fix test_cgi_cookie_new_with_domain to pass on older rubiesJean Boussier
https://github.com/ruby/cgi/commit/05f0c58048
2022-11-24YJIT: rename `InsnOpnd` => `YARVOpnd` (#6801)Maxime Chevalier-Boisvert
Rename InsnOpnd => YARVOpnd Make it more clear this refers to YARV insn/vm operands rather than backend IR, x86 or ARM insn operands. Notes: Merged-By: maximecb <maximecb@ruby-lang.org>
2022-11-24Relax the timeout of TestRegexp#test_cache_optimization_squareYusuke Endoh
It fails on riscv (QEmu) http://rubyci.s3.amazonaws.com/debian-riscv64/ruby-master/log/20221124T000021Z.fail.html.gz ``` 1) Error: TestRegexp#test_cache_optimization_square: Regexp::TimeoutError: regexp match timeout /home/rubyci/chkbuild/tmp/build/20221124T000021Z/ruby/test/ruby/test_regexp.rb:1693:in `<main>' /home/rubyci/chkbuild/tmp/build/20221124T000021Z/ruby/test/ruby/test_regexp.rb:1688:in `test_cache_optimization_square' ```
2022-11-23YJIT: Use a Box for branch targets to save memoryAlan Wu
We frequently make branches that only have one target but we used to always allocate space for two branch targets. This patch moves all the information a branch target has into a struct and refer to them using Option<Box<BranchTarget>>, this way when the second branch target is not present it only takes 8 bytes. Retained heap size on railsbench went from 16.17 MiB to 14.57 MiB, a ratio of about 1.1. Notes: Merged: https://github.com/ruby/ruby/pull/6799
2022-11-23Add next_shape_id to vm statsAaron Patterson
We need to track this number in CI. It's important to know how changes to the codebase impact the number of shapes in the system, so lets add the number to the VM stat hash Notes: Merged: https://github.com/ruby/ruby/pull/6798
2022-11-23YJIT: Simplify Insn::CCall to obviate Target::FunPtr (#6793)Takashi Kokubun
Notes: Merged-By: maximecb <maximecb@ruby-lang.org>
2022-11-23[ruby/net-http] Enhanced RDoc for Net::HTTPHeaderBurdetteLamar
https://github.com/ruby/net-http/commit/86b0514239
2022-11-23[ruby/net-http] Enhanced RDoc for Net::HTTPHeaderBurdetteLamar
https://github.com/ruby/net-http/commit/ef0ef53b0c
2022-11-23[ruby/net-http] Enhanced RDoc for Net::HTTPHeaderBurdetteLamar
https://github.com/ruby/net-http/commit/0af9fb94a9
2022-11-23[ruby/net-http] Enhanced RDoc for Net::HTTPHeaderBurdetteLamar
https://github.com/ruby/net-http/commit/995ff356b4
2022-11-23[ruby/net-http] Enhanced RDoc for Net::HTTPHeaderBurdetteLamar
https://github.com/ruby/net-http/commit/e924f1205b
2022-11-23YJIT: Use NonNull pointer for CodePtr (#6792)Takashi Kokubun
Notes: Merged-By: maximecb <maximecb@ruby-lang.org>
2022-11-23YJIT: Stop passing target1 to gen_return_branchTakashi Kokubun
Notes: Merged: https://github.com/ruby/ruby/pull/6794
2022-11-23YJIT: Simplify code for RB_SPECIAL_CONST_P (#6795)Takashi Kokubun
Notes: Merged-By: maximecb <maximecb@ruby-lang.org>
2022-11-23Fix YJIT backend to account for unsigned int immediates (#6789)Jemma Issroff
YJIT: x86_64: Fix cmp with number where sign bit is set Before this commit, we were unconditionally treating unsigned ints as signed ints when counting the number of bits required for representing the immediate in machine code. When the size of the immediate matches the size of the other operand, no sign extension happens, so this was incorrect. `asm.cmp(opnd64, 0x8000_0000)` panicked even though it's encodable as `CMP r/m32, imm32`. Large shape ids were impacted by this issue. Co-Authored-By: Aaron Patterson <tenderlove@ruby-lang.org> Co-Authored-By: Alan Wu <alanwu@ruby-lang.org> Co-authored-by: Aaron Patterson <tenderlove@ruby-lang.org> Co-authored-by: Alan Wu <alanwu@ruby-lang.org> Notes: Merged-By: maximecb <maximecb@ruby-lang.org>
2022-11-22Free the IV table after estimationAaron Patterson
We need to make sure the name table is freed otherwise we have a memory leak.
2022-11-22Remove dead code in rb_obj_copy_ivarPeter Zhu
The removed code is a duplicate of the code above. Notes: Merged: https://github.com/ruby/ruby/pull/6727
2022-11-22Update yjit.mdMaxime Chevalier-Boisvert
2022-11-22Add Time#deconstruct_keyszverok
Notes: Merged: https://github.com/ruby/ruby/pull/6594