91202 Commits

Author SHA1 Message Date
Maxime Chevalier-Boisvert
c0e42a7e8f Add CRuby bindings 2025-04-18 21:52:55 +09:00
Alan Wu
a65b79c653 Turn ZJIT into staticlib 2025-04-18 21:52:55 +09:00
Takashi Kokubun
82606faaea Add zjit.mk 2025-04-18 21:52:55 +09:00
Maxime Chevalier-Boisvert
2a3dc9f32f Add stats.rs placeholder 2025-04-18 21:52:55 +09:00
Max Bernstein
dca2b1ddaf Sketch HIR 2025-04-18 21:52:55 +09:00
Takashi Kokubun
d993307d4c Add --zjit option 2025-04-18 21:52:55 +09:00
Max Bernstein
43234138d6 Downgrade lockfile 2025-04-18 21:52:55 +09:00
Takashi Kokubun
8e47b6f324 cargo init 2025-04-18 21:52:55 +09:00
Tanaka Akira
ad69f4ddff [doc] update {Enumerator,Enumerable}#size document.
at Code Party RubyKaigi 2025.
2025-04-18 21:10:18 +09:00
Mari Imaizumi
ccc7493308 U+036F is now alnum
0363..036F    ; Alphabetic # Mn  [13] COMBINING LATIN SMALL LETTER A..COMBINING LATIN SMALL LETTER X
2025-04-18 19:50:23 +09:00
Mari Imaizumi
63b07cdcbb [Feature #20724] Bump Unicode version to 16.0.0 2025-04-18 19:50:23 +09:00
Martin Dürst
900ece77b2 prepare Unicode normalization for Unicode 16.0.0 2025-04-18 16:07:17 +09:00
Stan Lo
ab22f3910d Mention VS Code debugger configuration in debugging guide 2025-04-18 13:56:57 +09:00
John Hawthorn
3a29e835e6 Add benchmarks for fstring de-duplication 2025-04-18 13:03:54 +09:00
John Hawthorn
57b6a7503f Lock-free hash set for fstrings [Feature #21268]
This implements a hash set which is wait-free for lookup and lock-free
for insert (unless resizing) to use for fstring de-duplication.

As highlighted in https://bugs.ruby-lang.org/issues/19288, heavy use of
fstrings (frozen interned strings) can significantly reduce the
parallelism of Ractors.

I tried a few other approaches first: using an RWLock, striping a series
of RWlocks (partitioning the hash N-ways to reduce lock contention), and
putting a cache in front of it. All of these improved the situation, but
were unsatisfying as all still required locks for writes (and granular
locks are awkward, since we run the risk of needing to reach a vm
barrier) and this table is somewhat write-heavy.

My main reference for this was Cliff Click's talk on a lock free
hash-table for java https://www.youtube.com/watch?v=HJ-719EGIts. It
turns out this lock-free hash set is made easier to implement by a few
properties:

 * We only need a hash set rather than a hash table (we only need keys,
   not values), and so the full entry can be written as a single VALUE
 * As a set we only need lookup/insert/delete, no update
 * Delete is only run inside GC so does not need to be atomic (It could
   be made concurrent)
 * I use rb_vm_barrier for the (rare) table rebuilds (It could be made
   concurrent) We VM lock (but don't require other threads to stop) for
   table rebuilds, as those are rare
 * The conservative garbage collector makes deferred replication easy,
   using a T_DATA object

Another benefits of having a table specific to fstrings is that we
compare by value on lookup/insert, but by identity on delete, as we only
want to remove the exact string which is being freed. This is faster and
provides a second way to avoid the race condition in
https://bugs.ruby-lang.org/issues/21172.

This is a pretty standard open-addressing hash table with quadratic
probing. Similar to our existing st_table or id_table. Deletes (which
happen on GC) replace existing keys with a tombstone, which is the only
type of update which can occur. Tombstones are only cleared out on
resize.

Unlike st_table, the VALUEs are stored in the hash table itself
(st_table's bins) rather than as a compact index. This avoids an extra
pointer dereference and is possible because we don't need to preserve
insertion order. The table targets a load factor of 2 (it is enlarged
once it is half full).
2025-04-18 13:03:54 +09:00
John Hawthorn
b28363a838 Work on ATOMIC_VALUE_SET 2025-04-18 13:03:54 +09:00
John Hawthorn
89199a47db Extract rb_gc_free_fstring to string.c
This allows more flexibility in how we deal with the fstring table
2025-04-18 13:03:54 +09:00
Samuel Williams
6f6d07272e
Update usage of enum rb_io_mode. (#13128) 2025-04-18 02:37:55 +00:00
git
3bfcb013c0 * remove trailing spaces. [ci skip] 2025-04-18 00:10:03 +00:00
Takashi Kokubun
bcacf7c849 Add configuration for git commit
and test auto-style again by adding spaces to app_fib
2025-04-18 09:08:57 +09:00
Takashi Kokubun
2da80242a9 Actually test auto-style
My editor deleted trailing spaces which I meant to leave
2025-04-18 09:04:25 +09:00
Takashi Kokubun
d5f3549e71 Test auto-style 2025-04-18 09:02:30 +09:00
Takashi Kokubun
ba341883b9 Fix auto-style target reporting 2025-04-18 09:02:15 +09:00
Takashi Kokubun
4805f20f44 Use github.event.before 2025-04-18 08:58:37 +09:00
Takashi Kokubun
69c1e4c422 Check GitHub context for push events 2025-04-18 08:55:29 +09:00
Takashi Kokubun
3e1dae8d2a Port auto-style to GitHub Actions 2025-04-18 08:52:52 +09:00
Takashi Kokubun
8c6f250dcf Copy over bin/auto-style.rb
from ruby/git.ruby-lang.org as of:
a8635a4cd9
2025-04-18 08:52:52 +09:00
YO4
0db1f47ad0 [ruby/resolv] quote registry value name properly
'NV Domain' needs to be quoted.

https://github.com/ruby/resolv/commit/332a16dcc0
2025-04-17 23:48:55 +00:00
Yuta Saito
b4f74e24d9 [wasm] Fallback to emulated realpath on wasi-libc realpath ENOTSUP
wasi-libc 22 and later support realpath(3)
(https://github.com/WebAssembly/wasi-libc/pull/463) but the underlying
host syscall may return ENOTSUP. This is typically the case when using
incomplete WASI polyfills on web browsers. For such cases, we should
fallback to the emulated realpath.
2025-04-18 07:47:49 +09:00
Takashi Kokubun
d06ec25be4 Revert "* remove trailing spaces. [ci skip]"
This reverts commit 6062c904ae2c4d6a9fafb1a0e22841da85892eea.

tompng said animation becomes weird if you remove trailing spaces.
We fixed auto-style instead
a8635a4cd9.
v3_5_0_preview1
2025-04-18 06:48:30 +09:00
Samuel Williams
06a7b3c144
Only test on known good platforms. (#13123) 2025-04-17 16:19:05 +00:00
Samuel Williams
c4ae6cb500
Prefer th->ec for stack base/size. (#13101) 2025-04-17 13:21:51 +00:00
git
6062c904ae * remove trailing spaces. [ci skip] 2025-04-17 10:59:30 +00:00
Yusuke Endoh
6556a7be26 Temporarily stop the trailing-space check in CI
I will restore the check after the preview release
2025-04-17 19:59:19 +09:00
Yusuke Endoh
25efd09c71 sample/trick2025/: adds the top-five entries of TRICK 2025
See https://github.com/tric/trick2025 for TRICK 2025.
2025-04-17 19:59:19 +09:00
Hiroshi SHIBATA
7e2ba5a91b Don't use admin grant 2025-04-17 08:08:37 +09:00
Hiroshi SHIBATA
9b5ae69aac Use uutils-coreutils 2025-04-17 08:08:37 +09:00
Hiroshi SHIBATA
b4c29b7af6 Use coreutils instead of msys2 because msys2 is not provided windows-11-arm 2025-04-17 08:08:37 +09:00
Kazuki Yamaguchi
0a8a641d0a [ruby/openssl] ssl: fix SSLSocket#syswrite with String-convertible objects
Correctly pass the new object assigned by StringValue() to
ossl_ssl_write_internal_safe().

This is a follow-up to commit https://github.com/ruby/openssl/commit/0d8c17aa855d (Reduce
OpenSSL::Buffering#do_write overhead, 2024-12-21).

https://github.com/ruby/openssl/commit/3ff096196a
2025-04-16 15:16:50 +00:00
NARUSE, Yui
bbf873521a Add description about edge cases of Enumerable#size
[Bug #21152]
2025-04-16 16:55:38 +09:00
Samuel Williams
8d21f666b8
Introduce enum rb_io_mode. (#7894) 2025-04-16 07:50:37 +00:00
Nobuyoshi Nakada
d842554769
rbinstall.rb: Note about no_write [ci skip]
Since RubyGems 3.0.0 `dir_mode` option is supported, but using `File`
method to apply it, not `FileUtils`.  To reduce overwriting existing
methods (especially built-in class), and to record making directories,
keep using `no_write` method.
2025-04-16 15:45:08 +09:00
Hiroshi SHIBATA
51952929e1
[rubygems/rubygems] Fixed rubocop issue: Layout/SpaceInsideBlockBraces
https://github.com/rubygems/rubygems/commit/77a52b011a
2025-04-16 14:10:36 +09:00
Hiroshi SHIBATA
a4eb81a083 Revert advanced-security/filter-sarif update for v1.0.1 2025-04-16 11:40:11 +09:00
Hiroshi SHIBATA
02152501a4 Bump up to msys2/setup-msys2 to v2.27.0 2025-04-16 11:40:11 +09:00
Hiroshi SHIBATA
49c29cff47 Bump up to the latest versions of actions 2025-04-16 11:40:11 +09:00
Nobuyoshi Nakada
2cf95e2e04
Run the proper version of rake 2025-04-16 08:29:23 +09:00
Samuel Williams
28491e53cd [ruby/stringio] Support for rb_io_mode_t
(https://github.com/ruby/stringio/pull/129)

Companion PR to <https://github.com/ruby/ruby/pull/7894>.

https://github.com/ruby/stringio/commit/2d3988e12f
2025-04-15 11:15:35 +00:00
dependabot[bot]
f6fddbd337 Bump crossbeam-channel from 0.5.13 to 0.5.15 in /gc/mmtk
Bumps [crossbeam-channel](https://github.com/crossbeam-rs/crossbeam) from 0.5.13 to 0.5.15.
- [Release notes](https://github.com/crossbeam-rs/crossbeam/releases)
- [Changelog](https://github.com/crossbeam-rs/crossbeam/blob/master/CHANGELOG.md)
- [Commits](https://github.com/crossbeam-rs/crossbeam/compare/crossbeam-channel-0.5.13...crossbeam-channel-0.5.15)

---
updated-dependencies:
- dependency-name: crossbeam-channel
  dependency-version: 0.5.15
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-04-15 17:14:26 +09:00
Jean Boussier
77a52787a6 [ruby/json] Cleanup Kernel#JSON
https://github.com/ruby/json/commit/573ebdca89
2025-04-15 16:48:22 +09:00