summaryrefslogtreecommitdiff
path: root/tool
AgeCommit message (Collapse)Author
2022-04-01Finer-grained constant cache invalidation (take 2)Kevin Newton
This commit reintroduces finer-grained constant cache invalidation. After 8008fb7 got merged, it was causing issues on token-threaded builds (such as on Windows). The issue was that when you're iterating through instruction sequences and using the translator functions to get back the instruction structs, you're either using `rb_vm_insn_null_translator` or `rb_vm_insn_addr2insn2` depending if it's a direct-threading build. `rb_vm_insn_addr2insn2` does some normalization to always return to you the non-trace version of whatever instruction you're looking at. `rb_vm_insn_null_translator` does not do that normalization. This means that when you're looping through the instructions if you're trying to do an opcode comparison, it can change depending on the type of threading that you're using. This can be very confusing. So, this commit creates a new translator function `rb_vm_insn_normalizing_translator` to always return the non-trace version so that opcode comparisons don't have to worry about different configurations. [Feature #18589] Notes: Merged: https://github.com/ruby/ruby/pull/5716
2022-03-31Remove CI configuration files from extracted bundled gemsNobuyoshi Nakada
2022-03-30Fix locations of the second argumentNobuyoshi Nakada
2022-03-28Fix a missing commaNobuyoshi Nakada
2022-03-28Use m4 comments outside macros in m4 filesNobuyoshi Nakada
2022-03-28Extract RUBY_REQUIRE_FUNCSNobuyoshi Nakada
2022-03-25Revert "Finer-grained inline constant cache invalidation"Nobuyoshi Nakada
This reverts commits for [Feature #18589]: * 8008fb7352abc6fba433b99bf20763cf0d4adb38 "Update formatting per feedback" * 8f6eaca2e19828e92ecdb28b0fe693d606a03f96 "Delete ID from constant cache table if it becomes empty on ISEQ free" * 629908586b4bead1103267652f8b96b1083573a8 "Finer-grained inline constant cache invalidation" MSWin builds on AppVeyor have been crashing since the merger. Notes: Merged: https://github.com/ruby/ruby/pull/5715 Merged-By: nobu <nobu@ruby-lang.org>
2022-03-24Finer-grained inline constant cache invalidationKevin Newton
Current behavior - caches depend on a global counter. All constant mutations cause caches to be invalidated. ```ruby class A B = 1 end def foo A::B # inline cache depends on global counter end foo # populate inline cache foo # hit inline cache C = 1 # global counter increments, all caches are invalidated foo # misses inline cache due to `C = 1` ``` Proposed behavior - caches depend on name components. Only constant mutations with corresponding names will invalidate the cache. ```ruby class A B = 1 end def foo A::B # inline cache depends constants named "A" and "B" end foo # populate inline cache foo # hit inline cache C = 1 # caches that depend on the name "C" are invalidated foo # hits inline cache because IC only depends on "A" and "B" ``` Examples of breaking the new cache: ```ruby module C # Breaks `foo` cache because "A" constant is set and the cache in foo depends # on "A" and "B" class A; end end B = 1 ``` We expect the new cache scheme to be invalidated less often because names aren't frequently reused. With the cache being invalidated less, we can rely on its stability more to keep our constant references fast and reduce the need to throw away generated code in YJIT. Notes: Merged: https://github.com/ruby/ruby/pull/5433
2022-03-24Add ISEQ_BODY macroPeter Zhu
Use ISEQ_BODY macro to get the rb_iseq_constant_body of the ISeq. Using this macro will make it easier for us to change the allocation strategy of rb_iseq_constant_body when using Variable Width Allocation. Notes: Merged: https://github.com/ruby/ruby/pull/5698
2022-03-24extlibs.rb: Add fallback `Colorize`Nobuyoshi Nakada
To get rid of an unnecessary dependency for the case using in other repositories. Notes: Merged: https://github.com/ruby/ruby/pull/5701
2022-03-24extlibs.rb: Enclose `Vars` in `ExtLibs` classNobuyoshi Nakada
To get rid of an unnecessary top-level constant for the case using as a library. Notes: Merged: https://github.com/ruby/ruby/pull/5701
2022-03-24extlibs.rb: Extract ExtLibs#processNobuyoshi Nakada
For the case using this script as a library. - `ExtLibs#process` reads and processes an extlibs file. - `ExtLibs#process_under` processes all extlibs files under the given directory. - `Extlibs.run` parses `ARGV` and lets an instance process the directories. Notes: Merged: https://github.com/ruby/ruby/pull/5701
2022-03-10Ignore pre-release for sync target on sync_default_gemsHiroshi SHIBATA
2022-03-08Added release option to sync only released version of the default gemsHiroshi SHIBATA
2022-02-28Merge RubyGems and Bundler masterHiroshi SHIBATA
Notes: Merged: https://github.com/ruby/ruby/pull/5606
2022-02-27fake.rb: Set prefix to `$topdir`Nobuyoshi Nakada
Not to refer outside the top build directory from rbconfig.
2022-02-25[ruby/date] Use `assert_deprecated_warn`Nobuyoshi Nakada
https://github.com/ruby/date/commit/c55004715a
2022-02-24Add ABI version to RUBY_LIB_VERSIONPeter Zhu
This commit adds the ABI version as build metadata to RUBY_LIB_VERSION. This will ensure that gems are installed in a path with the ABI version. Notes: Merged: https://github.com/ruby/ruby/pull/5591
2022-02-22[Feature #18249] Implement ABI checkingPeter Zhu
Header file include/ruby/internal/abi.h contains RUBY_ABI_VERSION which is the ABI version. This value should be bumped whenever an ABI incompatible change is introduced. When loading dynamic libraries, Ruby will compare its own `ruby_abi_version` and the `ruby_abi_version` of the loaded library. If these two values don't match it will raise a `LoadError`. This feature can also be turned off by setting the environment variable `RUBY_RUBY_ABI_CHECK=0`. This feature will prevent cases where previously installed native gems fail in unexpected ways due to incompatibility of changes in header files. This will force the developer to recompile their gems to use the same header files as the built Ruby. In Ruby, the ABI version is exposed through `RbConfig::CONFIG["ruby_abi_version"]`. Notes: Merged: https://github.com/ruby/ruby/pull/5474
2022-02-19RUBY_REPLACE_TYPE: check if the target type is a pointerNobuyoshi Nakada
Notes: Merged: https://github.com/ruby/ruby/pull/5574
2022-02-18gen-mail.rb: support markdown file pathNARUSE, Yui
2022-02-16fix parallel test timeout retryingKoichi Sasada
On the parallel test, workers can be killed because of timeout and the information for the retrying can be inconsistent. This patch will skip if the inconsistency is found and report as an error. http://ci.rvm.jp/results/trunk-asserts@phosphorus-docker/3834082 Notes: Merged: https://github.com/ruby/ruby/pull/5559
2022-02-02Treat TS_ICVARC cache as separate from TS_IVC cacheJemma Issroff
Notes: Merged: https://github.com/ruby/ruby/pull/5519
2022-02-01Sync latest Bundler & RubyGemsDavid Rodríguez
Notes: Merged: https://github.com/ruby/ruby/pull/5512
2022-01-27[ruby/logger] Fix log rotation inter-process lock failed.Jesse Chavez
Issue only occurs in JRuby 9.3.0.0 and Windows and the full console output is: log rotation inter-process lock failed. D:\log.txt -> D:\log.txt.0: The process cannot access the file because it is being used by another process. log writing failed. closed stream log writing failed. closed stream ... https://github.com/ruby/logger/commit/19fc734638
2022-01-26add `--stderr-on-failure` option to test-allKoichi Sasada
Now all failure messages are printed to stdout. This option makes all failure messages printed into stderr. Notes: Merged: https://github.com/ruby/ruby/pull/5483
2022-01-25[ruby/pathname] Officially drop support for ruby 2.6 or olderDavid Rodríguez
The gem doesn't even install on old rubies, but since the gemspec claims it's supported, `gem install pathname` will try to install it and print an error. This commit doesn't fix the above issue. The only way to fix it would be to restore support and release a new version that actually supports old rubies. However, such a change has been proposed and ignored for a long time. So this issue proposes to leave that broken but at least bring the gemspec manifest and the CI matrix in sync to hopefully avoid this issue from happening again in the future. https://github.com/ruby/pathname/commit/3ee010b538
2022-01-23Reuse the default `AC_LANG_PROGRAM(C)` definitionNobuyoshi Nakada
2022-01-22Override `AC_C_PROGRAM` on old autoconfNobuyoshi Nakada
Autoconf 2.69 fails to detect `-Werror=old-style-definition` due to the old style definition of `main`.
2022-01-19remain `RUBY_ON_BUG` for child processes.Koichi Sasada
`RUBY_ON_BUG` is useful for child processes created by the test process. Notes: Merged: https://github.com/ruby/ruby/pull/5466
2022-01-19Merge rubygems/rubygems HEAD.Hiroshi SHIBATA
Picked at 12aeef6ba9a3be0022be9934c1a3e4c46a03ed3a Notes: Merged: https://github.com/ruby/ruby/pull/5462
2022-01-19[wasm] add no thread variant for freestanding environmentYuta Saito
This implementation does nothing around preemptive context switching because there is no native thread. Notes: Merged: https://github.com/ruby/ruby/pull/5407
2022-01-19[wasm] add asyncify based setjmp, fiber, register scan emulationYuta Saito
configure.ac: setup build tools and register objects main.c: wrap main with rb_wasm_rt_start to handle asyncify unwinds tool/m4/ruby_wasm_tools.m4: setup default command based on WASI_SDK_PATH environment variable. checks wasm-opt which is used for asyncify. tool/wasm-clangw wasm/wasm-opt: a clang wrapper which replaces real wasm-opt with do-nothing wasm-opt to avoid misoptimization before asyncify. asyncify is performed at POSTLINK, but clang linker driver tries to run optimization by wasm-opt unconditionally. inlining pass at wasm level breaks asyncify's assumption, so should not optimize before POSTLIK. wasm/GNUmakefile.in: wasm specific rules to compile objects Notes: Merged: https://github.com/ruby/ruby/pull/5407
2022-01-17Removed skip alias in test suiteHiroshi SHIBATA
Notes: Merged: https://github.com/ruby/ruby/pull/5446
2022-01-16Let testunit use omit or pend instead of skipNobuyoshi Nakada
Notes: Merged: https://github.com/ruby/ruby/pull/5453
2022-01-14Fetch the unmerged revision to test of bundled gemsNobuyoshi Nakada
2022-01-06tool/rbinstall.rb: instal ruby.wasm produced by EmscriptenYuta Saito
Notes: Merged: https://github.com/ruby/ruby/pull/5370
2021-12-27Track RubyGems 3.4.0dev and Bundler 2.4.0devHiroshi SHIBATA
Notes: Merged: https://github.com/ruby/ruby/pull/5350
2021-12-25tag's prefix is "v"NARUSE, Yui
2021-12-25Revert "Do not include external library sources into packages"NARUSE, Yui
This reverts commit a042043487eb4c7d39307b8e784ede1856455c3e.
2021-12-25Revert "make-snapshot: add -extlibs option"NARUSE, Yui
This reverts commit afa9d65d61857792508b1405835b07b78e24449c. It prevents installing libffi.
2021-12-25fix tool/format-releaseNARUSE, Yui
Pass ruby directory path
2021-12-25Merge RubyGems-3.3.3 and Bundler-2.3.3Hiroshi SHIBATA
Notes: Merged: https://github.com/ruby/ruby/pull/5342
2021-12-24sync_default_gems.rb: Expand GH-xxxx style GitHub links [ci skip]Nobuyoshi Nakada
2021-12-24sync_default_gems.rb: GitHub links at word boundary only [ci skip]Nobuyoshi Nakada
2021-12-24Merge RubyGems-3.3.2 and Bundler-2.3.2Hiroshi SHIBATA
Notes: Merged: https://github.com/ruby/ruby/pull/5334
2021-12-23Merge RubyGems-3.3.1 and Bundler-2.3.1Hiroshi SHIBATA
Notes: Merged: https://github.com/ruby/ruby/pull/5325
2021-12-21Merge RubyGems-3.3.0 and Bundler-2.3.0Hiroshi SHIBATA
Notes: Merged: https://github.com/ruby/ruby/pull/5317
2021-12-21rbinstall.rb: install ext only when it's configured [Bug #18414]Yuta Saito
Notes: Merged: https://github.com/ruby/ruby/pull/5297
2021-12-21Fix location of extensions in bundled gems when static-linked-extNobuyoshi Nakada
Install bundled gem extension files to the gem extension directory under DESTDIR, when static-linked-ext as well as non-static case. Notes: Merged: https://github.com/ruby/ruby/pull/5308