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

75189 Коммитов

Автор SHA1 Сообщение Дата
git 7cd0dacb0b Update default gems list at 9fce6014b5 [ci skip] 2022-12-08 02:09:25 +00:00
Hiroshi SHIBATA 9fce6014b5 [ruby/psych] Bump version to 5.0.1
https://github.com/ruby/psych/commit/bdf20e6042
2022-12-08 02:08:25 +00:00
Chris Seaton 645cd94d9a
Add debug counters to RubyVM.stat (#6086)
* Add debug counters to RubyVM.stat

* Use SIZET2NUM

Co-author: Nobuyoshi Nakada <nobu@ruby-lang.org>

* Prefix debug_counter_names
2022-12-07 17:09:30 -08:00
Stan Lo a2d3f5606a [ruby/irb] Lazily load the multi-irb extension
(https://github.com/ruby/irb/pull/472)

* Lazily load the multi-irb extension

We now have plan to implement a command that prints all commands'
information, which will need to load all command files without actually
running them.

But because the `multi-irb` extension patches IRB's top-level methods,
loading it would cause unintentional side-effects.

So this commit moves related requires into command execution to avoid the problem.

* Make extend_irb_context private

Co-authored-by: Takashi Kokubun <takashikkbn@gmail.com>
2022-12-07 23:30:00 +00:00
Maxime Chevalier-Boisvert 30c76f4d0d
Update yjit.md
Update citation, fix outdated and inaccurate information.
2022-12-07 16:46:59 -05:00
Maxime Chevalier-Boisvert 9350c2b12f
Update YJIT warning, mention need to install rustc (#6873) 2022-12-07 15:02:45 -05:00
Maxime Chevalier-Boisvert 3bb7a40160
Update NEWS.md 2022-12-07 15:00:18 -05:00
Aaron Patterson a89d856f26 Update spec/bundler/bundler/fetcher/compact_index_spec.rb
Co-authored-by: Takashi Kokubun <takashikkbn@gmail.com>
2022-12-07 09:57:11 -08:00
Aaron Patterson edc7af48ac Stop transitioning to UNDEF when undefining an instance variable
Cases like this:

```ruby
obj = Object.new
loop do
  obj.instance_variable_set(:@foo, 1)
  obj.remove_instance_variable(:@foo)
end
```

can cause us to use many more shapes than we want (and even run out).
This commit changes the code such that when an instance variable is
removed, we'll walk up the shape tree, find the shape, then rebuild any
child nodes that happened to be below the "targetted for removal" IV.

This also requires moving any instance variables so that indexes derived
from the shape tree will work correctly.

Co-Authored-By: Jemma Issroff <jemmaissroff@gmail.com>
Co-authored-by: John Hawthorn <jhawthorn@github.com>
2022-12-07 09:57:11 -08:00
nagachika f725bf358a Fix a typo in NEWS.md. [ci-skip] 2022-12-07 21:27:36 +09:00
Ian Ker-Seymer 01fd1c482e [rubygems/rubygems] Remove remaining dev profile test
https://github.com/rubygems/rubygems/commit/7d50e998b3
2022-12-07 11:31:26 +00:00
Ian Ker-Seymer 88497b2167 [rubygems/rubygems] Better tests are better
https://github.com/rubygems/rubygems/commit/17abb80c2c
2022-12-07 11:31:25 +00:00
Ian Ker-Seymer ef50934721 [rubygems/rubygems] Fix string match in test
https://github.com/rubygems/rubygems/commit/82554f2bfd
2022-12-07 11:31:25 +00:00
Ian Ker-Seymer 554161236a [rubygems/rubygems] Always build in release mode
https://github.com/rubygems/rubygems/commit/7b84fc1f19
2022-12-07 11:31:25 +00:00
Ian Ker-Seymer 37d10caa0d [rubygems/rubygems] Updates rb-sys to 0.9.46
https://github.com/rubygems/rubygems/commit/6c2e7aafd6
2022-12-07 11:31:21 +00:00
Nobuyoshi Nakada 581b4a3c88
NEWS.md: Remove an extraneous word [ci skip] 2022-12-07 19:48:38 +09:00
Nobuyoshi Nakada 58cc3c9f38
[Bug #19187] Fix for tzdata-2022g 2022-12-07 19:19:54 +09:00
Nobuyoshi Nakada c43203fd09
NEWS.md: Remove white space only lines [ci skip] 2022-12-07 19:19:26 +09:00
Jean Boussier 1968b4e2c7 Mention `rb_hash_new_capa` and `rb_internal_thread_*` in NEWS.md 2022-12-07 10:08:25 +01:00
Yusuke Endoh bcd8b2f00a NEWS.md: Added some missing features
Also, tool/update-NEWS-refs.rb is added to help the update of NEWS.md.
2022-12-07 12:32:29 +09:00
Takashi Kokubun 65545c6608
MJIT: Fix an assertion broken with --mjit-wait enabled 2022-12-06 23:46:16 -08:00
Takashi Kokubun 17d45feeb6
MJIT: Refactor mjit_wait 2022-12-06 23:21:19 -08:00
Takashi Kokubun 57cb4a8179
MJIT: Remove obsoleted MJIT counters 2022-12-06 23:05:00 -08:00
Takashi Kokubun 12916e283f
MJIT: Use xfree for units
now that we use ZALLOC_N for allocating units
2022-12-06 23:00:22 -08:00
Takashi Kokubun 718e4f6efc
MJIT: Explain why we have MJIT_CFLAGS_PIPE [ci skip] 2022-12-06 22:59:06 -08:00
Takashi Kokubun 98c41dfe6f
MJIT: Just use ZALLOC_N in create_unit
We no longer use an MJIT worker thread, so there's no need to avoid GC.
2022-12-06 22:40:08 -08:00
Takashi Kokubun 7e20704000
MJIT: Remove an unused argument and unused counters
I plan to rebuild MJIT metrics later, not using debug counters.
2022-12-06 22:19:26 -08:00
卜部昌平 940b3170c1 document for commit 5bbba76489 [ci skip] 2022-12-07 15:09:12 +09:00
Takashi Kokubun e6b63b382c
MJIT: Refactor the jit_func enum for MJIT
All values should have a MJIT_ prefix. We could address the warning for
the end mark if we just define the macro for the check next to the enum.
It even simplifies some code for checking the enum.
2022-12-06 21:36:58 -08:00
Yusuke Endoh 8684904cb4 NEWS.md: Explain the change of [Feature #18367] 2022-12-07 08:11:35 +09:00
Jemma Issroff 40a9964b89 Set max_iv_count (used for object shapes) based on inline caches
With this change, we're storing the iv name on an inline cache on
setinstancevariable instructions. This allows us to check the inline
cache to count instance variables set in initialize and give us an
estimate of iv capacity for an object.

For the purpose of estimating the number of instance variables required
for an object, we're assuming that all initialize methods will call
`super`.

This change allows us to estimate the number of instance variables
required without disassembling instruction sequences.

Co-Authored-By: Aaron Patterson <tenderlove@ruby-lang.org>
2022-12-06 13:43:42 -08:00
Daniel Colson 64cdf8bae7 Update dependencies 2022-12-06 12:37:23 -08:00
Daniel Colson e69b91fae4 Introduce BOP_CMP for optimized comparison
Prior to this commit the `OPTIMIZED_CMP` macro relied on a method lookup
to determine whether `<=>` was overridden. The result of the lookup was
cached, but only for the duration of the specific method that
initialized the cmp_opt_data cache structure.

With this method lookup, `[x,y].max` is slower than doing `x > y ?
x : y` even though there's an optimized instruction for "new array max".
(John noticed somebody a proposed micro-optimization based on this fact
in https://github.com/mastodon/mastodon/pull/19903.)

```rb
a, b = 1, 2
Benchmark.ips do |bm|
  bm.report('conditional') { a > b ? a : b }
  bm.report('method') { [a, b].max }
  bm.compare!
end
```

Before:

```
Comparison:
         conditional: 22603733.2 i/s
              method: 19820412.7 i/s - 1.14x  (± 0.00) slower
```

This commit replaces the method lookup with a new CMP basic op, which
gives the examples above equivalent performance.

After:

```
Comparison:
              method: 24022466.5 i/s
         conditional: 23851094.2 i/s - same-ish: difference falls within
error
```

Relevant benchmarks show an improvement to Array#max and Array#min when
not using the optimized newarray_max instruction as well. They are
noticeably faster for small arrays with the relevant types, and the same
or maybe a touch faster on larger arrays.

```
$ make benchmark COMPARE_RUBY=<master@5958c305> ITEM=array_min
$ make benchmark COMPARE_RUBY=<master@5958c305> ITEM=array_max
```

The benchmarks added in this commit also look generally improved.

Co-authored-by: John Hawthorn <jhawthorn@github.com>
2022-12-06 12:37:23 -08:00
Daniel Colson c43951e60e Move BOP macros to separate file
This commit moves ruby_basic_operators and the unredefined macros out of
vm_core.h and into basic_operators.h so that we can use them more
broadly in places where we currently use a method look up via
`rb_method_basic_definition_p` (e.g. object.c, numeric.c, complex.c,
enum.c, but also in internal/compar.h after introducing BOP_CMP and
elsewhere if we introduce more BOPs)

The most controversial part of this change is probably moving
redefined_flag out of rb_vm_t. [vm_opt_method_def_table and
vm_opt_mid_table](9da2a5204f/vm.c)
are not part of rb_vm_t either, and I think this fits well with those.
But more significantly it seems to result in one fewer instruction. For
example:

Before:

```
(lldb) disassemble -n vm_opt_str_freeze
miniruby`vm_exec_core:
miniruby[0x10028233e] <+14558>: movq   0x11a86b(%rip), %rax      ; ruby_current_vm_ptr
miniruby[0x100282345] <+14565>: testb  $0x4, 0x242c(%rax)
```

After:

```
(lldb) disassemble -n vm_opt_str_freeze
ruby`vm_exec_core:
ruby[0x100280ebe] <+14510>: testb  $0x4, 0x120147(%rip)      ; ruby_vm_redefined_flag + 43
```

Co-authored-by: John Hawthorn <jhawthorn@github.com>
2022-12-06 12:37:23 -08:00
Peter Zhu 9d4483f24d [ruby/net-http] [DOC] Fix call-seq for Net::HTTP.start
The lack of a newline between the call-seq and the documentation was
causing the documentation to be parsed as a call-seq.

https://github.com/ruby/net-http/commit/1a212e2065
2022-12-06 14:27:15 +00:00
Nobuyoshi Nakada 14074567ea
[Feature #19183] Ignore interim artifacts [ci skip] 2022-12-06 20:24:02 +09:00
Koichi Sasada 87a1fb9ac3 NEWS: `UnboundMethod#==` 2022-12-06 18:23:54 +09:00
Nobuyoshi Nakada 901471ab8a
[Bug #18623] Link only existing excutables to make runnable [ci skip] 2022-12-06 17:52:58 +09:00
Lars Kanis 81e274c990 [DOC] Improve documentation to RB_ALLOCV
Although the storage of the opaque Ruby object is an array of VALUEs, the intention of RB_ALLOCV is to allocate bytes of memory.
2022-12-06 14:55:05 +09:00
dependabot[bot] 8c62b36041 Bump octokit/request-action
Bumps [octokit/request-action](https://github.com/octokit/request-action) from 4579f9e1e690974421f9f6928a30fb448e967c60 to 52ce92ce3185e00e2425f043c3e9509121929aea.
- [Release notes](https://github.com/octokit/request-action/releases)
- [Commits](4579f9e1e6...52ce92ce31)

---
updated-dependencies:
- dependency-name: octokit/request-action
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-12-06 13:50:14 +09:00
Kazuhiro NISHIYAMA 53473f8ea9
Remove unused link [ci skip] 2022-12-06 11:52:34 +09:00
Kazuhiro NISHIYAMA cf12a8f23e
Fix a link [ci skip] 2022-12-06 11:52:20 +09:00
Kazuhiro NISHIYAMA 78d42c23e2
Remove unused headings [ci skip] 2022-12-06 11:51:07 +09:00
Kazuhiro NISHIYAMA 80bd9c64aa
Revert wrong sync in 9aa18f61f2 [ci skip] 2022-12-06 11:18:59 +09:00
Nobuyoshi Nakada e9a0f45dc4
[Bug #19180] rbconfig.rb depends on common.mk 2022-12-06 11:06:15 +09:00
Martin Dürst 68bb6bfc35 update NEWS to mention Unicode version 15.0.0 2022-12-06 10:17:34 +09:00
Martin Dürst e0487ec45e update rbconfig spec to Unicode version 15.0.0
(this includes emoji version 15.0)
2022-12-06 10:11:33 +09:00
Martin Dürst 368b844874 update Unicode include files to version 15.0.0 2022-12-06 10:11:33 +09:00
Martin Dürst 66bf15636f move Unicode include files to version 15.0.0 directory 2022-12-06 10:11:33 +09:00
Martin Dürst 156069d7b6 update Unicode normalization tables to version 15.0.0 2022-12-06 10:11:33 +09:00