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

80266 Коммитов

Автор SHA1 Сообщение Дата
Kevin Newton 8e223366fc [ruby/prism] More thoroughly test unescapes
https://github.com/ruby/prism/commit/e86196dde6
2023-10-13 15:31:30 -04:00
Jemma Issroff d705885286
[PRISM] Add --dump=prism mode (#8643) 2023-10-13 12:24:40 -07:00
Jemma Issroff 34add1e595
[PRISM] Compile fixes (#8644)
* Fix compiling UndefNodes
* Fix compiling super on ClassNode
* Fix compile popped for ModuleNode
* Add checks for NULL nodes
* Only add newhash if not popped
2023-10-13 10:59:37 -07:00
Takashi Kokubun 92bdc3757f Ignore the failures of CodeQL
It randomly fails like this:
https://github.com/ruby/ruby/actions/runs/6510372995/job/17683918027

and we don't want to pay for and use a larger runner for the job that
only generates false positives most of the time.
2023-10-13 09:40:44 -07:00
Koichi Sasada 62dfaeec2c disable MN schedulers for some platforms
* on `__EMSCRIPTEN__` provides epoll* declarations, but no implementations.
* on `NON_SCALAR_THREAD_ID`, now we can not debug issues on x390s/Ubuntu so skip it.

x390s/RHEL works fine, so I think we can remove second limitation but
I could not login to it so it seems hard to debug now.
2023-10-14 00:52:51 +09:00
Takashi Kokubun 5808999d30
YJIT: Fallback opt_getconstant_path for const_missing (#8623)
* YJIT: Fallback opt_getconstant_path for const_missing

* Fix a comment [ci skip]

* Remove a wrapper function
2023-10-13 08:52:23 -07:00
Alan Wu 0bf1749e9f
YJIT: Fix argument clobbering in some block_arg+rest_param calls (#8647)
Previously, for block argument callsites with some specific argument
count and callee local variable count combinations, YJIT ended up
writing over arguments that are supposed to be collected into a rest
parameter array unmodified.

Detect when clobbering would happen and avoid it. Also, place the block
handler after the stack overflow check, since it writes to new stack
space.

Reported-by: Takashi Kokubun <takashikkbn@gmail.com>
2023-10-13 10:41:53 -04:00
Nobuyoshi Nakada 511571b5ff
Only ruby/ruby repository runs on macos-arm-oss [ci skip] 2023-10-13 23:21:33 +09:00
Hiroshi SHIBATA 35edc14ee1 Ignore duplicated warning with native extension 2023-10-13 16:22:09 +09:00
Hiroshi SHIBATA c6728caeb7 Fix wrong gem name 2023-10-13 16:22:09 +09:00
Hiroshi SHIBATA fe5329f032 Ignore warning on LoadError when running under Bundler 2023-10-13 16:22:09 +09:00
Hiroshi SHIBATA 62eea99a1c Added recovery instructions for RubyGems 2023-10-13 16:22:09 +09:00
Hiroshi SHIBATA fdf0589a95 Surpressing double warnings 2023-10-13 16:22:09 +09:00
Hiroshi SHIBATA b49346ee73 Warn only LoadError without Bundler environment 2023-10-13 16:22:09 +09:00
Hiroshi SHIBATA ba4fed47ec Removed examples for warning bundled gems 2023-10-13 16:22:09 +09:00
Hiroshi SHIBATA 57c2ae206f Move additional warnings for Gem author under Gem::BUNDLED_GEMS. 2023-10-13 16:22:09 +09:00
Hiroshi SHIBATA ea05ddbeff Move path normalization into Gem from Bundler class 2023-10-13 16:22:09 +09:00
Hiroshi SHIBATA c2bdb198d7 Dont't handle inline Gemfile 2023-10-13 16:22:09 +09:00
Hiroshi SHIBATA 75644f98e5 Use Gem::BUNDLED_GEMS.warning? at Bundler.setup 2023-10-13 16:22:09 +09:00
Koichi Sasada d8a74207e7 use `uint32_t` instead of `__uint32_t` 2023-10-13 15:59:09 +09:00
Takashi Kokubun 842d9c0afc
Remove paths-ignore from required status checks (#8646) 2023-10-13 00:30:04 +00:00
Koichi Sasada cdb36dfe7d fix `native_thread_destroy()` timing
With M:N thread scheduler, the native thread (NT) related resources
should be freed when the NT is no longer needed. So the calling
`native_thread_destroy()` at the end of `is will be freed when
`thread_cleanup_func()` (at the end of Ruby thread) is not correct
timing. Call it when the corresponding Ruby thread is collected.
2023-10-13 09:19:31 +09:00
yui-knk 2794a8fef6 [Bug #19919] Warn class variable assignment and constant declaration in condition 2023-10-13 07:35:24 +09:00
Takashi Kokubun dcee3cc6ce Avoid duplicating a --repeat-count=2 job
--repeat-count=2 jobs are generally too slow for no good reason.
It doesn't seem related to testing the universal parser either.
2023-10-12 15:15:37 -07:00
git b2808cc4f2 Update default gems list at 3aba21511b [ci skip] 2023-10-12 21:37:26 +00:00
Stan Lo 3aba21511b [ruby/irb] Bump version to 1.8.2
https://github.com/ruby/irb/commit/47693a2213
2023-10-12 21:36:13 +00:00
Nobuyoshi Nakada 81399a5c46
Use `lex_eol` macros 2023-10-13 02:32:45 +09:00
Nobuyoshi Nakada 17b0643392
[Bug #19924] Source code should be unsigned char stream
Use `peekc` or `nextc` to fetch the next character, instead of reading
from `lex.pcur` directly, for compilers that plain char is signed.
2023-10-13 02:28:35 +09:00
Koichi Sasada 2dca02e273 disable MN scheduler on !`USE_MN_THREADS` 2023-10-13 02:11:29 +09:00
tomoya ishida 1126bd8c65 [ruby/irb] Fix require path completion disturbing string method
completion
(https://github.com/ruby/irb/pull/726)

https://github.com/ruby/irb/commit/e42dc74ce0
2023-10-12 16:54:09 +00:00
Koichi Sasada 10ba3fc302 Use `sysconf()` to get PAGE_SIZE
Some systems use not 4096 page size (64KB for example).
2023-10-13 01:09:41 +09:00
Haldun Bayhantopcu 4387af1b4a [ruby/prism] Fix parsing symbols in strings after labels
https://github.com/ruby/prism/commit/e16531650d
2023-10-12 16:01:40 +00:00
Matt Valentine-House 5c8764477f [ruby/prism] Increase the depth for the For node index variable
In CRuby's parser locals in for nodes appear deeper in the ast than they
do in Prism, but we can fix that with a transparent scope

https://github.com/ruby/prism/commit/460187f41e
2023-10-12 15:26:29 +00:00
Tanaka Akira c23b25f75f describe the assumption for Range#overlap?.
Range#overlap? assumes that there is no minimum value.
This assumption makes
+(...-Float::INFINITY).overlap?((...-Float::INFINITY))+ returns true
while +(...-Float::INFINITY)+ is empty.
2023-10-13 00:00:58 +09:00
Maxime Chevalier-Boisvert b2e1ddffa5
YJIT: port call threshold logic from Rust to C for performance (#8628)
* Port call threshold logic from Rust to C for performance

* Prefix global/field names with yjit_

* Fix linker error

* Fix preprocessor condition for rb_yjit_threshold_hit

* Fix third linker issue

* Exclude yjit_calls_at_interv from RJIT bindgen

---------

Co-authored-by: Takashi Kokubun <takashikkbn@gmail.com>
2023-10-12 10:05:34 -04:00
Takashi Kokubun 0c42c28531
Test YJIT on macOS Arm64 GitHub Actions (#8633)
* cp macos.yml yjit-macos.yml

* Test YJIT on macOS Arm64 GitHub Actions

* Add a non-YJIT macOS Arm64 job as well
2023-10-12 10:03:47 -04:00
tomoya ishida cf21c72cdb [ruby/irb] Fix test runner exit bug
(https://github.com/ruby/irb/pull/728)

* Remove useless test setup and teardown that sets MAIN_CONTEXT to nil

* Avoid adding command methods to main object in test

https://github.com/ruby/irb/commit/f204829a08
2023-10-12 13:55:47 +00:00
tomoya ishida e029375a7d [ruby/irb] Decouple RubyLex from prompt and line_no
(https://github.com/ruby/irb/pull/701)

* Remove instance variable prompt and line_no from RubyLex

* Fix prompt test

* Rename prompt generating method and make it private

https://github.com/ruby/irb/commit/1ceb97fe2e
2023-10-12 12:53:31 +00:00
Nobuyoshi Nakada 9694445051
[Feature #19422] Enable shared by default on macOS 2023-10-12 19:26:07 +09:00
Nobuyoshi Nakada 52709a4862 Fix `dir_config` cache for -include and -lib options
Set to "--with-" options, not "--without-" keys.
2023-10-12 17:46:01 +09:00
Nobuyoshi Nakada 1cef5f597d Include default values in `dir_config` cache keys
The extconf.rb in mysql2 gem repeats `dir_config('mysql')`, without
and with the default path.  The third call returns the former results
even with the default path.  Since it does not check the results of
the third call, that `nil` is passed to `find_library` as a path, and
fails with `NoMethodError`.
2023-10-12 17:46:01 +09:00
Nobuyoshi Nakada 2cd9aae4b7
Fix unused-function warning for 'ruby_ppoll' [ci skip] 2023-10-12 17:36:24 +09:00
Kouhei Yanagita 769f53eb7e Add benchmarks for Range#reverse_each 2023-10-12 17:34:49 +09:00
Kouhei Yanagita 66fabefa03 Add Range#reverse_each implementation for performance 2023-10-12 17:34:49 +09:00
John Hawthorn 1c871c08d9 Switch mid dump to dump_append_string_value
I don't think it's possible to create a CI with a mid which would need
escaping to be in a JSON string, but I think we might as well not rely
on that assumption.
2023-10-12 10:22:32 +02:00
John Hawthorn 635b92099e Fix ObjectSpace.dump with super() callinfo
super() uses 0 as mid for its callinfo, so we need to check for that to
avoid a segfault when using dump_all.
2023-10-12 10:22:32 +02:00
Nobuyoshi Nakada 9859dbc7fd
Fix leaked symbols on FreeBSD [ci skip] 2023-10-12 15:07:42 +09:00
Nobuyoshi Nakada feac15c1f3 [ruby/securerandom] Extract `assert_uuid_v7`
https://github.com/ruby/securerandom/commit/029677584d
2023-10-12 05:58:31 +00:00
Koichi Sasada be1bbd5b7d M:N thread scheduler for Ractors
This patch introduce M:N thread scheduler for Ractor system.

In general, M:N thread scheduler employs N native threads (OS threads)
to manage M user-level threads (Ruby threads in this case).
On the Ruby interpreter, 1 native thread is provided for 1 Ractor
and all Ruby threads are managed by the native thread.

From Ruby 1.9, the interpreter uses 1:1 thread scheduler which means
1 Ruby thread has 1 native thread. M:N scheduler change this strategy.

Because of compatibility issue (and stableness issue of the implementation)
main Ractor doesn't use M:N scheduler on default. On the other words,
threads on the main Ractor will be managed with 1:1 thread scheduler.

There are additional settings by environment variables:

`RUBY_MN_THREADS=1` enables M:N thread scheduler on the main ractor.
Note that non-main ractors use the M:N scheduler without this
configuration. With this configuration, single ractor applications
run threads on M:1 thread scheduler (green threads, user-level threads).

`RUBY_MAX_CPU=n` specifies maximum number of native threads for
M:N scheduler (default: 8).

This patch will be reverted soon if non-easy issues are found.

[Bug #19842]
2023-10-12 14:47:01 +09:00
dependabot[bot] 096ee0648e Bump ruby/setup-ruby from 1.155.0 to 1.156.0
Bumps [ruby/setup-ruby](https://github.com/ruby/setup-ruby) from 1.155.0 to 1.156.0.
- [Release notes](https://github.com/ruby/setup-ruby/releases)
- [Commits](d37167af45...5cfe23c062)

---
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-10-12 12:31:02 +09:00