1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00
ruby--ruby/test/ruby
Alan Wu f90549cd38 Rust YJIT
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:
1fd9573d8b

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>
2022-04-27 11:00:22 -04:00
..
enc Avoid defining the same test class in multiple files 2022-04-22 15:00:16 -07:00
allpairs.rb
beginmainend.rb
bug-11928.rb
bug-13526.rb
lbtest.rb
marshaltestlib.rb [WIP] add error_squiggle gem 2021-06-29 23:45:49 +09:00
sentence.rb
test_alias.rb Fix visibility of alias of zsuper methods 2022-03-10 08:35:26 -08:00
test_argf.rb Use omit instead of skip: test/ruby/**/*.rb 2022-01-04 17:25:30 +09:00
test_arithmetic_sequence.rb
test_arity.rb Make a dedecated assertion to clarify failed assertions 2022-03-19 14:33:04 +09:00
test_array.rb Use omit instead of skip: test/ruby/**/*.rb 2022-01-04 17:25:30 +09:00
test_assignment.rb test/ruby/test_assignment.rb: Prevent a warning 2022-01-19 13:15:37 +09:00
test_ast.rb pend some tests while using to_binary 2022-01-31 03:47:03 +09:00
test_autoload.rb Remove autoload for constant if the autoload fails 2021-10-08 14:54:26 -07:00
test_backtrace.rb Add Thread.each_caller_location 2022-02-17 08:54:07 -08:00
test_basicinstructions.rb
test_beginendblock.rb
test_bignum.rb Use omit instead of skip: test/ruby/**/*.rb 2022-01-04 17:25:30 +09:00
test_call.rb
test_case.rb Avoid improper optimization of case statements mixed integer/rational/complex 2021-05-12 19:30:05 -07:00
test_class.rb Remove Class#descendants 2021-12-20 11:02:15 -08:00
test_clone.rb
test_comparable.rb
test_complex.rb
test_complex2.rb Use omit instead of skip: test/ruby/**/*.rb 2022-01-04 17:25:30 +09:00
test_complexrational.rb Use omit instead of skip: test/ruby/**/*.rb 2022-01-04 17:25:30 +09:00
test_condition.rb
test_const.rb
test_continuation.rb
test_default_gems.rb Use omit instead of skip: test/ruby/**/*.rb 2022-01-04 17:25:30 +09:00
test_defined.rb Add more tests for defined? with method calls 2021-03-29 07:45:15 -07:00
test_dir.rb Use omit instead of skip: test/ruby/**/*.rb 2022-01-04 17:25:30 +09:00
test_dir_m17n.rb
test_econv.rb Fix some typos by spell checker 2021-04-26 10:07:41 +09:00
test_encoding.rb
test_enum.rb Raise ArgumentError when calling Enumberable#inject without block or arguments 2022-03-23 07:55:49 -07:00
test_enumerator.rb Use capture_output instead of capture_io 2021-09-13 21:14:42 +09:00
test_env.rb ENV ivars should not be accessible from ractors 2021-12-17 15:46:50 +09:00
test_eval.rb Lazily create singletons on instance_{exec,eval} (#5146) 2021-12-02 15:53:39 -08:00
test_exception.rb A positional Hash is not keyword arguments [Bug #18632] 2022-03-18 00:35:02 +09:00
test_fiber.rb rb_fiber_terminate must not return [Bug #18497] 2022-01-19 19:57:16 +09:00
test_file.rb Use omit instead of skip: test/ruby/**/*.rb 2022-01-04 17:25:30 +09:00
test_file_exhaustive.rb Compare predicate methods as a boolean value 2022-04-15 17:14:29 +09:00
test_fixnum.rb
test_flip.rb
test_float.rb Fix dtoa buffer overrun 2022-04-12 21:30:49 +09:00
test_fnmatch.rb
test_frozen_error.rb
test_gc.rb Move total_freed_pages to size pool 2022-02-03 15:06:55 -05:00
test_gc_compact.rb [wasm] Disallow compaction 2022-01-24 09:21:08 -05:00
test_hash.rb st.c: Do not clear entries_bound when calling Hash#shift for empty hash 2022-02-10 00:14:27 +09:00
test_ifunless.rb
test_inlinecache.rb Avoid defining the same test class in multiple files 2022-04-22 15:00:16 -07:00
test_insns_leaf.rb [Bug #17880] Set leaf false on opt_setinlinecache (#4565) 2021-06-14 17:34:57 -07:00
test_integer.rb Don't call + and < in Integer.times for !FIXNUM 2021-12-01 16:21:50 -08:00
test_integer_comb.rb
test_io.rb Use omit instead of skip: test/ruby/**/*.rb 2022-01-04 17:25:30 +09:00
test_io_buffer.rb Add fiber scheduler hooks for pread/pwrite, and add support to IO::Buffer. 2021-12-23 12:20:09 +13:00
test_io_m17n.rb
test_iseq.rb Use omit instead of skip: test/ruby/**/*.rb 2022-01-04 17:25:30 +09:00
test_iterator.rb
test_jit.rb Use omit instead of skip: test/ruby/**/*.rb 2022-01-04 17:25:30 +09:00
test_jit_debug.rb Rename --jit to --mjit (#5248) 2021-12-13 16:08:01 -08:00
test_key_error.rb
test_keyword.rb test/ruby/test_keyword.rb: Prevent warning: assigned but unused variable 2022-04-11 10:05:16 +09:00
test_lambda.rb test/ruby/test_lambda.rb: Remove "warning: assigned but unused variable" 2021-04-04 15:26:09 +09:00
test_lazy_enumerator.rb Fix lazy enumerator with index size 2021-05-27 14:17:32 -07:00
test_literal.rb Use to_s and puts in tests 2021-12-16 15:12:12 +09:00
test_m17n.rb Use omit instead of skip: test/ruby/**/*.rb 2022-01-04 17:25:30 +09:00
test_m17n_comb.rb
test_marshal.rb test/ruby/test_marshal.rb: Prevent "assigned but unused variable" warning 2021-10-25 20:43:42 +09:00
test_math.rb Add domain check macros 2021-07-04 22:15:59 +09:00
test_memory_view.rb
test_metaclass.rb
test_method.rb Make define_singleton_method always define a public method 2022-03-29 12:10:13 -07:00
test_method_cache.rb
test_mixed_unicode_escapes.rb
test_module.rb Fix class ancestry checks for duped classes 2022-04-16 11:40:56 -07:00
test_name_error.rb Prevent "warning: ambiguity between regexp and two divisions" 2021-06-30 13:41:18 +09:00
test_nomethod_error.rb [WIP] add error_squiggle gem 2021-06-29 23:45:49 +09:00
test_not.rb
test_numeric.rb Use Rational for Float#round with ndigits > 14 2021-08-06 15:03:51 -07:00
test_object.rb [WIP] add error_squiggle gem 2021-06-29 23:45:49 +09:00
test_objectspace.rb Fix typos 2021-11-02 19:17:37 +09:00
test_optimization.rb Use omit instead of skip: test/ruby/**/*.rb 2022-01-04 17:25:30 +09:00
test_pack.rb Add a test for bug 18343 2021-11-16 19:28:45 -08:00
test_parse.rb Private local variables should shadow outer variables [Bug #18629] 2022-04-21 16:04:36 +09:00
test_path.rb
test_pattern_matching.rb Find pattern is no longer experimental [Feature #18585] 2022-02-19 18:45:49 +09:00
test_pipe.rb
test_primitive.rb
test_proc.rb Raise RuntimeError if Kernel#binding is called from a non-Ruby frame 2022-04-06 19:14:03 -07:00
test_process.rb Use omit instead of skip: test/ruby/**/*.rb 2022-01-04 17:25:30 +09:00
test_rand.rb Remove deprecated Random::DEFAULT [Feature #17351] 2022-01-01 18:55:52 +09:00
test_random_formatter.rb [ruby/securerandom] Use String#unpack1 2021-12-14 11:59:22 +09:00
test_range.rb Fix Range#include? for beginless exclusive string ranges 2022-02-09 19:47:28 -08:00
test_rational.rb test_cdhash: refactor change class 2021-05-12 10:30:46 +09:00
test_rational2.rb
test_readpartial.rb
test_refinement.rb Remove Refinement#{extend_object,append_features,prepend_features} 2022-01-05 10:59:03 -08:00
test_regexp.rb Just free compiled pattern if no space is used 2022-04-12 20:24:14 +09:00
test_require.rb Use omit instead of skip: test/ruby/**/*.rb 2022-01-04 17:25:30 +09:00
test_require_lib.rb Use omit instead of skip: test/ruby/**/*.rb 2022-01-04 17:25:30 +09:00
test_rubyoptions.rb test/ruby/test_rubyoptions.rb: Make it pass on Windows 2022-02-22 11:55:40 +09:00
test_rubyvm.rb Finer-grained constant cache invalidation (take 2) 2022-04-01 14:48:22 -04:00
test_rubyvm_jit.rb Use omit instead of skip: test/ruby/**/*.rb 2022-01-04 17:25:30 +09:00
test_settracefunc.rb Raise RuntimeError if Kernel#binding is called from a non-Ruby frame 2022-04-06 19:14:03 -07:00
test_signal.rb Do not create core file if it is intentional abort 2022-01-19 23:17:14 +09:00
test_sleep.rb
test_sprintf.rb [Feature #18290] Remove tests that test use of rb_gc_force_recycle 2021-11-08 15:39:53 -05:00
test_sprintf_comb.rb
test_stack.rb
test_string.rb Add String#bytesplice 2022-03-18 11:51:03 +09:00
test_stringchar.rb
test_struct.rb A positional Hash is not keyword arguments [Bug #18632] 2022-03-17 20:53:41 +09:00
test_super.rb Add tests for cme NULL crash 2021-11-17 13:20:31 -05:00
test_symbol.rb
test_syntax.rb Fix using anonymous block in method accepting explicit keywords 2022-04-05 07:35:25 -07:00
test_system.rb
test_thread.rb Uncomment code to raise LocalJumpError for yield across thread through enum 2022-04-21 20:48:27 -07:00
test_thread_cv.rb Reap rarely leaked threads 2021-10-14 22:57:45 +09:00
test_thread_queue.rb Use omit instead of skip: test/ruby/**/*.rb 2022-01-04 17:25:30 +09:00
test_threadgroup.rb
test_time.rb Decouple GC slot sizes from RVALUE 2022-02-02 09:52:04 -05:00
test_time_tz.rb Use omit instead of skip: test/ruby/**/*.rb 2022-01-04 17:25:30 +09:00
test_trace.rb
test_transcode.rb - add regression tests for U+6E7F (湿) in ISO-2022-JP 2021-07-01 17:33:43 +09:00
test_undef.rb Lazily create singletons on instance_{exec,eval} (#5146) 2021-12-02 15:53:39 -08:00
test_unicode_escape.rb
test_variable.rb
test_vm_dump.rb Use omit instead of skip: test/ruby/**/*.rb 2022-01-04 17:25:30 +09:00
test_weakmap.rb Weakmap failure is still pending 2022-01-16 22:43:04 +09:00
test_whileuntil.rb
test_yield.rb
test_yjit.rb Rust YJIT 2022-04-27 11:00:22 -04:00
ut_eof.rb