summaryrefslogtreecommitdiff
path: root/common.mk
AgeCommit message (Collapse)Author
2022-07-24Kill bundled gem tests when interruptedNobuyoshi Nakada
Notes: Merged: https://github.com/ruby/ruby/pull/6173
2022-07-21Update common sources including id.h after updateNobuyoshi Nakada
Notes: Merged: https://github.com/ruby/ruby/pull/6159
2022-07-21Refactor macros of array.cPeter Zhu
Move some macros in array.c to internal/array.h so that other files can also access these macros. Notes: Merged: https://github.com/ruby/ruby/pull/6157
2022-07-18Extract vm_ic_entry API to mimic vm_cc behaviorJemma Issroff
Notes: Merged: https://github.com/ruby/ruby/pull/5978
2022-07-17`Gem.unpack` extracts gems so able to executeNobuyoshi Nakada
Creates simple bin stubs to load the extracted executable files. After only extracted under `gems` directory, the gems are considered installed but the executable scripts are not found. Also the second argument is now the parent of the previous second and third arguments. Notes: Merged: https://github.com/ruby/ruby/pull/6145
2022-07-16Disable parallel built in test-bundled-gemsNobuyoshi Nakada
2022-07-16test-bundled-gems.rb needs `+` with GNU makeNobuyoshi Nakada
This script runs `make` internally, and sub-`make`s need the environment variable for the job server when compiling in parallel.
2022-07-14MJIT: Share rb_mjit_unit through mjit_unit.hTakashi Kokubun
mjit_compile.c should be able to access this more easily. Notes: Merged: https://github.com/ruby/ruby/pull/6140
2022-07-14MJIT: Merge mjit_worker.c back to mjit.c (#6138)Takashi Kokubun
Since #6006, we no longer avoid executing GC on mjit_worker.c and thus there's no need to carefully change how we write code whether you're in mjit.c or mjit_worker.c anymore. Notes: Merged-By: k0kubun <takashikkbn@gmail.com>
2022-07-12Fix some UBSAN false positives (#6115)Kevin Backhouse
* Fix some UBSAN false positives. * ruby tool/update-deps --fix Notes: Merged-By: jhawthorn <john@hawthorn.email>
2022-06-20Warn suspicious flag to `Regexp.new`Nobuyoshi Nakada
Now second argument should be `true`, `false`, `nil` or Integer. This flag is confused with third argument some times. Notes: Merged: https://github.com/ruby/ruby/pull/6039
2022-06-15Restore rb_exec_recursive_outerJohn Hawthorn
This was a public method, so we should probably keep it. Notes: Merged: https://github.com/ruby/ruby/pull/6027
2022-06-15Move RubyVM::MJIT to builtin RubyTakashi Kokubun
just less C code to maintain
2022-06-15Remove MJIT worker thread (#6006)Takashi Kokubun
[Misc #18830] Notes: Merged-By: k0kubun <takashikkbn@gmail.com>
2022-06-13Enable "make annocheck" on platforms other than Linux.Jun Aruga
The annocheck supports ELF format binaries compiled for any OS and for any architecture. It can work in not only Linux but also FreeBSD and Solaris. It is designed to be independent of the host OS and the architecture. Even in Mac, as the binaries are Mach-O foramt, the annocheck fails correctly with the message. e.g. Test binaries compiled for Mac OSX 10.13.6 (target_os: darwin17) in Fedora 35. ``` $ cat /etc/fedora-release Fedora release 35 (Thirty Five) $ file ruby ruby: Mach-O 64-bit x86_64 executable, flags:<NOUNDEFS|DYLDLINK|TWOLEVEL|WEAK_DEFINES|BINDS_TO_WEAK|PIE> $ annocheck ruby annocheck: Version 10.66. annocheck: Warning: ruby: is not an ELF format file. ``` See <https://sourceware.org/bugzilla/show_bug.cgi?id=29173> for details. Notes: Merged: https://github.com/ruby/ruby/pull/5916
2022-06-07Update the help message on /benchmarkTakashi Kokubun
I wanted to point out there's --output=all.
2022-05-16`annobin` works only when targeting FedoraNobuyoshi Nakada
And hopefully for other Linux. Since it is not run on the build os, `TEST_RUNNABLE` is not suitable for this case.
2022-05-16Add `make test-annocheck` to detect security issues.Jun Aruga
* Note that as the annocheck binary package is not available on Ubuntu, and it is working in progress in Debian, the script uses Fedora container, and it requires docker or podman command. https://www.debian.org/devel/wnpp/itp.en.html https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=926470 * .github/workflows/compilers.yml: Add "gcc-11 annocheck" case. To pass the CI, set `TEST_ANNOCHECK_OPTS: "--skip-pie --skip-notes"` for now. See <https://bugs.ruby-lang.org/issues/18061>. * Skip MJIT tests in case of annocheck case. The MJIT tests fail in the annocheck case. See <https://bugs.ruby-lang.org/issues/18781>. Notes: Merged: https://github.com/ruby/ruby/pull/5900
2022-04-27Rust YJITAlan Wu
In December 2021, we opened an [issue] to solicit feedback regarding the porting of the YJIT codebase from C99 to Rust. There were some reservations, but this project was given the go ahead by Ruby core developers and Matz. Since then, we have successfully completed the port of YJIT to Rust. The new Rust version of YJIT has reached parity with the C version, in that it passes all the CRuby tests, is able to run all of the YJIT benchmarks, and performs similarly to the C version (because it works the same way and largely generates the same machine code). We've even incorporated some design improvements, such as a more fine-grained constant invalidation mechanism which we expect will make a big difference in Ruby on Rails applications. Because we want to be careful, YJIT is guarded behind a configure option: ```shell ./configure --enable-yjit # Build YJIT in release mode ./configure --enable-yjit=dev # Build YJIT in dev/debug mode ``` By default, YJIT does not get compiled and cargo/rustc is not required. If YJIT is built in dev mode, then `cargo` is used to fetch development dependencies, but when building in release, `cargo` is not required, only `rustc`. At the moment YJIT requires Rust 1.60.0 or newer. The YJIT command-line options remain mostly unchanged, and more details about the build process are documented in `doc/yjit/yjit.md`. The CI tests have been updated and do not take any more resources than before. The development history of the Rust port is available at the following commit for interested parties: https://github.com/Shopify/ruby/commit/1fd9573d8b4b65219f1c2407f30a0a60e537f8be Our hope is that Rust YJIT will be compiled and included as a part of system packages and compiled binaries of the Ruby 3.2 release. We do not anticipate any major problems as Rust is well supported on every platform which YJIT supports, but to make sure that this process works smoothly, we would like to reach out to those who take care of building systems packages before the 3.2 release is shipped and resolve any issues that may come up. [issue]: https://bugs.ruby-lang.org/issues/18481 Co-authored-by: Maxime Chevalier-Boisvert <maximechevalierb@gmail.com> Co-authored-by: Noah Gibbs <the.codefolio.guy@gmail.com> Co-authored-by: Kevin Newton <kddnewton@gmail.com> Notes: Merged: https://github.com/ruby/ruby/pull/5826
2022-04-07Obey spec file locations to rubygemsNobuyoshi Nakada
Notes: Merged: https://github.com/ruby/ruby/pull/5774
2022-04-05Load fake.rb at `BTESTRUBY`Nobuyoshi Nakada
So that `mkmf` checks work from `make run`, and also remove duplicate `$(MINIRUBYOPT)` which is used in `$(MINIRUBY)`. Notes: Merged: https://github.com/ruby/ruby/pull/5747
2022-03-31Remove github and git related files from extracted bundled gemsNobuyoshi Nakada
2022-03-30Update dependenciesYusuke Endoh
Notes: Merged: https://github.com/ruby/ruby/pull/5703
2022-03-16add Unicode auxiliary files and Unicode UCD emoji files download for ↵Martin Dürst
ALWAYS_UPDATE_UNICODE
2022-03-13switch UNICODE_BETA back to NOMartin Dürst
2022-03-13update Unicode Version to 14.0.0 and Emoji version to 14.0Martin Dürst
2022-03-09exts.mk.tmpl: propagate MINIRUBY to enc.mk even though invoking from exts.mkYuta Saito
This is another attempt to fix out-of-src build with --with-static-linked-ext. The first attempt was 4f1888bda70981d9f5b1bf55ab692e0ce18e79f4 but reverted because it broke out-of-src build from pre-generated sources via `make dist`. This patch fixes the second trans C source gen, mentioned in the previous commit message, by passing MINIRUBY as well as when invoking from common.mk Notes: Merged: https://github.com/ruby/ruby/pull/5627
2022-02-22[Feature #18249] Update dependenciesPeter Zhu
Notes: Merged: https://github.com/ruby/ruby/pull/5474
2022-02-21[DOC] Set the documentation title and main pageNobuyoshi Nakada
Copied from https://github.com/ruby/docs.ruby-lang.org/ to be as same as docs.ruby-lang.org.
2022-02-01Try make this more readable and consistent with other targetsDavid Rodríguez
Notes: Merged: https://github.com/ruby/ruby/pull/5512
2022-02-01Tweaks to freeze bundler CIDavid Rodríguez
Currently some specs are broken because `rspec-mocks-3.10.3` is used, which has some breaking changes, apparently. This change makes ruby-core install the same gems installed upstream for running bundle specs, so that things never break with 3rd party releases. Notes: Merged: https://github.com/ruby/ruby/pull/5512
2022-01-15Transfer the responsibility for MJIT options to mjit.cNobuyoshi Nakada
Notes: Merged: https://github.com/ruby/ruby/pull/5448
2022-01-14Get rid of building main again when test-bundled-gemsNobuyoshi Nakada
2022-01-02Run the prerequisites of test-bundled-gems in orderNobuyoshi Nakada
2021-12-25Revert "Do not include external library sources into packages"NARUSE, Yui
This reverts commit a042043487eb4c7d39307b8e784ede1856455c3e.
2021-12-23Add fiber scheduler hooks for `pread`/`pwrite`, and add support to `IO::Buffer`.Samuel Williams
Notes: Merged: https://github.com/ruby/ruby/pull/5249 Merged-By: ioquatix <samuel@codeotaku.com>
2021-12-22Extended interface for IO::Buffer & documentation.Samuel Williams
Notes: Merged: https://github.com/ruby/ruby/pull/5314 Merged-By: ioquatix <samuel@codeotaku.com>
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-15use `RB_VM_LOCK_ENTER()`Koichi Sasada
We found that we need to make Ruby objects while locking the environ to ENV operation atomically, so we decided to use `RB_VM_LOCK_ENTER()` instead of `env_lock`. Notes: Merged: https://github.com/ruby/ruby/pull/5263
2021-12-15Update dependenciesNobuyoshi Nakada
Notes: Merged: https://github.com/ruby/ruby/pull/5263
2021-11-25YJIT: Implement new struct accessors (#5161)John Hawthorn
* YJIT: Implement optimized_method_struct_aref * YJIT: Implement struct_aref without method call Struct member reads can be compiled directly into a memory read (with either one or two levels of indirection). * YJIT: Implement optimized struct aset * YJIT: Update tests for struct access * YJIT: Add counters for remaining optimized methods * Check for INT32_MAX overflow It only takes a struct with 0x7fffffff/8+1 members. Also add some cheap compile time checks. * Add tests for non-embedded struct aref/aset Co-authored-by: Alan Wu <XrXr@users.noreply.github.com> Notes: Merged-By: jhawthorn <john@hawthorn.email>
2021-11-21Update dependenciesNobuyoshi Nakada
2021-11-21Refactor hacky ID tables to struct rb_ast_id_table_tYusuke Endoh
The implementation of a local variable tables was represented as `ID*`, but it was very hacky: the first element is not an ID but the size of the table, and, the last element is (sometimes) a link to the next local table only when the id tables are a linked list. This change converts the hacky implementation to a normal struct. Notes: Merged: https://github.com/ruby/ruby/pull/5136
2021-11-19optimize `Struct` getter/setterKoichi Sasada
Introduce new optimized method type `OPTIMIZED_METHOD_TYPE_STRUCT_AREF/ASET` with index information. Notes: Merged: https://github.com/ruby/ruby/pull/5131
2021-11-19GC measurement featureKoichi Sasada
* `GC.measure_total_time = true` enables total time measurement (default: true) * `GC.measure_total_time` returns current flag. * `GC.total_time` returns measured total time in nano seconds. * `GC.stat(:time)` (and Hash) returns measured total time in milli seconds. Notes: Merged: https://github.com/ruby/ruby/pull/4757
2021-11-18Optimize dynamic string interpolation for symbol/true/false/nil/0-9Jeremy Evans
This provides a significant speedup for symbol, true, false, nil, and 0-9, class/module, and a small speedup in most other cases. Speedups (using included benchmarks): :symbol :: 60% 0-9 :: 50% Class/Module :: 50% nil/true/false :: 20% integer :: 10% [] :: 10% "" :: 3% One reason this approach is faster is it reduces the number of VM instructions for each interpolated value. Initial idea, approach, and benchmarks from Eric Wong. I applied the same approach against the master branch, updating it to handle the significant internal changes since this was first proposed 4 years ago (such as CALL_INFO/CALL_CACHE -> CALL_DATA). I also expanded it to optimize true/false/nil/0-9/class/module, and added handling of missing methods, refined methods, and RUBY_DEBUG. This renames the tostring insn to anytostring, and adds an objtostring insn that implements the optimization. This requires making a few functions non-static, and adding some non-static functions. This disables 4 YJIT tests. Those tests should be reenabled after YJIT optimizes the new objtostring insn. Implements [Feature #13715] Co-authored-by: Eric Wong <e@80x24.org> Co-authored-by: Alan Wu <XrXr@users.noreply.github.com> Co-authored-by: Yusuke Endoh <mame@ruby-lang.org> Co-authored-by: Koichi Sasada <ko1@atdot.net> Notes: Merged: https://github.com/ruby/ruby/pull/5002 Merged-By: jeremyevans <code@jeremyevans.net>
2021-11-18Expect bool as `sort:` option at glob [Feature #18287]Nobuyoshi Nakada
Notes: Merged: https://github.com/ruby/ruby/pull/5084 Merged-By: nobu <nobu@ruby-lang.org>
2021-11-10Mark IO::Buffer as experimental.Samuel Williams
Notes: Merged: https://github.com/ruby/ruby/pull/4621
2021-11-10IO::Buffer for scheduler interface.Samuel Williams
Notes: Merged: https://github.com/ruby/ruby/pull/4621
2021-10-28add `make runirb` ruleKoichi Sasada
it's start irb on built ruby (not installed ruby).