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

62065 Коммитов

Автор SHA1 Сообщение Дата
Sutou Kouhei 9f740acaf9
[ruby/fiddle] Use meaningful variable name
https://github.com/ruby/fiddle/commit/2cac24b7c8
2020-06-27 23:54:08 +09:00
Sutou Kouhei 50fbd00e76
[ruby/fiddle] Use "do { } while (0)" to ensure requiring ";"
https://github.com/ruby/fiddle/commit/2155ae5979
2020-06-27 23:54:08 +09:00
Benoit Daloze 0faf6c8c0e Update to ruby/spec@6c466d4 2020-06-27 16:40:16 +02:00
Nobuyoshi Nakada 25fbc88666
Removed non-ASCII code to suppress warnings by localized compilers 2020-06-27 23:15:13 +09:00
Benoit Daloze b3fa158d1c Update to ruby/spec@b6b7752 2020-06-27 15:51:37 +02:00
Benoit Daloze 64d8c0815e Update to ruby/mspec@6cb1f10 2020-06-27 15:51:35 +02:00
Takashi Kokubun 609ac6ee2c
Revert "Try increasing read timeout of rinda tests"
This reverts commit 5c03e4680e.

I gave up stabilizing Rinda::TupleSpaceProxyTest#test_cancel_02. As the
test uses sleep, it's probably not gonna be stable with --jit-wait.

http://ci.rvm.jp/results/trunk-mjit-wait@silicon-docker/3028276
http://ci.rvm.jp/results/trunk-mjit-wait@silicon-docker/3028065
http://ci.rvm.jp/results/trunk-mjit-wait@silicon-docker/3027857
http://ci.rvm.jp/results/trunk-mjit-wait@silicon-docker/3027441
2020-06-26 22:43:59 -07:00
Kazuki Tsujimoto 600f3990d6
Cosmetic change 2020-06-27 13:53:47 +09:00
Kazuki Tsujimoto 7a5a0dfa5e
Suppress "assigned but unused variable" warnings 2020-06-27 13:52:23 +09:00
Vladimir Dementyev c9ee34a18b Add #deconstruct cache to find pattern 2020-06-27 13:51:03 +09:00
Vladimir Dementyev 5320375732 Optimize array pattern matching by caching #deconstruct value 2020-06-27 13:51:03 +09:00
Vladimir Dementyev 6770d8f1b0 Add pattern matching with arrays benchmark 2020-06-27 13:51:03 +09:00
git d6c9c014e2 * 2020-06-27 [ci skip] 2020-06-27 10:55:39 +09:00
Nobuyoshi Nakada 74c345c7b8 Removed no longer used flags 2020-06-27 10:55:18 +09:00
Nobuyoshi Nakada 61984d4760 Not to rewrite node while compiling
Moved this hack mark to an argument to `compile_hash`.
> Bad Hack: temporarily mark hash node with flag so
> compile_hash can compile call differently.
2020-06-27 10:55:18 +09:00
Takashi Kokubun ad1ebefefe
Avoid duplicated "when"s [ci skip] 2020-06-26 01:40:20 -07:00
Takashi Kokubun a0aacd2efc
Add a NEWS placeholder for disposable cc [ci skip]
asked by ko1 to put this.
2020-06-26 01:36:53 -07:00
Takashi Kokubun 200c5f4075
Add NEWS entries about JIT optimizations
and a related VM improvement.

JIT related commits:

* Code size reduction
  * Deduplicate functions on JIT compaction 818d6d3336
  * Avoid always inlining cold paths of ivar fcd2576290
  * Inline only fast path of rb_class_of b16a2aa938
  * Eliminate a call instruction on deopt 61b14bb32b
* Cold path partitioning
  * Mark method call slow paths as COLDFUNC 0e5a58b6bf
  * Mark vm_stackoverflow as NOINLINE COLDFUNC 9d71373c23
  * Create mjit_exec_slowpath and mark it as NOINLINE COLDFUNC 083a17a82a
* Primitive.attr! 'inline' / Integer#zero? 7561db8c00
  * Kernel#class 946e5cc668
  * (more to come...)
* Properly generate opt_send for cfunc cc 7982dc1dfd
* Optimize exivar access b736ea63bd
* Make JIT-ed leave leaf 151f8be40d
* Inline vm_call_cfunc b9d3ceee8f

VM:

* Enable fastpath on invokesuper 5c27681813
  * History: https://speakerdeck.com/k0kubun/ruby-3-samituto?slide=40 (in Japanese)
2020-06-26 01:33:54 -07:00
Nobuyoshi Nakada 4949df498a
[ruby/fiddle] Fixed typos
https://github.com/ruby/fiddle/commit/a09e66adf4
https://github.com/ruby/fiddle/commit/6cab9b45d6
https://github.com/ruby/fiddle/commit/ab72b19bed
2020-06-26 17:05:27 +09:00
Takashi Kokubun 40b40523dc
Show what's inlined first in "JIT inline" log
and add a debug log
2020-06-25 23:50:19 -07:00
Takashi Kokubun 7982dc1dfd
Decide JIT-ed insn based on cached cfunc
for opt_* insns.

opt_eq handles rb_obj_equal inside opt_eq, and all other cfunc is
handled by opt_send_without_block. Therefore we can't decide which insn
should be generated by checking whether it's cfunc cc or not.

```
$ benchmark-driver -v --rbenv 'before --jit;after --jit' benchmark/mjit_opt_cc_insns.yml --repeat-count=4
before --jit: ruby 2.8.0dev (2020-06-26T05:21:43Z master 9dbc2294a6) +JIT [x86_64-linux]
after --jit: ruby 2.8.0dev (2020-06-26T06:30:18Z master 75cece1b0b) +JIT [x86_64-linux]
last_commit=Decide JIT-ed insn based on cached cfunc
Calculating -------------------------------------
                     before --jit  after --jit
        mjit_nil?(1)      73.878M      74.021M i/s -     40.000M times in 0.541432s 0.540391s
         mjit_not(1)      72.635M      74.601M i/s -     40.000M times in 0.550702s 0.536187s
     mjit_eq(1, nil)       7.331M       7.445M i/s -      8.000M times in 1.091211s 1.074596s
     mjit_eq(nil, 1)      49.450M      64.711M i/s -      8.000M times in 0.161781s 0.123627s

Comparison:
                     mjit_nil?(1)
         after --jit:  74020528.4 i/s
        before --jit:  73878185.9 i/s - 1.00x  slower

                      mjit_not(1)
         after --jit:  74600882.0 i/s
        before --jit:  72634507.6 i/s - 1.03x  slower

                  mjit_eq(1, nil)
         after --jit:   7444657.4 i/s
        before --jit:   7331304.3 i/s - 1.02x  slower

                  mjit_eq(nil, 1)
         after --jit:  64710790.6 i/s
        before --jit:  49449507.4 i/s - 1.31x  slower
```
2020-06-25 23:33:08 -07:00
Takashi Kokubun 9dbc2294a6
Collect insns from a child process
to make sure :opt_invokebuiltin_delegate_leave doesn't become
:(trace_)opt_invokebuiltin_delegate.

This is to prevent a warning like
> /tmp/ruby/v3/src/trunk-test/test/ruby/test_jit.rb:618: warning:
'opt_invokebuiltin_delegate_leave' insn is not included in the script.
Actual insns are: opt_invokebuiltin_delegate leave
2020-06-25 22:21:43 -07:00
Yusuke Endoh a640bcee04 test/ruby/test_settracefunc.rb: Suppress a warning
http://rubyci.s3.amazonaws.com/ubuntu2004/ruby-master/log/20200626T033003Z.log.html.gz
```
/home/chkbuild/chkbuild/tmp/build/20200626T033003Z/ruby/test/ruby/test_settracefunc.rb:2299: warning: ambiguous first argument; put parentheses or a space even after `/' operator
```
2020-06-26 14:15:01 +09:00
Takashi Kokubun 5c03e4680e
Try increasing read timeout of rinda tests
To prevent random failure with --jit-wait like
http://ci.rvm.jp/results/trunk-mjit-wait@silicon-docker/3026615
2020-06-25 22:11:56 -07:00
Koichi Sasada 8070cb56db
fix return event and opt_invokebuiltin_delegate_leave (#3256)
If :return event is specified for a opt_invokebuiltin_delegate_leave
and leave combination, the instructions should be
  opt_invokebuiltin_delegate
  trace_return
instructions. To make it, opt_invokebuiltin_delegate_leave
instruction will be changed to opt_invokebuiltin_delegate even if
it is not an event target instruction.
2020-06-26 10:21:56 +09:00
git 289a28e68f * 2020-06-26 [ci skip] 2020-06-26 00:21:39 +09:00
Richard Schneeman 2d89af45ea Add require to Delegator examples
In Ruby 2.7.1 SimpeDelegator cannot be used without requiring `delegate` this PR adds the require to the first example for each class so that devs don't have to hunt for what require to use.
2020-06-25 11:21:13 -04:00
Nobuyoshi Nakada 6fdd5e26c6
Removed duplicate target
While `spec/bundler` and `spec/bundler/` are treated different
targets by GNU make 4, the same target by GNU make 3.  The latter
target, ending with a slash, was to run `test-bundler-parallel`,
instead of `spec/bundler/%`.
2020-06-25 18:21:41 +09:00
Nobuyoshi Nakada 9a78e24f7d
Removed nonsense `rubygems_version` in input gemspec files
As it is ignored and set at building packages automatically, it is
just nonsense to set in gemspec file for input.
2020-06-25 15:44:56 +09:00
noraj 4eff8a662a
[flori/json] add metadata
https://github.com/flori/json/commit/9f430a7bba
2020-06-25 15:32:41 +09:00
Hiroshi SHIBATA 1b076ca30d
[flori/json] Gem::Specification#date is set automatically by RubyGems.org.
https://github.com/flori/json/commit/1920653013
2020-06-25 15:32:41 +09:00
Hiroshi SHIBATA 4dbb10f29f
[flori/json] keyword argument is provided after Ruby 2.0+
https://github.com/flori/json/commit/78ec5e2bd3
2020-06-25 15:32:40 +09:00
Takashi Kokubun bb4a2351cb
Do not JIT inline builtin methods
It's probably not worth it because there's nothing we can optimize in
such builtin methods. It's worth JIT only when inlined.
2020-06-24 22:59:34 -07:00
Takashi Kokubun ab62aa7037
Run a TracePoint test in an insolated process
to prevent a random failure like
http://ci.rvm.jp/results/trunk-random2@phosphorus-docker/3024287
2020-06-24 22:43:14 -07:00
Burdette Lamar 5e860ed4c1
[ci skip] Enhanced RDoc for Array (#3252)
Methods:

    map/collect
    map!/collect!
    values_at
    select/filter
    select!/filter!
2020-06-24 13:31:42 -05:00
Nobuyoshi Nakada 3d8705dcfd
Drop token info for endless method definition
Because it does not have closing `end`.
2020-06-25 01:14:26 +09:00
Nobuyoshi Nakada 419b0596a2
[ripper] added endless method definition event tests 2020-06-25 01:14:18 +09:00
git 5dfe95d10e * 2020-06-25 [ci skip] 2020-06-25 00:20:44 +09:00
Nobuyoshi Nakada fe82f72951
AST.of needs SCRIPT_LINES__ filled with a newline 2020-06-25 00:14:31 +09:00
Nobuyoshi Nakada 263b941321
[ripper] fix mismatched indentations warning [Bug #16981]
The scanner location has to be set from `lex.ptok` before it is
flushed by dispatching the scanner event.
2020-06-24 19:53:14 +09:00
Nobuyoshi Nakada 7f29e34f35
[ripper] fail unless got warning as expected 2020-06-24 19:52:39 +09:00
Takashi Kokubun 50c63ab38d
Fix a random test failure by TracePoint
A test worker process may already be enabling TracePoint, which results
in changing the insn name in this test.

http://ci.rvm.jp/results/trunk-random0@phosphorus-docker/3022750
2020-06-24 00:29:53 -07:00
Takashi Kokubun 737da8d383
Add another missing cast 2020-06-23 23:57:26 -07:00
Takashi Kokubun e0037997d9
Include workflow name in a notification of Compilations 2020-06-23 23:56:02 -07:00
Takashi Kokubun 6ecef1199e
Add missing cast 2020-06-23 23:50:31 -07:00
Takashi Kokubun 946e5cc668
Annotate Kernel#class as inline (#3250)
```
$ benchmark-driver -v --rbenv 'before;after;before --jit;after --jit' benchmark/mjit_class.yml --repeat-count=4
before: ruby 2.8.0dev (2020-06-23T07:09:54Z master 37a2e48d76) [x86_64-linux]
after: ruby 2.8.0dev (2020-06-23T17:29:56Z inline-class 0ff147c007) [x86_64-linux]
before --jit: ruby 2.8.0dev (2020-06-23T07:09:54Z master 37a2e48d76) +JIT [x86_64-linux]
after --jit: ruby 2.8.0dev (2020-06-23T17:29:56Z inline-class 0ff147c007) +JIT [x86_64-linux]
Calculating -------------------------------------
                         before       after  before --jit  after --jit
    mjit_class(self)    39.219M     40.060M       53.502M      69.202M i/s -     40.000M times in 1.019915s 0.998495s 0.747631s 0.578021s
       mjit_class(1)    39.567M     41.242M       52.100M      68.895M i/s -     40.000M times in 1.010935s 0.969885s 0.767749s 0.580591s

Comparison:
                 mjit_class(self)
         after --jit:  69201690.7 i/s
        before --jit:  53502336.4 i/s - 1.29x  slower
               after:  40060289.1 i/s - 1.73x  slower
              before:  39218939.2 i/s - 1.76x  slower

                    mjit_class(1)
         after --jit:  68895358.6 i/s
        before --jit:  52100353.0 i/s - 1.32x  slower
               after:  41241993.6 i/s - 1.67x  slower
              before:  39567314.0 i/s - 1.74x  slower
```
2020-06-23 23:49:03 -07:00
Takashi Kokubun 3e02cd518f
Trace :return of builtin methods
using opt_invokebuiltin_delegate_leave insn.

Since Ruby 2.7, :return of methods using builtin have not been traced properly.
2020-06-23 23:42:38 -07:00
git fbb32b1f48 * 2020-06-24 [ci skip] 2020-06-24 15:18:18 +09:00
Masataka Pocke Kuwabara b71047cca3 Fix RubyVM::AbstractSyntaxTree document
RubyVM::AbstractSyntaxTree is a module actually, but the document says "class".
2020-06-24 15:17:53 +09:00
Burdette Lamar dc351ff984
[ci skip] Enhanced RDoc for Array (#3237)
Methods:

    #rotate!
    #rotate
    #sort!
    #sort
    #bsearch
    #bsearch_index
2020-06-23 08:58:26 -05:00