Age | Commit message (Collapse) | Author |
|
|
|
|
|
|
|
receiver
Previously, attr* methods could be private even if not in the
private section of a class/module block.
This uses the same approach that ruby started using for define_method
in 1fc33199736f316dd71d0c551edbf514528ddde6.
Fixes [Bug #4537]
|
|
__unused__ is unavailable on Sun C.
https://rubyci.org/logs/rubyci.s3.amazonaws.com/solaris11s-sunc/ruby-master/log/20190801T112505Z.fail.html.gz
|
|
Some VM frames (dummy and top pushed by `rb_vm_call_cfunc`) has
iseq but has no pc.
|
|
|
|
because the test seems to hang there forever:
https://travis-ci.org/ruby/ruby/jobs/566409880
|
|
|
|
|
|
|
|
It seems the compiler does not support VLAs.
See also: https://ci.appveyor.com/project/ruby/ruby/builds/26392589/job/px6nuiuw4e78weg1
|
|
Hash hint for ar_array is 1 byte (unsigned char). This patch introduce
ar_hint_t which represents hint type.
|
|
|
|
This function has a lot of assumptions. Should make them sure.
|
|
PC modification in gc_event_hook_body was careless. There are (so
to say) abnormal iseqs stored in the cfp. We have to check sanity
before we touch the PC.
This has not been fixed because there was no way to (ab)use the
setup from pure-Ruby. However by using our official C APIs it is
possible to touch such frame(s), resulting in SEGV.
Fixes [Bug #14834].
|
|
|
|
gcc 9.1.0 warns this.
```
signal.c:258:46: warning: '%.*s' directive argument is not a nul-terminated string [-Wformat-overflow=]
258 | rb_raise(rb_eArgError, "unsupported signal `%.*s%"PRIsVALUE"'",
| ^~~~
259 | prefix, signame_prefix, vsig);
| ~~~~~~~~~~~~~~
signal.c:200:19: note: referenced argument declared here
200 | static const char signame_prefix[3] = "SIG";
| ^~~~~~~~~~~~~~
```
https://rubyci.org/logs/rubyci.s3.amazonaws.com/ubuntu/ruby-master/log/20190801T033009Z.log.html.gz
|
|
"hash_iter_lev" can be exported by Marshal.dump and it will
introduce inconsistency. To avoid this issue, use internal_id
instead of normal ID. This issue is pointed out by Chikanaga-san.
|
|
|
|
Co-Authored-By: Takashi Kokubun <takashikkbn@gmail.com>
|
|
|
|
This commit adds a specialized instruction for called to `.nil?`. It is
about 27% faster than master in the case where the object is nil or not
nil. In the case where an object implements `nil?`, I think it may be
slightly slower. Here is a benchmark:
```ruby
require "benchmark/ips"
class Niller
def nil?; true; end
end
not_nil = Object.new
xnil = nil
niller = Niller.new
Benchmark.ips do |x|
x.report("nil?") { xnil.nil? }
x.report("not nil") { not_nil.nil? }
x.report("niller") { niller.nil? }
end
```
On Ruby master:
```
[aaron@TC ~/g/ruby (master)]$ ./ruby compil.rb
Warming up --------------------------------------
nil? 429.195k i/100ms
not nil 437.889k i/100ms
niller 437.935k i/100ms
Calculating -------------------------------------
nil? 20.166M (± 8.1%) i/s - 100.002M in 5.002794s
not nil 20.046M (± 7.6%) i/s - 99.839M in 5.020086s
niller 22.467M (± 6.1%) i/s - 112.111M in 5.013817s
[aaron@TC ~/g/ruby (master)]$ ./ruby compil.rb
Warming up --------------------------------------
nil? 449.660k i/100ms
not nil 433.836k i/100ms
niller 443.073k i/100ms
Calculating -------------------------------------
nil? 19.997M (± 8.8%) i/s - 99.375M in 5.020458s
not nil 20.529M (± 7.0%) i/s - 102.385M in 5.020689s
niller 21.796M (± 8.0%) i/s - 108.110M in 5.002300s
[aaron@TC ~/g/ruby (master)]$ ./ruby compil.rb
Warming up --------------------------------------
nil? 402.119k i/100ms
not nil 438.968k i/100ms
niller 398.226k i/100ms
Calculating -------------------------------------
nil? 20.050M (±12.2%) i/s - 98.519M in 5.008817s
not nil 20.614M (± 8.0%) i/s - 102.280M in 5.004531s
niller 22.223M (± 8.8%) i/s - 110.309M in 5.013106s
```
On this branch:
```
[aaron@TC ~/g/ruby (specialized-nilp)]$ ./ruby compil.rb
Warming up --------------------------------------
nil? 468.371k i/100ms
not nil 456.517k i/100ms
niller 454.981k i/100ms
Calculating -------------------------------------
nil? 27.849M (± 7.8%) i/s - 138.169M in 5.001730s
not nil 26.417M (± 8.7%) i/s - 131.020M in 5.011674s
niller 21.561M (± 7.5%) i/s - 107.376M in 5.018113s
[aaron@TC ~/g/ruby (specialized-nilp)]$ ./ruby compil.rb
Warming up --------------------------------------
nil? 477.259k i/100ms
not nil 428.712k i/100ms
niller 446.109k i/100ms
Calculating -------------------------------------
nil? 28.071M (± 7.3%) i/s - 139.837M in 5.016590s
not nil 25.789M (±12.9%) i/s - 126.470M in 5.011144s
niller 20.002M (±12.2%) i/s - 98.144M in 5.001737s
[aaron@TC ~/g/ruby (specialized-nilp)]$ ./ruby compil.rb
Warming up --------------------------------------
nil? 467.676k i/100ms
not nil 445.791k i/100ms
niller 415.024k i/100ms
Calculating -------------------------------------
nil? 26.907M (± 8.0%) i/s - 133.755M in 5.013915s
not nil 25.319M (± 7.9%) i/s - 125.713M in 5.007758s
niller 19.569M (±11.8%) i/s - 96.286M in 5.008533s
```
Co-Authored-By: Ashe Connor <kivikakk@github.com>
|
|
|
|
|
|
|
|
|
|
|
|
This reverts commit e352445863588b90f7af6cdf6c1b6dc432ee33ab.
This is breaking CI and I'm not sure why yet, so I'll revert for now.
|
|
|
|
This commit allows the previos EP pointer to move, then updates its
location
|
|
|
|
to suppress a warning
|
|
Because it causes circular require.
|
|
|
|
|
|
Sometimes `Leaked thread: Rinda::TestRingServer#test_ring_server_ipv6_multicast` happens
because `Rinda::TupleSpace#start_keeper` runs after stopping `@keeper`.
|
|
If object was modified, but there is a case that
hash values (#hash) are same between before modified
and after modified objects.
|
|
This recursive iteration test can cause SystemStackError so
check it correctly.
|
|
Surprisingly, on SystemStackError#backtrace can return nil.
|
|
This reverts commit e83ec207cd5fda973c41d6629d8504b515522b12.
|
|
```
warning: Float 0xf.fp10000000000000... out of range
```
|
|
|
|
to suppress the leak checker.
|
|
|
|
|
|
13e84d5c0a changes enum to macro, but the flags usage information
are lost in internal.h. It should be same place with other flags
information.
|
|
|
|
Get rid of "ISO C restricts enumerator values to range of 'int'"
error.
|
|
|