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

78524 Коммитов

Автор SHA1 Сообщение Дата
Nobuyoshi Nakada 22f9735587
Use already installed `rustc` if available [ci skip] 2023-07-21 18:38:29 +09:00
Hiroshi SHIBATA 7fdf98ef39 [rubygems/rubygems] Deprecate Gem::Platform.match
https://github.com/rubygems/rubygems/commit/e3ba3e2225
2023-07-21 08:47:55 +00:00
Nobuyoshi Nakada f602cb55d7 [rubygems/rubygems] Boundary check in `Gem::StreamUI#choose_from_list`
https://github.com/rubygems/rubygems/commit/abacb0cb34
2023-07-21 07:48:49 +00:00
Nobuyoshi Nakada 47c7c188e0
Add comments to id.h and undef finished macros 2023-07-21 14:52:43 +09:00
Takashi Kokubun 8d9a25a6d7 misc/gdb.py: Allow overriding stack_size [ci skip] 2023-07-20 15:04:51 -07:00
Burdette Lamar 210caa777b
More RDoc for Dir.glob (#8088) 2023-07-20 16:50:45 -04:00
Takashi Kokubun c4ef3d767b
YJIT: Rename exec_instruction to yjit_insns_count (#8102) 2023-07-20 15:54:59 -04:00
Takashi Kokubun b71f79dd17 Add a missing *
Co-authored-by: Alan Wu <alansi.xingwu@shopify.com>
2023-07-20 12:52:56 -07:00
Takashi Kokubun 1129488f6f Ignore win32/file.o on update-deps
This job has been so flaky:
https://github.com/ruby/ruby/actions/runs/5614842978/job/15213840097
2023-07-20 12:04:16 -07:00
Takashi Kokubun a7127745f1 Get rid of obsoleted __bp__ references 2023-07-20 11:55:31 -07:00
git bbf059fb84 Update default gems list at 134d874173 [ci skip] 2023-07-20 18:52:03 +00:00
Jemma Issroff 134d874173
Sync YARP gemspec (#8101)
* Sync YARP gemspec

We were previously not syncing the YARP gemspec over which meant
that the Ruby YARP gem was out of sync.

* Sync YARP node / lex_compat files
2023-07-20 14:51:17 -04:00
Kunshan Wang 639aa76e82
Embed struct rmatch into GC slot (#8097) 2023-07-20 14:17:38 -04:00
Jean Boussier 460c27dc15 [ruby/syntax_suggest] Handle new eval source location
See https://bugs.ruby-lang.org/issues/19755

In Ruby 3.3, using `eval` without providing a source location
will now default to `"(eval at #{__FILE__}:#{__LINE__})"`.

https://github.com/ruby/syntax_suggest/commit/8e5076472e
2023-07-20 17:58:52 +00:00
Takashi Kokubun b41fc9b9a4
YJIT: Avoid undercounting retired_in_yjit (#8038)
* YJIT: Count the number of failed instructions

* Rename yjit_insns_count to exec_instructions instead

* Hoist out the exec_instruction counter
2023-07-20 13:14:25 -04:00
Aaron Patterson abce8583e2 [ruby/yarp] Fix heredocs inside %W and %w lists
The problem was that we were treating heredoc bodies as part of the %W
list because we didn't push the scanning cursor past the heredoc after
lexing out the here doc.  To fix this, we changed the whitespace
scanning function to quit scanning when it reaches a newline but only in
the case that a heredoc is present.

Additionally, we need to prevent double counting newlines in the case of
a heredoc.  For example:

```ruby
%W(<<foo 123)
foo
```

The newline after the `)` is counted as part of scanning the heredoc, so
we added logic to prevent double counting the newline when scanning the
rest of the %W list.

https://github.com/ruby/yarp/commit/eb090d8126

Co-authored-by: Jemma Issroff <jemmaissroff@gmail.com>
2023-07-20 14:58:11 +00:00
Alan Wu 5c219c1b7f proc.c: Remove unused parameter [ci skip] 2023-07-20 10:53:31 -04:00
S-H-GAMELINKS 76ea8ecbf3 Supress warning that variable may be used uninitialized with ripper building 2023-07-20 21:55:44 +09:00
Matt Valentine-House dd8372b3f3 cvc table entries can move 2023-07-20 13:38:58 +01:00
git 62cb739ba5 Update bundled gems list at 2023-07-20 2023-07-20 07:00:26 +00:00
Nobuyoshi Nakada 419fbc77e0 [rubygems/rubygems] Clear `YAML` constant if it was undefined previously
https://github.com/rubygems/rubygems/commit/31d0311258
2023-07-19 23:20:54 +00:00
Jemma Issroff 84b5274143
[ruby/yarp] Resync YARP (#8098) 2023-07-19 16:15:01 -04:00
tomoya ishida 7380c73af4 [ruby/reline] Add assertion to auto_indent_proc's parameter, add
Ctrl-d exit test
(https://github.com/ruby/reline/pull/574)

* Add auto_indent_proc's parameter assertion in multiline_repl

* Add rendering test for Ctrl-d exit

https://github.com/ruby/reline/commit/46db71132a
2023-07-19 13:31:17 +00:00
tomoya ishida ca561480ea [ruby/reline] Always set ANSI CSI keybindings for Home, End, and
Arrow.
(https://github.com/ruby/reline/pull/569)

https://github.com/ruby/reline/commit/f363a43a45
2023-07-19 13:25:58 +00:00
Kazuhiro NISHIYAMA ea2fc58d9a
Fix a typo [ci skip] 2023-07-19 19:29:41 +09:00
Nobuyoshi Nakada 0765b890b5
Fix `USE_THREAD_CACHE=0` 2023-07-19 14:35:43 +09:00
Nobuyoshi Nakada a3a74771f2
Add a corner case for `return` 2023-07-19 12:42:20 +09:00
Alan Wu 3211b70545
Fix off-by-one in comment [ci skip] 2023-07-18 17:52:04 -04:00
osyo-manga 45fd006185 [ruby/reline] Fix [nil] is passed to auto_indent_proc when exit with
CTRL+d
(https://github.com/ruby/reline/pull/571)

* Fix [nil] is passed to auto_indent_proc when exit with CTRL+d

Fix it https://github.com/ruby/reline/issues/556

* not call auto_indent_proc when Ctrl+d.

see: https://github.com/ruby/reline/pull/571#issuecomment-1637183195

https://github.com/ruby/reline/commit/0924f2a075
2023-07-18 20:33:39 +00:00
tomoya ishida b400307923 [ruby/reline] Add missing `close` to test_rendering.rb
(https://github.com/ruby/reline/pull/573)

https://github.com/ruby/reline/commit/7cd817036e
2023-07-18 20:31:40 +00:00
Peter Zhu ecbedf9bf1 Remove assumption about object order
The address of objects can't be assumed since a later object may be
allocate in a swept slot.
2023-07-18 14:52:37 -04:00
Peter Zhu 4c03eab1aa Lazily allocate pages at boot
We can just set alloctable pages for the first size pool rather than
eagerly allocating pages.
2023-07-18 14:52:37 -04:00
Nobuyoshi Nakada fe4d906f5f [Bug #19774] Fix segfault at `return` in `END` 2023-07-19 03:40:05 +09:00
dependabot[bot] ac7d34026a [rubygems/rubygems] Bump rb-sys
Bumps [rb-sys](https://github.com/oxidize-rb/rb-sys) from 0.9.58 to 0.9.79.
- [Release notes](https://github.com/oxidize-rb/rb-sys/releases)
- [Commits](https://github.com/oxidize-rb/rb-sys/compare/v0.9.58...v0.9.79)

---
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/097ae727b7
2023-07-18 16:53:03 +00:00
Nobuyoshi Nakada 9c94db7cfc
Add tests for `return` in `BEGIN` and `END` blocks 2023-07-19 00:43:25 +09:00
Stan Lo d6ad334d6e [ruby/irb] Reduce boilerplate code in RubyLexTest
(https://github.com/ruby/irb/pull/644)

* Avoid initialising Row at every test input

* Extract common assertion patterns into methods

* Remove unnecessary PromptRow strcut and boilerplate code

https://github.com/ruby/irb/commit/1ba586c0c6
2023-07-18 15:18:58 +00:00
Nobuyoshi Nakada d1992d6df2 Reset signal handler before aborting due to sanitizer
When aborting by a sanitizer, `SIGILL` or something is raised and
often results in raising the same signal infinitely.
2023-07-19 00:06:53 +09:00
Nobuyoshi Nakada ebeecbd575 Unify `writev` and `write` operations in `check_reserved_signal_` 2023-07-19 00:06:53 +09:00
Nobuyoshi Nakada 19486ebd72 [flori/json] Re-generate parser.c
https://github.com/flori/json/commit/82a75ba98e
2023-07-19 00:02:58 +09:00
Nobuyoshi Nakada 768668a4de [flori/json] Remove unnecessary code
In `JSON#generate` and `JSON#fast_generate`:

- When the given `opts` is a `JSON::State` the variable is set to
  `nil`.
- But it will be never used as the next `if` blocks will not be
  executed.
- `JSON::State#configure` does the conversion to `Hash`, the
  conversions in the `if` block are just duplication.
- `JSON::State.new` does the same thing with `configure` when an
  argument is given.

https://github.com/flori/json/commit/5d9ab87f8e
2023-07-19 00:02:58 +09:00
Nobuyoshi Nakada 104089ce02 [flori/json] [DOC] Remove duplicate sentence
https://github.com/flori/json/commit/ed242667b4
2023-07-19 00:02:58 +09:00
Nobuyoshi Nakada f1f84ca71c [flori/json] Remove `HAVE_RB_SCAN_ARGS_OPTIONAL_HASH` check
This macro is defined since ruby 2.1, which is older than the required
ruby version.

https://github.com/flori/json/commit/dd1d54e78a
2023-07-19 00:02:58 +09:00
Stan Lo 0db58dd0db [ruby/irb] Declare rdoc as dependency
(https://github.com/ruby/irb/pull/648)

IRB already has several features that rely on rdoc, such as:

- Autocompletion's document dialog
- Autocompletion's `PerfectMatchedProc`
- The `show_doc` command
- Easter egg

And we could use its pager more in the future too. So it makes sense to
declare rdoc as a dependency instead of relying on the one bundled with
Ruby.

https://github.com/ruby/irb/commit/4dffbb1dd3
2023-07-18 13:53:31 +00:00
Ivanov-Anton b89b7d8fdc
[DOC] Fix a magic comment in the section for `experimental_copy` 2023-07-18 19:23:27 +09:00
Hiroshi SHIBATA 56c8dab468 [flori/json] Skip BigDecimal tests when it's missing to load
https://github.com/flori/json/commit/3dd36c6077
2023-07-18 12:25:55 +09:00
Nobuyoshi Nakada 9f51810f34 [flori/json] Skip unsupported test on JRuby
https://github.com/flori/json/commit/7138bf32c7
2023-07-18 12:25:54 +09:00
Dimitar Haralanov 9977462fd9 [flori/json] Rename JSON::ParseError to JSON:ParserError
https://github.com/flori/json/commit/20b80ca317
2023-07-18 12:25:54 +09:00
Hiroshi SHIBATA b368990ce6 [ruby/psych] Skip BigDecimal tests when it's missing to load
https://github.com/ruby/psych/commit/e1dbfae7a6
2023-07-18 02:55:47 +00:00
Alan Wu f302e725e1
Remove __bp__ and speed-up bmethod calls (#8060)
Remove rb_control_frame_t::__bp__ and optimize bmethod calls

This commit removes the __bp__ field from rb_control_frame_t. It was
introduced to help MJIT, but since MJIT was replaced by RJIT, we can use
vm_base_ptr() to compute it from the SP of the previous control frame
instead. Removing the field avoids needing to set it up when pushing new
frames.

Simply removing __bp__ would cause crashes since RJIT and YJIT used a
slightly different stack layout for bmethod calls than the interpreter.
At the moment of the call, the two layouts looked as follows:

                   ┌────────────┐    ┌────────────┐
                   │ frame_base │    │ frame_base │
                   ├────────────┤    ├────────────┤
                   │    ...     │    │    ...     │
                   ├────────────┤    ├────────────┤
                   │    args    │    │    args    │
                   ├────────────┤    └────────────┘<─prev_frame_sp
                   │  receiver  │
    prev_frame_sp─>└────────────┘
                     RJIT & YJIT      interpreter

Essentially, vm_base_ptr() needs to compute the address to frame_base
given prev_frame_sp in the diagrams. The presence of the receiver
created an off-by-one situation.

Make the interpreter use the layout the JITs use for iseq-to-iseq
bmethod calls. Doing so removes unnecessary argument shifting and
vm_exec_core() re-entry from the interpreter, yielding a speed
improvement visible through `benchmark/vm_defined_method.yml`:

     patched:   7578743.1 i/s
      master:   4796596.3 i/s - 1.58x  slower

C-to-iseq bmethod calls now store one more VALUE than before, but that
should have negligible impact on overall performance.

Note that re-entering vm_exec_core() used to be necessary for firing
TracePoint events, but that's no longer the case since
9121e57a5f.

Closes ruby/ruby#6428
2023-07-17 13:57:58 -04:00
Nobuyoshi Nakada 105bdba899
Fix logarithm of 0 with base 2023-07-17 23:57:11 +09:00