Commit graph

77079 commits

Author SHA1 Message Date
Alan Wu
34026afd04
YJIT: Delete stale frozen_bytes related code (#7423)
The code and comments in there have been disabled by comments for a long
time. The issues that the counter used to solve are now solved more
comprehensively by "runningness" [tracking][1] introduced by Code GC
and [delayed deallocation][2].

Having a single counter doesn't fit our current model where code pages
that could be touched or not are interleaved, anyway.

Just delete the code.

[1]: e7c71c6c92
[2]: a0b0365e90
2023-03-02 16:21:05 -05:00
Takashi Kokubun
a9f4e5cc60
YJIT: Fix default call threshold in help (#7424) 2023-03-02 16:16:09 -05:00
David Rodríguez
4467084098 [rubygems/rubygems] Enable Layout/DefEndAlignment
4403613fae
2023-03-02 21:13:12 +00:00
Takashi Kokubun
02ee8cb06a
Increase timeout for ruby/debug tests (#7421) 2023-03-02 12:13:59 -08:00
Takashi Kokubun
98235834fa Investigate missing ./autogen.sh
7532986318
2023-03-02 09:58:06 -08:00
Takashi Kokubun
533c8c0c44 Re-skip an unstable Ractor test
7532190115
http://ci.rvm.jp/results/trunk-yjit@ruby-sp2-docker/4466770
2023-03-02 09:47:07 -08:00
Takashi Kokubun
fac92cd050 Revert "Revert "Re-enable test_ractor for YJIT""
This reverts commit 9792d9e40f.

Ractor implementation has been rewritten. Let's see if it works now.
2023-03-02 09:11:24 -08:00
Orien Madgwick
573522bd84 [rubygems/rubygems] Simplify the gem package file filter in the gemspec template
The regular expression is difficult to understand at a glance.
Let's replace it with a much simpler string comparison.

a3745aa03f
2023-03-02 17:05:04 +00:00
Jimmy Miller
ce476cdfb7
YJIT: Fix cfunc splat
Follow-up for cb8a040b79.
2023-03-02 10:57:19 -05:00
Koichi Sasada
5875fce6ce Ractor::Selector#empty?
It returns the waiting set is empty or not.

Also add Ractor::Selector's tests.
2023-03-03 00:08:02 +09:00
Tony Hsu
5f3c7ac196 [rubygems/rubygems] Replace lockfile with .locked
203f3e3802
2023-03-02 14:43:27 +00:00
tomoya ishida
556439613a [ruby/irb] Handle long inspect and control character in prompt
string
(https://github.com/ruby/irb/pull/528)

* Handle long inspect and control characters in prompt string

* Add constants for prompt truncate length, omission and replace pattern

* Simply compare string instead of regexp in prompt truncation test
2023-03-02 13:53:44 +00:00
Stan Lo
da6ac30d1e [ruby/irb] Specify metadata to provide richer information on
rubygems.org
(https://github.com/ruby/irb/pull/532)

f01c2a6ac1
2023-03-02 13:49:03 +00:00
Nobuyoshi Nakada
72811deaa8
MSWin: Use MESSAGE_BEGIN/MESSAGE_END instead of bare echo
To strip enclosing double quotes.
2023-03-02 19:18:13 +09:00
Hiroshi SHIBATA
14355dde83
Use https://www.ruby-lang.org/en/downloads/releases/ for download the old versions of Ruby packages 2023-03-02 16:59:50 +09:00
Jeremy Evans
04cfb26bd3 Remove support for the Regexp.new 3rd argument
This was deprecated in Ruby 3.2.

Fixes [Bug #18797]
2023-03-01 23:42:47 -08:00
Koichi Sasada
6207a3f588 Enable flaky ractor test
I hope a4421bd73c will solve the issue...
2023-03-02 16:14:49 +09:00
Koichi Sasada
a4421bd73c Rewrite Ractor synchronization mechanism
This patch rewrites Ractor synchronization mechanism, send/receive
and take/yield.

* API
  * Ractor::Selector is introduced for lightweight waiting
    for many ractors.
* Data structure
  * remove `struct rb_ractor_waiting_list` and use
    `struct rb_ractor_queue takers_queue` to manage takers.
  * remove `rb_ractor_t::yield_atexit` and use
    `rb_ractor_t::sync::will_basket::type` to check the will.
  * add `rb_ractor_basket::p.take` to represent a taking ractor.
* Synchronization protocol
  * For the Ractor local GC, `take` can not make a copy object
    directly so ask to generate the copy from the yielding ractor.
  * The following steps shows what `r1.take` does on `r0`.
    * step1: (r0) register `r0` into `r1`'s takers.
    * step2: (r0) check `r1`'s status and wakeup r0 if `r1` is waiting
             for yielding a value.
    * step3: (r0) sleep until `r1` wakes up `r0`.
  * The following steps shows what `Ractor.yield(v)` on `r1`.
    * step1: (r1) check first takers of `r1` and if there is (`r0`),
             make a copy object of `v` and pass it to `r0` and
             wakes up `r0`.
    * step2: (r1) if there is no taker ractors, sleep until
             another ractor try to take.
2023-03-02 14:31:54 +09:00
Soutaro Matsumoto
1abec43b5d
Fix rbs (#7415)
* Update RBS to skip validation task
* Revert TEST_BUNDLED_GEMS_ALLOW_FAILURES
2023-03-02 12:59:04 +09:00
Ellen Marie Dash
d2d521b274 [rubygems/rubygems] Regenerate lockfile if spec list is invalid/empty.
d2c56315e2
2023-03-02 00:50:58 +00:00
Alexander Popov
35457ebb8f [ruby/uri] Replace RubyDoc.info links with Ruby.GitHub.io
As requested.

c272f205f9
2023-03-01 23:42:50 +00:00
Alexander Popov
bc668d75f6 [ruby/uri] Take out GitHub link for gemspec metadata
ca4638a4b3
2023-03-01 23:42:49 +00:00
Alexander Popov
8a5110b664 [ruby/uri] Populate gemspec metadata object
31748915d0
2023-03-01 23:42:48 +00:00
Alexander Popov
93a54a3c30 [ruby/uri] Sort gemspec metadata object alphabetical
1e9420b57c
2023-03-01 23:42:47 +00:00
Alexander Popov
932c0e77ee [ruby/uri] Remake metadata object in gemspec into one assignment
19a19ccde6
2023-03-01 23:42:47 +00:00
Alexander Popov
57e6d66450 [ruby/uri] Add documentation link into gemspec
19ced145f4
2023-03-01 23:42:46 +00:00
Jimmy Miller
cb8a040b79
YJIT: Properly deal with cfunc splat when no args needed (#7413)
Related to:
https://github.com/ruby/ruby/pull/7377

Previously it was believed that there was a problem with a combination
of cfuncs + splat + send, but it turns out the same issue happened
without send. For example `Integer.sqrt(1, *[])`. The issue was
happened not because of send, but because of setting the wrong argc
when we don't need to splat any args.
2023-03-01 16:33:16 -05:00
Takashi Kokubun
a80906a714 Allow failing rbs failures for now
will wait until soutaro fixes it.

The problem of bundled gems is that you can't really revert it as long
as you have scheduled "update bundled_gems".
2023-03-01 13:07:40 -08:00
Maxime Chevalier-Boisvert
27c2572dbd
YJIT: reject large stacks so we can use i8/u8 stack_size and stack_offset (#7412)
* Reject large stacks so we can use i8/u8 stack_size and stack_offset

* Add rejection test for iseq too long as well
2023-03-01 15:09:25 -05:00
Soutaro Matsumoto
559dfea7fb
Test with unreleased RBS (#7411)
* Use RBS 3.0.1

3.0.2 cannot run test on Ruby CI. Waiting for the next release...

* Use unreleased version of RBS
2023-03-01 10:02:19 -08:00
Takashi Kokubun
5e607cfa4c
YJIT: Use a boxed slice for outgoing branches and cme dependencies (#7409)
YJIT: Use a boxed slice for outgoing branches

and cme dependencies
2023-03-01 12:15:36 -05:00
Koichi Sasada
0d415a322f Enable DEBUG_LOG feature on USE_RUBY_DEBUG_LOG
`ruby_set_debug_option` is needed for `RUBY_DEBUG_LOG` feature
so it should be called when `USE_RUBY_DEBUG_LOG` is true.
2023-03-01 17:18:43 +09:00
Jean Boussier
40e5ee64f0 Implement Write Barrier for autoload_table_type
It's just a decorated st_table, so we call `RB_OBJ_WRITTEN` after
inserting to it.

We also call `RB_OBJ_WRITTEN` on delete for completeness even though
it's a noop.
2023-03-01 08:56:56 +01:00
git
ee83274f36 Update bundled gems list at 2023-03-01 2023-03-01 07:02:27 +00:00
Lars Kanis
47f8bf50e1 [DOC] Clarify IO#autoclose impact on #close
Mention that autoclose changes the behavior of explicit close in addition to implicit close at IO finalization.
2023-03-01 16:02:11 +09:00
Daniel Colson
62b3bcba5e [rubygems/rubygems] Auto-heal on corrupted lockfile with missing deps
Following up on https://github.com/rubygems/rubygems/pull/6355, which
turned a crash into a nicer error message, this commit auto-heals the
corrupt lockfile instead.

In this particular case (a corrupt Gemfile.lock with missing
dependencies) the LazySpecification will not have accurate dependency
information, we have to materialize the SpecSet to determine there are
missing dependencies. We've already got a way to handle this, via
`SpecSet#incomplete_specs`, but it wasn't quite working for this case
because we'd get to `@incomplete_specs += lookup[name]` and
`lookup[name]` would be empty for the dependency.

With this commit we catch it a bit earlier, marking the parent spec
containing the missing dependency as incomplete.

486ecb8f20
2023-03-01 02:50:40 +00:00
John Bampton
c43fbe4ebd
Fix spelling (#7405) 2023-02-28 10:05:30 -08:00
Takashi Kokubun
966adfb799
YJIT: Compress BranchGenFn and BranchShape (#7401)
* YJIT: Compress BranchGenFn and BranchShape

* YJIT: Derive Debug for Branch

* YJIT: Capitalize BranchGenFn names

Co-authored-by: Maxime Chevalier-Boisvert <maxime.chevalierboisvert@shopify.com>
Co-authored-by: Alan Wu <alansi.xingwu@shopify.com>
2023-02-28 10:04:28 -08:00
Takashi Kokubun
67ad831b5f
YJIT: Use a boxed slice for gc_obj_offsets (#7397)
* YJIT: Use a boxed slice for gc_obj_offsets

* YJIT: Stop using Option

* YJIT: s/add_counter/incr_counter_by/

Co-authored-by: Maxime Chevalier-Boisvert <maxime.chevalierboisvert@shopify.com>
2023-02-28 10:03:24 -08:00
Matt Valentine-House
3766cbce13 Update Rust bindgen 2023-02-28 09:09:00 -08:00
Matt Valentine-House
5e4b80177e Update the depend files 2023-02-28 09:09:00 -08:00
Matt Valentine-House
460f399c5a Merge internal/rgengc.h and internal/gc.h 2023-02-28 09:09:00 -08:00
Maxime Chevalier-Boisvert
de66b60f33 YJIT: add defer_empty_count stat
Count how often we defer from a block that is empty
2023-02-28 11:57:41 -05:00
Stan Lo
9ddd73060b [ruby/irb] Display and prioritise instance methods in `ls
<module/class>`
(https://github.com/ruby/irb/pull/496)

e3d21f9329
2023-02-28 14:36:12 +00:00
Samuel Giddins
2d6097a0f5 [rubygems/rubygems] Fix method redefinition warning in gem exec specs
f177990d4c
2023-02-28 12:54:37 +00:00
Jean Boussier
cf18f0b868 Implement Write Barrier for autoload_data
It's not uncommon for libraries to add thing sinto
autoload that won't necessarily be loaded.

This can cause hundreds or thousands of entries to be
left over in the autoload table, so it's best not to
mark them on every minor.
2023-02-28 09:27:55 +01:00
git
cd1991281e Update bundled gems list at 2023-02-28 2023-02-28 07:01:59 +00:00
Hiroshi SHIBATA
9cc0ac22f7
Update lib/net/http/status.rb 2023-02-28 14:29:57 +09:00
Hiroshi SHIBATA
66b89b069d
Also ignore dismissed CodeQL alerts at tests and URI library 2023-02-28 12:44:13 +09:00
dependabot[bot]
c3e57d686a Bump ruby/setup-ruby from 1.138.0 to 1.139.0
Bumps [ruby/setup-ruby](https://github.com/ruby/setup-ruby) from 1.138.0 to 1.139.0.
- [Release notes](https://github.com/ruby/setup-ruby/releases)
- [Commits](d3c9825d67...92aece5fc9)

---
updated-dependencies:
- dependency-name: ruby/setup-ruby
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-02-28 12:35:10 +09:00