Age | Commit message (Collapse) | Author |
|
Notes:
Merged: https://github.com/ruby/ruby/pull/4716
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/4695
Merged-By: nobu <[email protected]>
|
|
Point out that the method should be used for backwards compatibility
with code prior to Ruby 3.0 instead of Ruby 2.7. It's still needed
in Ruby 2.7. It isn't needed in Ruby 3.0, as the methods using it
could switch to delegating both positional and keyword arguments.
Add a link to the www.ruby-lang.org web page that goes into detail
describing when and how ruby2_keywords should be used.
|
|
* --braces-after-func-def-line
* --dont-cuddle-else
* --procnames-start-lines
* --space-after-for
* --space-after-if
* --space-after-while
|
|
Notes:
Merged-By: k0kubun <[email protected]>
|
|
Since refinement search is always performed, these entries should always
be public. The method entry that the refinement search returns decides
the visibility.
Fixes [Bug #17822]
Notes:
Merged: https://github.com/ruby/ruby/pull/4515
|
|
To invalidate some callable method entries, we replace the entry in the
class. Most types of method entries are on the method table of the
origin class, but refinement entries without an orig_me are housed in
the method table of the class itself. They are there because refinements
take priority over prepended methods.
By unconditionally inserting a copy of the refinement entry into the
origin class, clearing the method cache created situations where there
are refinement entry duplicates in the lookup chain, leading to infinite
loops and other problems.
Update the replacement logic to use the right class that houses the
method entry. Also, be more selective about cache invalidation when
moving refinement entries for prepend. This avoids calling
clear_method_cache_by_id_in_class() before refinement entries are in the
place it expects.
[Bug #17806]
Notes:
Merged: https://github.com/ruby/ruby/pull/4386
Merged-By: XrXr
|
|
|
|
If a class has been refined but does not have an origin class,
there is a single method entry marked with VM_METHOD_TYPE_REFINED,
but it contains the original method entry. If the original method
entry is present, we shouldn't skip the method when searching even
when skipping refined methods.
Fixes [Bug #17519]
Notes:
Merged: https://github.com/ruby/ruby/pull/4357
|
|
Previously, attempting to change the visibility of a method in a
singleton class for a class/module that is prepended to and refined
would raise a NoMethodError.
Fixes [Bug #17519]
Notes:
Merged: https://github.com/ruby/ruby/pull/4200
|
|
negative cache on a class which does not have subclasses was not
invalidated, but it should be invalidated because other classes
can cache this negative cache.
[Bug #17553]
Notes:
Merged: https://github.com/ruby/ruby/pull/4201
|
|
It returns nil, not self.
Fixes [Bug #17560]
|
|
Chaining aliased methods increases searching cost linearly.
Notes:
Merged: https://github.com/ruby/ruby/pull/4149
|
|
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/4124
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/4124
|
|
rb_funcall* (rb_funcall(), rb_funcallv(), ...) functions invokes
Ruby's method with given receiver. Ruby 2.7 introduced inline method
cache with static memory area. However, Ruby 3.0 reimplemented the
method cache data structures and the inline cache was removed.
Without inline cache, rb_funcall* searched methods everytime.
Most of cases per-Class Method Cache (pCMC) will be helped but
pCMC requires VM-wide locking and it hurts performance on
multi-Ractor execution, especially all Ractors calls methods
with rb_funcall*.
This patch introduced Global Call-Cache Cache Table (gccct) for
rb_funcall*. Call-Cache was introduced from Ruby 3.0 to manage
method cache entry atomically and gccct enables method-caching
without VM-wide locking. This table solves the performance issue
on multi-ractor execution.
[Bug #17497]
Ruby-level method invocation does not use gccct because it has
inline-method-cache and the table size is limited. Basically
rb_funcall* is not used frequently, so 1023 entries can be enough.
We will revisit the table size if it is not enough.
Notes:
Merged: https://github.com/ruby/ruby/pull/4129
|
|
[Bug #17575]
|
|
After setting ruby2_keywords for bmethod, the rest of arguments
had been ignored. [Bug #17558]
Notes:
Merged: https://github.com/ruby/ruby/pull/4096
|
|
|
|
Method cache can be cleared during lazy sweeping. An object that will
be collected during lazy sweep *should not* have it's method cache
cleared. Soon-to-be-collected objects can be in an inconsistent state and
this can lead to a crash. This patch just leaves early if the object is
going to be collected.
Fixes [Bug #17536]
Co-Authored-By: John Hawthorn <[email protected]>
Co-Authored-By: Alan Wu <[email protected]>
Notes:
Merged: https://github.com/ruby/ruby/pull/4077
|
|
negative cache entry should be removed from
vm->negative_cme_table even if the redefined class has no
subclasses.
Notes:
Merged: https://github.com/ruby/ruby/pull/4063
|
|
This reverts commit fac2498e0299f13dffe4f09a7dd7657fb49bf643 for
now, due to [Bug #17509], the breakage in the case `super` is
called in `respond_to?`.
Notes:
Merged: https://github.com/ruby/ruby/pull/4057
|
|
|
|
I'm unsure if this is intentional, but add a document anyway.
[Feature #17314]
|
|
separate some fields from rb_ractor_t to rb_ractor_pub and put it
at the beggining of rb_ractor_t and declare it in vm_core.h so
vm_core.h can access rb_ractor_pub fields.
Now rb_ec_ractor_hooks() is a complete inline function and no
MJIT related issue.
Notes:
Merged: https://github.com/ruby/ruby/pull/3943
|
|
|
|
|
|
|
|
Also document that both :deprecated and :experimental are supported
:category option values.
The locations where warnings were marked as deprecation warnings
was previously reviewed by shyouhei.
Comment a couple locations where deprecation warnings should probably
be used but are not currently used because deprecation warning
enablement has not occurred at the time they are called
(RUBY_FREE_MIN, RUBY_HEAP_MIN_SLOTS, -K).
Add assert_deprecated_warn to test assertions. Use this to simplify
some tests, and fix failing tests after marking some warnings with
deprecated category.
Notes:
Merged: https://github.com/ruby/ruby/pull/3917
|
|
alias_method"
This reverts commit 81739ad4fdfcc86a769056fec352f27c686fba1b.
|
|
This reverts commit e042e8460bb9a63c05f938d51e8c7c5345a6f3a4.
|
|
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/3757
|
|
ccs_not_found to count not found in ccs table.
|
|
rb_method_boundp (method_boundp) searches method_entry, but this
search did not use pCMC, so change to use it.
Notes:
Merged: https://github.com/ruby/ruby/pull/3899
|
|
counts for invalidating negative cache.
Notes:
Merged: https://github.com/ruby/ruby/pull/3892
|
|
pCMC doesn't have negative method cache so this patch implements it.
Notes:
Merged: https://github.com/ruby/ruby/pull/3892
|
|
C extensions can violate the ractor-safety, so only ractor-safe
C extensions (C methods) can run on non-main ractors.
rb_ext_ractor_safe(true) declares that the successive
defined methods are ractor-safe. Otherwiwze, defined methods
checked they are invoked in main ractor and raise an error
if invoked at non-main ractors.
[Feature #17307]
Notes:
Merged: https://github.com/ruby/ruby/pull/3824
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/3777
|
|
This reverts commit ac69849e49982ea83036c04c5d5f7245e3956a49.
The bug seems to have been fixed.
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/3589
|
|
Again, this code is walking the heap. Empty slots can be poisoned, so
we need to unpoison before checking the type
Notes:
Merged: https://github.com/ruby/ruby/pull/3592
|
|
We can not call a non-isolated Proc in multiple ractors.
Notes:
Merged: https://github.com/ruby/ruby/pull/3584
|
|
callable_method_entry() read/write method table structures so that
this function should be synchronized between Ractors.
Notes:
Merged: https://github.com/ruby/ruby/pull/3529
|
|
Before this commit, iclasses were "shady", or not protected by write
barriers. Because of that, the GC needs to spend more time marking these
objects than otherwise.
Applications that make heavy use of modules should see reduction in GC
time as they have a significant number of live iclasses on the heap.
- Put logic for iclass method table ownership into a function
- Remove calls to WB_UNPROTECT and insert write barriers for iclasses
This commit relies on the following invariant: for any non oirigin
iclass `I`, `RCLASS_M_TBL(I) == RCLASS_M_TBL(RBasic(I)->klass)`. This
invariant did not hold prior to 98286e9 for classes and modules that
have prepended modules.
[Feature #16984]
Notes:
Merged: https://github.com/ruby/ruby/pull/3410
|
|
I'm trying to get a better understanding for rare crashes that happen on
ci:
- http://ci.rvm.jp/results/trunk_clang_10@silicon-docker/3101898
- http://ci.rvm.jp/results/trunk-test@ruby-sky1/2777695
Looking at the stack trace it looks like a type confusion possibly
induced by heap corruption. I'm hoping to verify this theory.
|
|
|
|
|
|
Doing so modifies the class's method table, but not in a way that should
be detectable from Ruby, so it may be safe to avoid checking if the
class is frozen.
Fixes [Bug #11669]
Notes:
Merged: https://github.com/ruby/ruby/pull/3175
|