summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2022-09-10Fix parallel build on MINGWLars Kanis
When the build is running with a base ruby then generating `x64-ucrt-ruby320.rc` could fail due to a missing dependency to `x64-mingw-ucrt-fake.rb`. This commit adds this dependency. A failing build looks like so: ``` generating x64-mingw-ucrt-fake.rb generating x64-ucrt-ruby320.rc ../snapshot-master/win32/resource.rb:in `require': cannot load such file -- ./x64-mingw-ucrt-fake (LoadError) make: *** [GNUmakefile:57: x64-ucrt-ruby320.rc] Error 1 make: *** Waiting for unfinished jobs.... linking miniruby.exe x64-mingw-ucrt-fake.rb updated ``` Notes: Merged: https://github.com/ruby/ruby/pull/6347
2022-09-09YJIT: eliminate redundant mov in csel/cmov on x86 (#6348)Maxime Chevalier-Boisvert
* Eliminate redundant mov in csel/cmov. Translate mov reg,0 into xor * Fix x86 asm test * Remove dbg!() * xor optimization unsound because it resets flags Notes: Merged-By: maximecb <maximecb@ruby-lang.org>
2022-09-10* 2022-09-10 [ci skip]git
2022-09-09Better offsets (#6315)Kevin Newton
* Introduce InstructionOffset for AArch64 There are a lot of instructions on AArch64 where we take an offset from PC in terms of the number of instructions. This is for loading a value relative to the PC or for jumping. We were usually accepting an A64Opnd or an i32. It can get confusing and inconsistent though because sometimes you would divide by 4 to get the number of instructions or multiply by 4 to get the number of bytes. This commit adds a struct that wraps an i32 in order to keep all of that logic in one place. It makes it much easier to read and reason about how these offsets are getting used. * Use b instruction when the offset fits on AArch64 Notes: Merged-By: maximecb <maximecb@ruby-lang.org>
2022-09-09[rubygems/rubygems] Fix resolution on non-musl platformsDavid Rodríguez
Gems without specific platform were being preferred over matching platform specific gems. https://github.com/rubygems/rubygems/commit/37b95b9159
2022-09-09[DOC] Update `Struct#new` behavior with `keyword_init: true`Nobuyoshi Nakada
2022-09-09Avoid unnecessary copying when removing the leading part of a stringKazuki Yamaguchi
Remove the superfluous str_modify_keep_cr() call from rb_str_update(). It ends up calling either rb_str_drop_bytes() or rb_str_splice_0(), which already does checks if necessary. The extra call makes the string "independent". This is not always wanted, in other words, it can keep the same shared root when merely removing the leading part of a shared string. Notes: Merged: https://github.com/ruby/ruby/pull/6336
2022-09-09Support sub-library in builtin-loaderNobuyoshi Nakada
Previously, it was supported in prelude.c, but has not followed up the builtin-loader system. Notes: Merged: https://github.com/ruby/ruby/pull/6344
2022-09-09More robust macro parser (#6343)Aaron Patterson
I want to use more complicated macros with MJIT. For example: ``` # define SHAPE_MASK (((unsigned int)1 << SHAPE_BITS) - 1) ``` This commit adds a simple recursive descent parser that produces an AST and a small visitor that converts the AST to Ruby. Notes: Merged-By: k0kubun <takashikkbn@gmail.com>
2022-09-09Move RDoc `--`/`++` directives to commentsNobuyoshi Nakada
2022-09-09Built-in function table sentinels do not need namesNobuyoshi Nakada
2022-09-09Fix unexpected "duplicated key name" error in paren-less one line pattern ↵Kazuki Tsujimoto
matching [Bug #18990]
2022-09-09Ignore EACCES on WindowsNobuyoshi Nakada
2022-09-08Remove as many unnecessary moves as possible (#6342)v3_2_0_preview2Kevin Newton
This commit does a bunch of stuff to try to eliminate as many unnecessary mov instructions as possible. First, it introduces the Insn::LoadInto instruction. Previously when we needed a value to go into a specific register (like in Insn::CCall when we're putting values into the argument registers or in Insn::CRet when we're putting a value into the return register) we would first load the value and then mov it into the correct register. This resulted in a lot of duplicated work with short live ranges since they basically immediately we unnecessary. The new instruction accepts a destination and does not interact with the register allocator at all, making it much more efficient. We then use the new instruction when we're loading values into argument registers for AArch64 or X86_64, and when we're returning a value from AArch64. Notably we don't do it when we're returning a value from X86_64 because everything can be accomplished with a single mov anyway. A couple of unnecessary movs were also present because when we called the split_load_opnd function in a lot of split passes we were loading all registers and instruction outputs. We no longer do that. This commit also makes it so that UImm(0) passes through the Insn::Store split without attempting to be loaded, which allows it can take advantage of the zero register. So now instead of mov-ing 0 into a register and then calling store, it just stores XZR. Notes: Merged-By: maximecb <maximecb@ruby-lang.org>
2022-09-09No longer bundle external library sourcesNobuyoshi Nakada
2022-09-09* 2022-09-09 [ci skip]git
2022-09-09eliminate magic numberYO4
Notes: Merged: https://github.com/ruby/ruby/pull/6328
2022-09-09win32.c additional fix: is_readable_consoleYO4
classic console(conhost.exe) reports an input with ALT+NUMPAD as VK_MENU, KeyUp, and uChar!=0. additional fix for #5634 Notes: Merged: https://github.com/ruby/ruby/pull/6328
2022-09-09win32.c fix: is_readable_consoleYO4
UnicodeChar with lower byte == 0 has dropped accidentaly this is additional fix for #5634 Notes: Merged: https://github.com/ruby/ruby/pull/6328
2022-09-08[Bug #5317] Use `rb_off_t` instead of `off_t`Nobuyoshi Nakada
Get rid of the conflict with system-provided small `off_t`. Notes: Merged: https://github.com/ruby/ruby/pull/6329
2022-09-08[Win32] Remove dead code using `chsize`Nobuyoshi Nakada
Already using `rb_w32_truncate` and `rb_w32_ftruncate`, and `HAVE_FTRUNCATE` has been added 14 years ago. Notes: Merged: https://github.com/ruby/ruby/pull/6329
2022-09-08vm_objtostring: skip method lookup for T_STRING receiversJean Boussier
We don't need it, and in string interpolation context that's the common case. Notes: Merged: https://github.com/ruby/ruby/pull/6334
2022-09-08rb_str_concat_literals: use rb_str_buf_appendJean Boussier
That's about 1.30x faster. Notes: Merged: https://github.com/ruby/ruby/pull/6334
2022-09-08[rubygems/rubygems] Fix unused variable warningDavid Rodríguez
https://github.com/rubygems/rubygems/commit/ca8d47e53a
2022-09-08Process token IDs from id.def without id.hNobuyoshi Nakada
Fixes id.h error during updating ripper.c by `make after-update`. While it used to update id.h in the build directory, but was trying to update ripper.c in the source directory. In principle, files in the source directory can or should not depend on files in the build directory.
2022-09-08Generate token ID indexes in id.defNobuyoshi Nakada
Separate the logic accross the tables from the template view for id.h.
2022-09-08[Bug #18997] Don't define ruby_qsort when POSIX qsort_r is availableXin Li
The current code would define ruby_qsort as a wrapper of qsort_s when it is available. When both qsort_s and POSIX (GNU) qsort_r are available, we should call qsort_r directly instead, and the qsort_s wrapper is redundant. Notes: Merged: https://github.com/ruby/ruby/pull/6332 Merged-By: nobu <nobu@ruby-lang.org>
2022-09-08[ruby/forwardable] Freeze VERSION and FORWARDABLE_VERSION to improve ↵rm155
Ractor-compliance https://github.com/ruby/forwardable/commit/c91f41f4fa
2022-09-08[ruby/ipaddr] Improve Ractor-compliancerm155
https://github.com/ruby/ipaddr/commit/73461724e5
2022-09-08[MSWin] Fix for non-Windows (cygwin/msys) BASERUBYNobuyoshi Nakada
Notes: Merged: https://github.com/ruby/ruby/pull/6331
2022-09-08[MSWin] Disable rubygems of BASERUBYNobuyoshi Nakada
Notes: Merged: https://github.com/ruby/ruby/pull/6331
2022-09-08[DOC] non-positive `base` in `Kernel#Integer` and `String#to_i`Nobuyoshi Nakada
2022-09-08* 2022-09-08 [ci skip]git
2022-09-08Resync Bundler & RubyGemsDavid Rodríguez
Notes: Merged: https://github.com/ruby/ruby/pull/6330
2022-09-07Fix missing replacement in 1f91dcdab3bNobuyoshi Nakada
2022-09-07Dump cross.rb only when verbose [ci skip]Nobuyoshi Nakada
2022-09-07Define BOOTSTRAPRUBY from HAVE_BASERUBYNobuyoshi Nakada
2022-09-07Fix typoTakashi Kokubun
I meant the other one. Otherwise this option doesn't make sense.
2022-09-06Adjust pch_status for --mjit=pauseTakashi Kokubun
to let mjit_add_iseq_to_process work
2022-09-06Skip early mjit_add_iseq_to_process on --mjit=pauseTakashi Kokubun
2022-09-07Now Psych uses the proleptic Gregorian calendarNobuyoshi Nakada
2022-09-06Skip calling check_unit_queue with mjit_opts.customTakashi Kokubun
fixing the behavior of b726c06e7eeafff52e368179dbe79a11b1aff975
2022-09-07Use BOOTSTRAPRUBY_COMMAND instead of fake.rb directlyNobuyoshi Nakada
2022-09-07Ensure BASERUBY when cross-compilingNobuyoshi Nakada
2022-09-07[ruby/psych] Bump snakeyaml from 1.28 to 1.31Chad Wilson
Resolves CVE-2022-25857, among other fixes. https://github.com/ruby/psych/commit/918cd25d37
2022-09-07[ruby/psych] Dump Date/DateTime as proleptic Gregorian date as well as TimeNobuyoshi Nakada
Fix ruby/psych#572 https://github.com/ruby/psych/commit/92304269bc
2022-09-07fixup 8cd6f2a0872e74c6cc089d2a4f8140483080c67aHiroshi SHIBATA
we should handle ensure block when omit this test
2022-09-07Add another method for debuggingTakashi Kokubun
2022-09-07[rubygems/rubygems] Fix: Gem info bug with version flagAntonio Paulino
https://github.com/rubygems/rubygems/commit/e4cee1f975
2022-09-07Drop an unused method for debuggingTakashi Kokubun
and add another useful one instead.