79677 Commits

Author SHA1 Message Date
Takashi Kokubun
3ad306b4f0
YJIT: Fallback megamorphic super/yield to dynamic dispatch (#8197)
YJIT: Fallback megamorphic super/yield

to dynamic dispatch
2023-08-10 14:13:21 -04:00
Nobuyoshi Nakada
cc0fca2729 Fix range of --backtrace-limit
Also an option command line should have precedence over `RUBYOPT`.
2023-08-11 01:56:50 +09:00
Takashi Kokubun
92cf14b4c5
YJIT: Allow VM_CALL_ARGS_BLOCKARG on invokesuper (#8198) 2023-08-10 08:59:52 -07:00
Nobuyoshi Nakada
5397fc315a
Remove duplicate prerequisite [ci skip] 2023-08-10 21:04:27 +09:00
Nobuyoshi Nakada
4ba348ec3e
Explicitly require rspec/expectations tentatively
Maybe only with load-relative, recent changes to bunder/setup.rb seem
affecting weirdly.  It fails to load rspec/expectations.rb inside
rspec-core.
2023-08-10 17:37:19 +09:00
Nobuyoshi Nakada
bde55d09ed
Make PREPARE_SYNTAX_SUGGEST include TEST_RUNNABLE prefix
So that `make PREPARE_SYNTAX_SUGGEST= test-syntax-suggest` works.
2023-08-10 17:35:50 +09:00
Mike Dalessio
d2343368ab Deprecate Kernel#open and IO support for subprocess creation/forking
Deprecate Kernel#open and IO support for subprocess creation and
forking. This deprecates subprocess creation and forking in

- Kernel#open
- URI.open
- IO.binread
- IO.foreach
- IO.readlines
- IO.read
- IO.write

This behavior is slated to be removed in Ruby 4.0

[Feature #19630]
2023-08-10 09:38:11 +09:00
Stan Lo
984109b836 [ruby/irb] Skip nested IRB tests in Ruby Core CI
(https://github.com/ruby/irb/pull/675)

Sometimes the subprocess gets stuck in the nested IRB session until timed
out. We don't have enough information to debug it yet, so skip the tests
to unblock CI.

https://github.com/ruby/irb/commit/606f18c80c
2023-08-09 22:28:55 +00:00
Takashi Kokubun
1ccd0eae11
YJIT: Chain guard method IDs for respond_to? (#8196) 2023-08-09 14:46:42 -07:00
Takashi Kokubun
493acaf4d4
YJIT: Distinguish exit and fallback reasons for invokesuper/invokeblock (#8194)
YJIT: Distinguish exit and fallback reasons

for invokesuper/invokeblock
2023-08-09 15:34:30 -04:00
Peter Zhu
0b8f15575a Fix memory leak for incomplete lambdas
[Bug #19836]

The parser does not free the chain of `struct vtable`, which causes
memory leaks.

The following script reproduces this issue:

```
10.times do
  100_000.times do
    Ripper.parse("-> {")
  end

  puts `ps -o rss= -p #{$$}`
end
```
2023-08-09 14:06:58 -04:00
Peter Zhu
5bc8fceca8 Fix memory leak in parser for incomplete tokens
[Bug #19835]

The parser does not free the `tbl` of the `struct vtable` when there are
leftover `lvtbl` in the parser. This causes a memory leak.

The following script reproduces this issue:

```
10.times do
  100_000.times do
    Ripper.parse("class Foo")
  end

  puts `ps -o rss= -p #{$$}`
end
```
2023-08-09 14:06:58 -04:00
Takashi Kokubun
d3efce69ea
YJIT: Count throw instructions for each tag (#8188)
* YJIT: Count throw instructions for each tag

* Show % of each throw type
2023-08-09 10:16:15 -07:00
Maxime Chevalier-Boisvert
c9b30f9d76
YJIT: implement imul instruction encoding in x86 assembler (#8191) 2023-08-09 13:12:21 -04:00
Kevin Newton
a41c617e41
Implement MUL instruction for aarch64 (#8193) 2023-08-09 12:21:53 -04:00
Stan Lo
ab0f90f1f5 [ruby/irb] Fix nested IRB sessions' history saving
(https://github.com/ruby/irb/pull/652)

1. Dynamically including `HistorySavingAbility` makes things unnecessarily
   complicated and should be avoided.
2. Because both `Reline` and `Readline` use a single `HISTORY` constant
   to store history data. When nesting IRB sessions, only the first IRB
   session should handle history loading and saving so we can avoid
   duplicating history.
3. History saving callback should NOT be stored in `IRB.conf` as it's
   recreated every time `IRB.setup` is called, which would happen when
   nesting IRB sessions.

https://github.com/ruby/irb/commit/0fef0ae160
2023-08-09 14:57:52 +00:00
Takashi Kokubun
6acfc50bcc
YJIT: Count all opt_getconstant_path exit reasons (#8187) 2023-08-09 09:54:24 -04:00
Alan Wu
5eef3ce21f
YJIT: Correct name of a counter (#8186) 2023-08-09 09:47:42 -04:00
Yusuke Endoh
86f4415fb8 Prevent a warning: global variable `$VERSION' not initialized 2023-08-09 15:35:16 +09:00
Yusuke Endoh
48c3b08672 Prevent warnings: assigned but unused variable 2023-08-09 15:34:45 +09:00
Takashi Kokubun
1b0da1e623
Skip running brew upgrade (#8189)
This has been unstable:
https://github.com/ruby/ruby/actions/runs/5797755676/job/15713988590

and I'm not sure if we need that in the first place, assuming the
OS image itself is maintained by GitHub.
2023-08-08 16:46:12 -07:00
Takashi Kokubun
cd8d20cd1f
YJIT: Compile exception handlers (#8171)
Co-authored-by: Maxime Chevalier-Boisvert <maximechevalierb@gmail.com>
2023-08-08 16:06:22 -07:00
Peter Zhu
74b9c7d207 Remove wrapper functions of RVALUE_REMEMBERED
Functions rgengc_remembered, rgengc_remembered_sweep, and
rgengc_remembersetbits_get are just wrappers of RVALUE_REMEMBERED and
doesn't do much more. We can remove all those and use RVALUE_REMEMBERED
directly instead.
2023-08-08 09:44:13 -04:00
Nobuyoshi Nakada
397a77557c [ruby/yarp] Fix wrong conversion and cast
Conversions from `uint64_t`/`VALUE` to `long` may loose upper bits.

https://github.com/ruby/yarp/commit/c26f650d96
2023-08-08 13:21:39 +00:00
Nobuyoshi Nakada
d931bf2232 [ruby/yarp] Adjust indents [ci skip]
https://github.com/ruby/yarp/commit/2d1135769d
2023-08-08 13:21:38 +00:00
Nobuyoshi Nakada
72d1a790cf
[Bug #19833] Fix index underflow at superclasses of BasicObject 2023-08-08 19:03:38 +09:00
Nobuyoshi Nakada
69292676a2
Add message for --ruby option [ci skip] 2023-08-08 09:21:45 +09:00
Nobuyoshi Nakada
694d99dda2
Share duplicate code between Wasm and the others 2023-08-08 08:48:53 +09:00
Nobuyoshi Nakada
1a83474ded
Simplify try-rescue loop 2023-08-08 08:34:53 +09:00
Nobuyoshi Nakada
89dbca894f
Remove unnecessary braces which make indents confusing 2023-08-08 08:34:53 +09:00
Nobuyoshi Nakada
0e5da05a32
Do not double "yp_" prefix [ci skip] 2023-08-08 08:09:02 +09:00
dependabot[bot]
a5ffcfbd8a [rubygems/rubygems] Bump rb-sys
Bumps [rb-sys](https://github.com/oxidize-rb/rb-sys) from 0.9.79 to 0.9.81.
- [Release notes](https://github.com/oxidize-rb/rb-sys/releases)
- [Commits](https://github.com/oxidize-rb/rb-sys/compare/v0.9.79...v0.9.81)

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

Signed-off-by: dependabot[bot] <support@github.com>

https://github.com/rubygems/rubygems/commit/4c9f8269f6
2023-08-07 18:44:48 +00:00
dependabot[bot]
33056c2935 [rubygems/rubygems] Bump rb-sys
Bumps [rb-sys](https://github.com/oxidize-rb/rb-sys) from 0.9.79 to 0.9.81.
- [Release notes](https://github.com/oxidize-rb/rb-sys/releases)
- [Commits](https://github.com/oxidize-rb/rb-sys/compare/v0.9.79...v0.9.81)

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

Signed-off-by: dependabot[bot] <support@github.com>

https://github.com/rubygems/rubygems/commit/d3237ab4e2
2023-08-07 17:12:27 +00:00
Stan Lo
0387b86c3a [ruby/irb] Remove unused InputMethod#initialize
(https://github.com/ruby/irb/pull/635)

* Remove unused InputMethod#initialize

The constructor takes a `file_name` argument, but it is never used. The
only input method that needs a file is `FileInputMethod`, which has its
own constructor to take a file object directly.

So the constructor in `InputMethod` is not needed and its child classes
don't need to call `super` in their constructors.

* Remove unused FileInputMethod#file_name

https://github.com/ruby/irb/commit/153b1e9d1c
2023-08-07 15:30:13 +00:00
Burdette Lamar
589c01c411
[DOC] RDoc for Process (#8179) 2023-08-07 09:51:03 -04:00
Nobuyoshi Nakada
11f33ba620
Add hints of tag jumps for optimization
Just as the state was originally passed as the return value of
`longjmp`, the state stored in EC cannot be 0 when the jump is
captured now too.
2023-08-07 10:32:47 +09:00
Nobuyoshi Nakada
ef5b1d19c1
Turn jit_exec and jit_compile into macros if disabled 2023-08-06 18:45:40 +09:00
Nobuyoshi Nakada
acd27e3ec3
Move GC_CAN_COMPILE_COMPACTION definition before used 2023-08-06 18:45:40 +09:00
Nobuyoshi Nakada
3651f985f0
Exclude files added to the toplevel 2023-08-06 09:26:20 +09:00
Nobuyoshi Nakada
af13b03817
Remove unnecessarily copied document [ci skip] 2023-08-06 07:40:01 +09:00
Benoit Daloze
ac07d88197 [ruby/yarp] Add a Requirements section in Build System docs
https://github.com/ruby/yarp/commit/298025314c
2023-08-05 17:30:36 +00:00
Benoit Daloze
489120f18b [ruby/yarp] Small fixes to docs/build_system.md
https://github.com/ruby/yarp/commit/f9db0c282b

Co-authored-by: Mike Dalessio <mike.dalessio@gmail.com>
2023-08-05 17:30:35 +00:00
Benoit Daloze
11f10bb1ac [ruby/yarp] Clarify shared library
https://github.com/ruby/yarp/commit/0b174b76f1

Co-authored-by: Mike Dalessio <mike.dalessio@gmail.com>
2023-08-05 17:30:35 +00:00
Benoit Daloze
70ef66f240 [ruby/yarp] Document the build system of YARP
https://github.com/ruby/yarp/commit/85ae0e2816
2023-08-05 17:30:34 +00:00
Nobuyoshi Nakada
4e6861d337 Fix Gem::BUNDLED_GEMS.find_gem return value
If the required name is different from the found gem name, return the
gem name, instead of true that means the required name is an exact gem
name.
2023-08-05 18:56:37 +09:00
Takashi Kokubun
e176f84138 Just suppress a warning for non-Emscripten Wasm build
Revert "Revert "Skip calling jit_exec on Wasm""

This reverts commit 2e94610f70baca4af004202f288a6b5dd10889ca.

It's not about whether it's optimized away or not. I just don't want to
leave and maintain the callsite (e.g. signature) in the path where
YJIT is never built.
2023-08-04 20:50:46 -07:00
Nobuyoshi Nakada
2e94610f70 Revert "Skip calling jit_exec on Wasm"
This reverts commit e80752f9bbc5228dba3066cd95a81e2e496bd9d7.

RJIT and YJIT are never enabled on Wasm.  When both are disabled,
`jit_exec` is defined to return `Qundef` constantly, and is optimized
away.
2023-08-05 12:12:42 +09:00
S-H-GAMELINKS
4e7e972841 Remove uneeded int2big property for Universal Parser 2023-08-05 11:39:38 +09:00
yui-knk
f07ef1d54c Lrama v0.5.3 2023-08-05 10:32:41 +09:00
Takashi Kokubun
e80752f9bb Skip calling jit_exec on Wasm
We often break Wasm build when we modify how jit_exec works. I'm
planning to modify it again soon.

We actually don't support running Ruby JIT on Wasm, so it doesn't seem
worth the maintenance effort.
2023-08-04 15:39:02 -07:00