Commit graph

77079 commits

Author SHA1 Message Date
Hiroshi SHIBATA
ec131071b9 [rubygems/rubygems] util/rubocop -A --only Lint/ReturnInVoidContext
021823a331
2023-03-23 17:18:49 +09:00
Hiroshi SHIBATA
1a60012612 [rubygems/rubygems] util/rubocop -A --only Lint/RescueException
e8a5db50af
2023-03-23 17:18:49 +09:00
Hiroshi SHIBATA
25ed2e7415 [rubygems/rubygems] util/rubocop -A --only Lint/EmptyExpression
Thread.report_on_exception is always defined after Ruby 2.4 or later.

274da54f38
2023-03-23 17:18:49 +09:00
Hiroshi SHIBATA
7e3612585d [rubygems/rubygems] util/rubocop -A --only Lint/DuplicateCaseCondition
df2b192e47
2023-03-23 17:18:49 +09:00
Nobuyoshi Nakada
db7c38634e
core_assertions.rb: Raise Timeout::Error explicitly
So that `assert_raise` inside the block works.
2023-03-23 14:49:41 +09:00
Koichi Sasada
0112a5b342 Array#first and Array#last in Ruby 2023-03-23 14:03:12 +09:00
Koichi Sasada
c9fd81b860 vm_call_single_noarg_inline_builtin
If the iseq only contains `opt_invokebuiltin_delegate_leave` insn and
the builtin-function (bf) is inline-able, the caller doesn't need to
build a method frame.

`vm_call_single_noarg_inline_builtin` is fast path for such cases.
2023-03-23 14:03:12 +09:00
Koichi Sasada
e5a5e43c36 should not restore builtin_inline_index
`builtin_inline_index` is restored because THEN clause on
`Primitive.mandatory_only?` was compiled twice.

However, f29c9d6d36 skips to compile THEN clause so we don't
need to restore `builtin_inline_index`.
2023-03-23 14:03:12 +09:00
dependabot[bot]
fee9044b25 Bump github/codeql-action from 2.2.7 to 2.2.8
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 2.2.7 to 2.2.8.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](168b99b3c2...67a35a0858)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-03-23 12:44:07 +09:00
Peter Zhu
3210130993 Suppress a compiler warning on GCC in process.c
rb_pid_t is 32 bits on some platforms, which will cause a warning on GCC
due to POSFIXABLE always returning true.

    include/ruby/internal/arithmetic/fixnum.h:43:31: warning: comparison is always true due to limited range of data type [-Wtype-limits]
2023-03-22 17:25:18 -04:00
Nobuyoshi Nakada
348412c7fa [rubygems/rubygems] Use indented heredoc
085d2776d8
2023-03-22 21:21:08 +00:00
Aaron Patterson
7c307e0379 Lazily allocate id tables for children
This patch lazily allocates id tables for shape children.  If a shape
has only one single child, it tags the child with a bit.  When we read
children, if the id table has the bit set, we know it's a single child.
If we need to add more children, then we create a new table and evacuate
the child to the new table.

Co-Authored-By: Matt Valentine-House <matt@eightbitraptor.com>
2023-03-22 12:50:42 -07:00
Aaron Patterson
0519741702 pull child allocation in to a different function 2023-03-22 12:50:42 -07:00
Aaron Patterson
999ccb2b6b combine allocation functions 2023-03-22 12:50:42 -07:00
Aaron Patterson
e055c0c716 Make shape functions static
These functions don't need to be in the header file, we can declare them
as static.
2023-03-22 12:50:42 -07:00
Aaron Patterson
1a9e2d20e2 Fix shape allocation limits
We can only allocate enough shapes to fit in the shape buffer.
MAX_SHAPE_ID was based on the theoretical maximum number of shapes we
could have, not on the amount of memory we can actually consume.  This
commit changes the MAX_SHAPE_ID to be based on the amount of memory
we're allowed to consume.

Co-Authored-By: Jemma Issroff <jemmaissroff@gmail.com>
2023-03-22 08:46:12 -07:00
Nobuyoshi Nakada
e340eb2106
core_assertions.rb: Fix backward compatibility with pre 2.7 2023-03-22 23:07:26 +09:00
Nobuyoshi Nakada
27916db08c
[DOC] Update comment of assert_pattern_list
`pattern_list` may contain string since d903e76726.
2023-03-22 22:35:58 +09:00
Hiroshi SHIBATA
aa5d195712 [rubygems/rubygems] @orig_RUBY_ENGINE is always provided now
c5e8ad4823
2023-03-22 11:17:26 +00:00
Hiroshi SHIBATA
1697869500 [rubygems/rubygems] Fix test failure with missing RUBY_REVISION constants
c5b80945c6
2023-03-22 11:17:26 +00:00
Hiroshi SHIBATA
3725850297 [rubygems/rubygems] ditto: RUBY_ENGINE_VERSION
dc82ebeac6
2023-03-22 11:17:25 +00:00
Hiroshi SHIBATA
3dc4bc313f [rubygems/rubygems] RUBY_REVISION is also provided by supported platforms
71a237aeec
2023-03-22 11:17:25 +00:00
Hiroshi SHIBATA
ea1dcb3e23 [rubygems/rubygems] RUBY_DESCRIPTION is always provided by supported platforms
8a7028bc7e
2023-03-22 11:17:24 +00:00
Hiroshi SHIBATA
92f78b0e0b [rubygems/rubygems] Fixup
https://github.com/rubygems/rubygems/pull/6486

ad50221acf
2023-03-22 11:17:24 +00:00
Nobuyoshi Nakada
09bda4ceb5
core_assertions.rb: Refine assert_linear_performance
* Calculate each timeout from the ratio of each factor to the first
  factor.
2023-03-22 18:53:12 +09:00
Nobuyoshi Nakada
6cc8eb4daa
Should not reach end of non-void function 2023-03-22 18:53:11 +09:00
Hiroshi SHIBATA
8c00b130a4
Fixup 43d20596b8 2023-03-22 18:07:40 +09:00
Justin Searls
464a264cd4 [rubygems/rubygems] Remove reference to pry gem from generated bin/console file
This is just a suggestion, but since recent versions of Ruby have shipped with a `binding.irb` that provides almost all of the features that `pry` pioneered, it may be time to remove this suggestion in the name of simplicity and not confusing newer developers who aren't familiar with what to use.
2023-03-22 08:32:03 +00:00
Hiroshi SHIBATA
43d20596b8
Relax timeout limit for FreeBSD
* 20230322T063002Z.fail.html.gz
  * 20230322T063002Z.fail.html.gz
2023-03-22 16:32:23 +09:00
Hiroshi SHIBATA
8d1109c03b
Added assertion values for Amazon Linux 2023 2023-03-22 16:10:06 +09:00
Takashi Kokubun
cb45809454 RJIT: Update binding 2023-03-21 22:28:39 -07:00
Takashi Kokubun
7947920ee7 RJIT: Follow a recent CALLER_SETUP_ARG change 2023-03-21 22:12:43 -07:00
Takashi Kokubun
38946209a7 RJIT: Split has_rest_or_post exit reasons 2023-03-21 22:01:55 -07:00
dependabot[bot]
65a725633b [rubygems/rubygems] Bump rb-sys
Bumps [rb-sys](https://github.com/oxidize-rb/rb-sys) from 0.9.67 to 0.9.68.
- [Release notes](https://github.com/oxidize-rb/rb-sys/releases)
- [Commits](https://github.com/oxidize-rb/rb-sys/compare/v0.9.67...v0.9.68)

---
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-03-22 03:25:47 +00:00
Alan Wu
08eaf7c5fa
YJIT: Fix deadlock in tests due to pipe capacity
Previously, when there is enough stats that the child process fills up
the pipe capacity, the child process would block, with the parent
process waiting forever as no one is reading to clear up the pipe. The
test timed out in these situations.

Use a separate thread in the parent to read from the pipe to unblock the
child in these situation. EnvUtil also does this for handling stdout and
stderr.

I had the test suite deadlock on a Linux VM.
2023-03-21 18:16:33 -04:00
Alan Wu
aa54082d70
YJIT: Fix large ISeq rejection (#7576)
We crashed in some edge cases due to the recent change to not compile
encoded iseqs that are larger than `u16::MAX`.

- Match the C signature of rb_yjit_constant_ic_update() and clamp down
  to `IseqIdx` size
- Return failure instead of panicking with `unwrap()` in codegen when
  the iseq is too large

Co-authored-by: Maxime Chevalier-Boisvert <maxime.chevalierboisvert@shopify.com>
Co-authored-by: Noah Gibbs <noah.gibbs@shopify.com>
2023-03-21 14:24:17 -04:00
Jimmy Miller
5de26bc031
YJIT: Fix incorrect exit in splat (#7575)
So by itself, this shouldn't have been a correctness issue, but we
also pop the stack for block_args. Doing stack manipulation like that
and then side-exiting causes issues. So, while this fixes the
immediate failure, we have a bigger issue with block_args popping and
then exiting that we need to deal with.
2023-03-21 12:57:26 -04:00
Nobuyoshi Nakada
f62fa51283 [ruby/erb] [DOC] Use indented heredoc
8ba8bb7acf
2023-03-21 15:05:29 +00:00
Peter Zhu
30e7561d1d Revert "YJIT: Rest and block_arg support (#7557)"
This reverts commit 5d0a1ffafa.

This commit is causing sequel in yjit-bench to raise with this stack trace:

```
sequel-5.64.0/lib/sequel/dataset/sql.rb:266:in `literal': wrong argument type Array (expected Proc) (TypeError)
	from sequel-5.64.0/lib/sequel/database/misc.rb:269:in `literal'
	from sequel-5.64.0/lib/sequel/adapters/shared/sqlite.rb:314:in `column_definition_default_sql'
	from sequel-5.64.0/lib/sequel/database/schema_methods.rb:564:in `block in column_definition_sql'
	from sequel-5.64.0/lib/sequel/database/schema_methods.rb:564:in `each'
	from sequel-5.64.0/lib/sequel/database/schema_methods.rb:564:in `column_definition_sql'
	from sequel-5.64.0/lib/sequel/database/schema_methods.rb:634:in `block in column_list_sql'
	from sequel-5.64.0/lib/sequel/database/schema_methods.rb:634:in `map'
	from sequel-5.64.0/lib/sequel/database/schema_methods.rb:634:in `column_list_sql'
	from sequel-5.64.0/lib/sequel/database/schema_methods.rb:753:in `create_table_sql'
	from sequel-5.64.0/lib/sequel/adapters/shared/sqlite.rb:348:in `create_table_sql'
	from sequel-5.64.0/lib/sequel/database/schema_methods.rb:702:in `create_table_from_generator'
	from sequel-5.64.0/lib/sequel/database/schema_methods.rb:203:in `create_table'
	from benchmarks/sequel/benchmark.rb:19:in `<main>'
```
2023-03-21 10:51:35 -04:00
Phillip Hellewell
f67f0d7268 [ruby/reline] Add key bindings for PgUp and PgDn
(https://github.com/ruby/reline/pull/509)

* Add key bindings for PgUp, PgDn

* Match behavior of readline 8.2

In the latest readline (8.2), page-up and page-down are bound to
history-search-backward and history-search-forward by default.

We would like reline to have the same default behavior.
2023-03-21 14:48:32 +00:00
Nobuyoshi Nakada
9b85ff01a1
Use indented heredoc 2023-03-21 22:59:09 +09:00
drew-wells
9aaf2b7526
Update dln.c to fix error output from dln_open()
`libruby_name` gets trashed by `dlclose(handle)`, so output the
"linked to incompatible ... " error before calling `dlclose(handle)`.
2023-03-21 19:10:19 +09:00
Matt Valentine-House
6eac424e5e [ci skip] Move rb_id2str into new LLDB format 2023-03-21 09:10:46 +00:00
Takashi Kokubun
c44367265d RJIT: Fix invokesuper 2023-03-21 00:10:14 -07:00
dependabot[bot]
832f810dd7 Bump ruby/setup-ruby from 1.144.1 to 1.144.2
Bumps [ruby/setup-ruby](https://github.com/ruby/setup-ruby) from 1.144.1 to 1.144.2.
- [Release notes](https://github.com/ruby/setup-ruby/releases)
- [Commits](e6689b4deb...ec02537da5)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-03-21 12:36:10 +09:00
Aaron Patterson
54dbd8bea8 Use an st table for "too complex" objects
st tables will maintain insertion order so we can marshal dump / load
objects with instance variables in the same order they were set on that
particular instance

[ruby-core:112926] [Bug #19535]

Co-Authored-By: Jemma Issroff <jemmaissroff@gmail.com>
2023-03-20 13:54:18 -07:00
Takashi Kokubun
51834ff2ec
YJIT: Make dev_nodebug closer to dev (#7570) 2023-03-20 13:03:22 -07:00
Maxime Chevalier-Boisvert
27ecf3261e
Update yjit.md
Document `make yjit-smoke-test`
2023-03-20 15:40:55 -04:00
Maxime Chevalier-Boisvert
44f444478a
YJIT: tag output type as UnknownHeap in toregexp (#7562) 2023-03-20 10:16:22 -04:00
Nobuyoshi Nakada
758e4db551
Mark cached pid if necessary 2023-03-20 18:08:05 +09:00