Граф коммитов

77536 Коммитов

Автор SHA1 Сообщение Дата
Aaron Patterson 3016f30c95 Return NULL to indicate the next shape isn't found
During compaction we must fix up shapes on objects who were extended but
then became embedded.  `rb_shape_traverse_from_new_root` is supposed to
walk shape trees looking for a matching shape.  When a shape has a
"single child" we weren't returning NULL when the edge names didn't
match.

In the case of a single outgoing edge, this patch returns NULL when the
child edge name doesn't match (similar to the case when a shape has a
hash of outgoing edges)
2023-04-18 16:56:48 -07:00
Vladimir Dementyev b09f5c7bf7
MatchData#named_captures: add optional symbolize_names keyword (#6952) 2023-04-19 11:19:31 +12:00
John Hawthorn 2dff1d4fda
YJIT: Fix raw sample stack lengths in exit traces (#7728)
yjit-trace-exits appends a synthetic sample for the instruction being
exited, but we didn't increment the size of the stack. Fixing this count
correctly lets us successfully generate a flamegraph from the exits.

I also replaced the line number for instructions with 0, as I don't
think the previous value had meaning.

Co-authored-by: Adam Hess <HParker@github.com>
2023-04-18 10:09:16 -04:00
dependabot[bot] d8a6db7292 Bump dependabot/fetch-metadata from 1.3.6 to 1.4.0
Bumps [dependabot/fetch-metadata](https://github.com/dependabot/fetch-metadata) from 1.3.6 to 1.4.0.
- [Release notes](https://github.com/dependabot/fetch-metadata/releases)
- [Commits](4de7a6c08c...efb5c8deb1)

---
updated-dependencies:
- dependency-name: dependabot/fetch-metadata
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-04-18 12:38:14 +09:00
Kazuhiro NISHIYAMA 8519d94d3d
Update how to subscribe mailing lists
- Update mailing lists domain
- Use 'join' instead of an alias 'subscribe'.
- Command should be in subject instead of body.
2023-04-18 10:41:00 +09:00
Kazuhiro NISHIYAMA 2f6539fc94
Sort by URL [ci skip] 2023-04-18 09:28:47 +09:00
dependabot[bot] 4574ace6f9 [rubygems/rubygems] Bump rb-sys
Bumps [rb-sys](https://github.com/oxidize-rb/rb-sys) from 0.9.71 to 0.9.72.
- [Release notes](https://github.com/oxidize-rb/rb-sys/releases)
- [Commits](https://github.com/oxidize-rb/rb-sys/compare/v0.9.71...v0.9.72)

---
updated-dependencies:
- dependency-name: rb-sys
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-04-17 23:58:14 +00:00
Jimmy Miller 293913905e
YJIT: Fixes failure reported by rails for opt+splat+rest (#7727) 2023-04-17 17:58:04 -04:00
Takashi Kokubun 5aa3be65f4
YJIT: Spill a caller stack as late as possible (#7726) 2023-04-17 17:57:33 -04:00
Nobuyoshi Nakada 165ef42b3c
* append newline at EOF. [ci skip] 2023-04-17 22:34:20 +09:00
Jean Boussier f3979aec76 Add spec for `Warning[:performance]`
[Feature #19538]
2023-04-17 10:29:46 +02:00
Peter Zhu a0d1069e03 Make classes embedded on 32 bit
Classes are now exactly 80 bytes when embedded, which perfectly fits the
3rd size pool on 32 bit systems.
2023-04-16 11:06:31 -04:00
Peter Zhu 24b137336b Move shape ID to flags for classes on 32 bit
Moves shape ID to FL_USER4 to FL_USER19 for the shape ID on 32 bit
systems. This makes the rb_classext_struct smaller so that it can be
embedded.
2023-04-16 11:06:31 -04:00
Peter Zhu d7bb7e70cc Change RMODULE_ALLOCATED_BUT_NOT_INITIALIZED
RCLASS_CLONED no longer uses FL_USER1, so we can make
RMODULE_ALLOCATED_BUT_NOT_INITIALIZED use FL_USER1.
2023-04-16 11:06:31 -04:00
Peter Zhu ad3d4e87d7 Move RCLASS_CLONED to rb_classext_struct
This commit moves RCLASS_CLONED from the flags to the
rb_classext_struct. This frees the FL_USER1 bit.
2023-04-16 11:06:31 -04:00
Nobuyoshi Nakada fac814c2dc
Fix `PLATFORM_GET_INC`
On platforms where unaligned word access is not allowed, and if
`sizeof(val)` and `sizeof(type)` differ:

- `val` > `type`, `val` will be a garbage.
- `val` < `type`, outside `val` will be clobbered.
2023-04-16 17:45:27 +09:00
Koichi Sasada 29e01c6f5f skip if `DidYouMean.formatter=` is not defined
ruby/test_default_gems.rb can define empty `DidYouMean` module
because of the following line (second require) in the
`lib/did_you_mean/did_you_mean.gemspec`:

```ruby
begin
  require_relative "lib/did_you_mean/version"
rescue LoadError # Fallback to load version file in ruby core repository
  require_relative "version"
end
```

It defines only `::DidYouMean::VERSION`.

However, in the `test/ruby/test_patten_matching.rb` assumes that
if `defined?(DidYouMean)` is true, then there is a method `DidYouMean.formatter=`
and this assumption fails all tests in `test/ruby/test_patten_matching.rb` if
there is only a `::DidYouMean::VERSION`.

To reproduce the failures, we need to repeat the following command:

`make test-all TESTS='-v ruby/test_default_gems.rb ruby/pattern_matching'`

(because the ruby/test_default_gems.rb should be run before the ruby/pattern_matching`)

This patch introduces more strict gurds.
2023-04-16 09:26:56 +09:00
Jean Boussier 52449b5b75 Implement ObjectSpace::WeakMap#delete and ObjectSpace::WeakKeyMap#delete
[Feature #19561]

It's useful to be able to remove references from weak maps.
2023-04-15 16:29:46 +02:00
Benoit Daloze 4dc2e5a850
Fix packed_data.rdoc 2023-04-15 16:09:04 +02:00
tomoya ishida 19aa30d5d5 [ruby/reline] Change Reline.add_dialog_proc(name, nil) to properly
remove dialog_proc
(https://github.com/ruby/reline/pull/532)

https://github.com/ruby/reline/commit/43283b2f37
2023-04-15 09:32:05 +00:00
Nobuyoshi Nakada 34f484d233
fake.rb should depend on revision.h [ci skip] 2023-04-15 12:44:08 +09:00
Nobuyoshi Nakada 607cd24128
Adjust function style [ci skip] 2023-04-15 11:50:54 +09:00
Nobuyoshi Nakada 5944a31614
[DOC] Update sample callback of `rb_objspace_each_objects`
* refine liveness check
* fix missing closing brace
2023-04-15 11:48:11 +09:00
git 9a1c737dee * append newline at EOF. [ci skip] 2023-04-15 00:10:49 +00:00
Jean Boussier a1db5ecd93 Add specs for ObjectSpace::WeakKeyMap
[Feature #18498]
2023-04-15 02:10:38 +02:00
Takashi Kokubun 45c6b58768
YJIT: Add a counter to all side exits (#7720) 2023-04-14 19:49:44 -04:00
Alan Wu 87c7de55e0 RJIT: Skip a YJIT test
Despite applying a fix to RJIT similar to the YJIT fix, this test still
crashes RJIT.
2023-04-14 18:01:14 -04:00
Alan Wu 0b95cbcbde YJIT: Remove duplicate `asm.spill_temps()`
`jit_prepare_routine_call()` calls it, and there is another call above on line 2302.

Co-authored-by: Takashi Kokubun <takashikkbn@gmail.com>
2023-04-14 18:01:14 -04:00
Alan Wu 31e67a476f YJIT: Fix false object collection when setting ivar
Previously, setinstancevariable could generate code that calls
`rb_ensure_iv_list_size()` without first updating `cfp->sp`. This means
in the event that a GC start from within said routine the top few
objects would not be marked, causing them to be falsly collected.

Call `jit_prepare_routine_call()` first.

[Bug #19601]
2023-04-14 18:01:14 -04:00
Takashi Kokubun 4501fb8b46
YJIT: Introduce Target::SideExit (#7712)
* YJIT: Introduce Target::SideExit

* YJIT: Obviate Insn::SideExitContext

* YJIT: Avoid cloning a Context for each insn
2023-04-14 17:00:10 -04:00
Jimmy Miller d83e59e6b8
YJIT: Change to Option<CodegenStatus> (#7717) 2023-04-14 14:21:29 -04:00
Jean Boussier 6c1b604e29 Revert "Add specs for ObjectSpace::WeakKeyMap"
This reverts commit fce8f9f24e.
2023-04-14 10:07:33 +02:00
Jean Boussier fce8f9f24e Add specs for ObjectSpace::WeakKeyMap
[Feature #18498]
2023-04-14 09:57:04 +02:00
Jean Boussier 6a5c355e4e Add RB_WARN_CATEGORY_DEFAULT_BITS
Followup: ac123f167a

RB_WARN_CATEGORY_ALL_BITS is exposed in a public header, so it
makes sense for it to be updated to contain all valid bits.

Instead we introduce RB_WARN_CATEGORY_DEFAULT_BITS to list the
categories that are enabled by default.
2023-04-14 09:46:10 +02:00
git 07428e7277 Update default gems list at 67743d5823 [ci skip] 2023-04-14 06:39:44 +00:00
Sutou Kouhei 67743d5823 [ruby/stringio] Development of 3.0.7 started.
https://github.com/ruby/stringio/commit/5d39880f70
2023-04-14 06:38:51 +00:00
Nobuyoshi Nakada eab1f1ef18
Avoid diffutils 3.8 bug#61193 [ci skip] 2023-04-14 13:51:59 +09:00
Hiroshi SHIBATA 3733ee835b [ruby/readline-ext] Expose Readline::GEM_VERSION
https://github.com/ruby/readline-ext/commit/70aa84b80e
2023-04-14 03:43:46 +00:00
Hiroshi SHIBATA 283c190374 [ruby/nkf] Expose NKF::GEM_VERSION
https://github.com/ruby/nkf/commit/0d0fb3a162
2023-04-14 03:43:17 +00:00
Hiroshi SHIBATA 8a06f1a69f [ruby/pathname] Expose Pathname::VERSION
https://github.com/ruby/pathname/commit/2b0b1a82ee
2023-04-14 12:42:36 +09:00
dependabot[bot] 389ea0ae4c Bump actions/checkout from 3.5.0 to 3.5.2
Bumps [actions/checkout](https://github.com/actions/checkout) from 3.5.0 to 3.5.2.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](8f4b7f8486...8e5e7e5ab8)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-04-14 12:39:49 +09:00
Jeremy Evans 1f115f141d Speed up rebuilding the loaded feature index
Rebuilding the loaded feature index slowed down with the bug fix
for #17885 in 79a4484a07.  The
slowdown was extreme if realpath emulation was used, but even when
not emulated, it could be about 10x slower.

This adds loaded_features_realpath_map to rb_vm_struct. This is a
hidden hash mapping loaded feature paths to realpaths. When
rebuilding the loaded feature index, look at this hash to get
cached realpath values, and skip calling rb_check_realpath if a
cached value is found.

Fixes [Bug #19246]
2023-04-13 20:22:36 -07:00
Hiroshi SHIBATA 6beb755d81 [ruby/prettyprint] Expose PrettyPrint::VERSION
https://github.com/ruby/prettyprint/commit/c6f3947e96
2023-04-14 01:52:08 +00:00
Hiroshi SHIBATA 3f8756484f [ruby/pp] Expose PP::VERSION
https://github.com/ruby/pp/commit/3d0e65e79f
2023-04-14 01:49:51 +00:00
Hiroshi SHIBATA 652f273308 [ruby/resolv] Expose Resolv::VERSION
https://github.com/ruby/resolv/commit/6ab2385e89
2023-04-14 01:46:38 +00:00
Hiroshi SHIBATA ebe620def6 [ruby/securerandom] Expose SecureRandom::VERSION
https://github.com/ruby/securerandom/commit/2e6434331d
2023-04-14 01:43:47 +00:00
Nobuyoshi Nakada 60f22ebf86 [Bug #19533] Add spec of infinite range inclusion 2023-04-14 10:22:09 +09:00
Nobuyoshi Nakada fb17c833f5 [Bug #19533] Fix infinite range inclusion with numeric value 2023-04-14 10:22:09 +09:00
Nobuyoshi Nakada 1a149aab77 Extract range type check functions 2023-04-14 10:22:09 +09:00
Takashi Kokubun 8286eed20b Allow testing a different version 2023-04-13 17:53:41 -07:00