Koichi Sasada
7340e7f827
introduce rb_ractor_atfork()
...
to reset main ractor at fork().
2020-12-24 04:30:50 +09:00
Koichi Sasada
7fcb6b3dbe
fix ractor-locking around rb_ractor_thread_list()
...
With locking a ractor, rb_ary_push() can call RB_VM_LOCK_ENTER()
and it violates an assertion: should not acquire ractor-lock.
2020-12-24 04:30:49 +09:00
Marcus Stollsteimer
458d5175b9
Small improvements in magic comments docs
...
* remove a duplicate statement
* fix rdoc markup
* fix typos
2020-12-23 19:47:26 +01:00
Koichi Sasada
b32ed8aa41
remove method__cache__clear
...
DTrace probe method__cache__clear is no longer used.
[Bug #16658 ]
2020-12-24 01:59:36 +09:00
Yusuke Endoh
a8fc72f5a8
sample/trick2015/kinaba/entry.rb: The constant "Data" has been removed
...
Instead, use "Proc" as a 4-letter constant.
2020-12-24 01:51:46 +09:00
Marc-Andre Lafortune
8feb40f49a
Document shareable_constant_value and other magic constants [doc]
2020-12-23 11:50:33 -05:00
Nobuyoshi Nakada
4a8ff22f0c
Reset paren_nest at tAREF and tASET [Bug #17431 ]
2020-12-24 01:39:52 +09:00
Nobuyoshi Nakada
fb54574393
Pass keyword options in assert_syntax_error
2020-12-24 01:24:30 +09:00
git
221ca0f828
* 2020-12-24 [ci skip]
2020-12-24 00:16:59 +09:00
Yusuke Endoh
3a81daaf8d
Module#public_class_method also accepts a symbol array as an argument
...
I'm unsure if this is intentional, but add a document anyway.
[Feature #17314 ]
2020-12-24 00:15:29 +09:00
Kenta Murata
94015200b6
[fiddle] Update to 1.0.6
2020-12-23 23:40:04 +09:00
aycabta
28e9344fa4
[ruby/irb] Change StdioInputMethod#eof? to non-blocking
...
This fixes --inf-ruby-mode.
https://github.com/ruby/irb/commit/0e4a818955
2020-12-23 22:08:30 +09:00
aycabta
129ecb43e5
[ruby/irb] Fix error_message for assert_dynamic_prompt
...
https://github.com/ruby/irb/commit/b12dfb6298
2020-12-23 21:26:25 +09:00
aycabta
31bd172185
[ruby/irb] Suppress "shadowing outer" warning
...
https://github.com/ruby/irb/commit/8b83fbef69
2020-12-23 21:26:25 +09:00
Hiroshi SHIBATA
684649ea05
[ruby/psych] Bump version to 3.3.0
...
https://github.com/ruby/psych/commit/0abce07b90
2020-12-23 19:53:21 +09:00
Hiroshi SHIBATA
8259d88938
[ruby/psych] Skip test_ractor.rb with ruby/psych repo
...
Because ruby/psych still uses minitest. minitest didn't support
assert_ractor provided by test suite of ruby/ruby repo.
https://github.com/ruby/psych/commit/7da26358f1
2020-12-23 19:45:54 +09:00
Kenta Murata
aad88cc10b
[ruby/date] Define dummy RUBY_TYPED_FROZEN_SHAREABLE for old Ruby
...
https://github.com/ruby/date/commit/9f3e90ad10
2020-12-23 18:32:24 +09:00
Kenta Murata
aa856d5077
[ruby/date] Fix envutil for old Ruby
...
https://github.com/ruby/date/commit/57e25c406a
2020-12-23 18:19:26 +09:00
Nobuyoshi Nakada
313d63c2ac
Use rb_init_identtable instead of direct use of rb_hashtype_ident
2020-12-23 18:06:27 +09:00
Koichi Sasada
e052d07163
Revert "need to clear blocking cnt at fork (child process)"
...
This reverts commit 0dd4896175f95c4c2a26d91a97b9fcb9a74cc0c6.
It breaks the tests on RUBY_DEBUG=1.
2020-12-23 16:55:36 +09:00
Takashi Kokubun
81a8d1cf09
Skip checking ROBJECT_EMBED
...
when we already check ROBJECT_NUMIV(self) is larger than
ROBJECT_EMBED_LEN_MAX at the beginning of the method, because the number
of instance variables for the same object doesn't decrease.
```
$ benchmark-driver -v --rbenv 'before --jit;after --jit' --repeat-count=4 --alternate --output=all benchmark_3000.yml
before --jit: ruby 3.0.0dev (2020-12-23T06:32:19Z master dbb4f19969) +JIT [x86_64-linux]
after --jit: ruby 3.0.0dev (2020-12-23T07:45:42Z master 95e866c098) +JIT [x86_64-linux]
last_commit=Skip checking ROBJECT_EMBED
Calculating -------------------------------------
before --jit after --jit
Optcarrot 3000 frames 102.34091772397872 102.77738408379015 fps
103.37784821624231 105.46530219076179
104.39567016876369 106.43712452152215
105.31782092252713 106.54986150067481
```
2020-12-22 23:50:43 -08:00
Takashi Kokubun
dbb4f19969
Allow inlining Integer#-@ and #~
...
```
$ benchmark-driver -v --rbenv 'before --jit;after --jit' benchmark/mjit_integer.yml --filter '(comp|uminus)'
before --jit: ruby 3.0.0dev (2020-12-23T05:41:44Z master 0dd4896175) +JIT [x86_64-linux]
after --jit: ruby 3.0.0dev (2020-12-23T06:25:41Z master 8887d78992) +JIT [x86_64-linux]
last_commit=Allow inlining Integer#-@ and #~
Calculating -------------------------------------
before --jit after --jit
mjit_comp(1) 44.006M 70.417M i/s - 40.000M times in 0.908967s 0.568042s
mjit_uminus(1) 44.333M 68.422M i/s - 40.000M times in 0.902255s 0.584603s
Comparison:
mjit_comp(1)
after --jit: 70417331.4 i/s
before --jit: 44005980.4 i/s - 1.60x slower
mjit_uminus(1)
after --jit: 68422468.8 i/s
before --jit: 44333371.0 i/s - 1.54x slower
```
2020-12-22 22:32:19 -08:00
Marc-Andre Lafortune
daec109f42
[ruby/psych] Optimize cache with compare_by_identity
...
Using `compare_by_identity` gives a 4x performance boost on cache hits.
Benchmark in https://github.com/JuanitoFatas/fast-ruby/issues/189
2020-12-23 01:08:38 -05:00
Marc-Andre Lafortune
c5a445d577
[ruby/psych] Make Ractor-ready.
...
Config is Ractor-local.
Benchmarking reveals that using `Ractor.local_storage` for storing cache
is similar to accessing a constant (~15% slower).
2020-12-23 01:08:38 -05:00
Marc-Andre Lafortune
3ee0ad9190
[ruby/psych] Don't use instance variables directly for config
2020-12-23 01:08:38 -05:00
Marc-Andre Lafortune
d1963adae8
[ruby/psych] Avoid methods depending on bindings
...
Improves Ractor-readiness.
2020-12-23 01:08:38 -05:00
Marc-Andre Lafortune
0eb94dae4a
[ruby/psych] Freeze constants.
...
Improves Ractor-readiness.
2020-12-23 01:08:38 -05:00
Koichi Sasada
0dd4896175
need to clear blocking cnt at fork (child process)
2020-12-23 14:41:44 +09:00
Hiroshi SHIBATA
5cf25c55a6
Update version for Ractor-safe extensions
2020-12-23 14:03:54 +09:00
Hiroshi SHIBATA
61bd28b836
[ruby/date] Workaround for non-ruby repository like ruby/date, flori/json
...
https://github.com/ruby/date/commit/1ff7fa2d80
2020-12-23 13:53:40 +09:00
Nobuyoshi Nakada
8a1e12499b
Ensure non-literal expressions shareable if leteral
2020-12-23 13:50:42 +09:00
Nobuyoshi Nakada
c0a2d95cf3
Update rb_ractor_ensure_shareable
...
* Fixed use of rb_ractor_shareable_p
* Raise Ractor::IsolationError
2020-12-23 13:50:42 +09:00
Nobuyoshi Nakada
b2aa21b868
Split the test
2020-12-23 13:50:42 +09:00
Nobuyoshi Nakada
d1c7db9d00
Added assertions
2020-12-23 13:50:42 +09:00
Nobuyoshi Nakada
0c450b8647
begin ... end
is not a literal
2020-12-23 13:50:42 +09:00
Nobuyoshi Nakada
e70206f570
Added dedicated helper methods
2020-12-23 13:50:42 +09:00
Nobuyoshi Nakada
7a094146e6
Changed shareable literal semantics [Feature #17397 ]
...
When `literal`, check if the literal about to be assigned to a
constant is ractor-shareable, otherwise raise `Ractor::Error` at
runtime instead of `SyntaxError`.
2020-12-23 13:50:42 +09:00
Hiroshi SHIBATA
f14aaa2b12
Guard < Ruby 3.0 for the repositories of default gems.
2020-12-23 13:44:47 +09:00
Koichi Sasada
7e44ade565
ruby_single_main_ractor should be clear before warn
...
rb_warn can produce T_HASA object and it should not use
transient heap.
2020-12-23 13:39:48 +09:00
Marc-Andre Lafortune
02233ed024
Adapt tool/search-cgvars.rb for MacOS
2020-12-22 22:25:41 -05:00
Marc-Andre Lafortune
3df3b47187
Add tool/search-cgvars.rb, thanks @ko1
2020-12-22 22:25:41 -05:00
Kazuhiro NISHIYAMA
082114da05
[DOC] Add doc to sharing_detection= [ci skip]
...
Before:
```
$ ri sharing_detection=
= .sharing_detection=
(from ruby core)
=== Implementation from PP
------------------------------------------------------------------------
sharing_detection=(b)
------------------------------------------------------------------------
Returns the sharing detection flag as a boolean value. It is false by
default.
```
After:
```
$ ri sharing_detection=
= .sharing_detection=
(from ruby core)
=== Implementation from PP
------------------------------------------------------------------------
sharing_detection=(b)
------------------------------------------------------------------------
Sets the sharing detection flag to b.
```
2020-12-23 11:13:50 +09:00
Hiroshi SHIBATA
339227363c
Merge RubyGems 3.2.3 and Bundler 2.2.3
2020-12-23 10:17:41 +09:00
Nobuyoshi Nakada
733ed1e184
ripper: fix bad label parameter handling [Bug #17425 ]
2020-12-23 09:56:35 +09:00
Marc-Andre Lafortune
cd63f0358f
[ruby/etc] Make Ractor safe
2020-12-22 19:46:07 -05:00
Marc-Andre Lafortune
3286380ebc
[ruby/etc] Refactor locks using mutex API
2020-12-22 19:46:07 -05:00
Kenta Murata
9636d14f6f
[memory_view] Acquire VM lock while running exported_object_registry_free
...
exported_object_registry is freed at exit, so this change is just in case.
2020-12-23 09:24:55 +09:00
Kenta Murata
01ab29cc28
[memory_view] Make some rb_memroy_view_t members const
2020-12-23 09:24:55 +09:00
Kenta Murata
db0385d657
[memory_view] Remove needless use of StringValueCStr
2020-12-23 09:24:54 +09:00
Kenta Murata
b3ea828c8e
[memory_view] Add mdview_release_view for test
2020-12-23 09:24:54 +09:00