ruby--ruby/tool/ruby_vm
k0kubun e72a86fc93 _mjit_compile_send.erb: inline attr_reader call
_mjit_compile_send_guard.erb: carve out the shared logic to invalidate
inlined method call

common.mk: update dependency for this change

test_jit.rb: add test for attr_reader optimization

* Benchmark

```
require 'benchmark_driver'

Benchmark.driver do |x|
  x.prelude %{
    class C
      attr_reader :a
      def initialize
        @a = 1
      end
    end

    o = C.new

    def l o
      i = 0
      while i < 1000000
        o.a
        i += 1
      end
    end
  }
  x.report 'aread', %{ l o }
  x.loop_count 1000

  x.rbenv 'before', 'before,--jit', 'after,--jit'
  x.verbose
end
```

```
before: ruby 2.6.0dev (2018-04-20 trunk 63211) [x86_64-linux]
before,--jit: ruby 2.6.0dev (2018-04-20 trunk 63211) +JIT [x86_64-linux]
after,--jit: ruby 2.6.0dev (2018-04-20 trunk 63211) +JIT [x86_64-linux]
last_commit=_mjit_compile_send.erb: inline attr_reader call
Calculating -------------------------------------
                         before  before,--jit  after,--jit
               aread     54.597       122.894      218.574 i/s -      1.000k times in 18.316102s 8.137089s 4.575106s

Comparison:
                            aread
         after,--jit:       218.6 i/s
        before,--jit:       122.9 i/s - 1.78x  slower
              before:        54.6 i/s - 4.00x  slower

```

* Optcarrot

A little made faster?

fps: 71.35 -> 72.11

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63212 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-04-20 13:42:08 +00:00
..
controllers dumper.rb: stop getting --destdir option value 2018-01-27 01:59:08 +00:00
helpers Refactor ERB version checking for keyword arguments 2018-02-27 11:12:23 +00:00
loaders tool/ruby_vm support for pre-2.0 BASERUBY 2018-01-12 08:38:12 +00:00
models Reverting r62775, this should fix i686 builds 2018-03-19 18:21:54 +00:00
scripts tool/ruby_vm/scripts/insns2vm.rb: fix typo in r62064 2018-04-06 20:50:28 +00:00
tests new insns.def format (2nd try) 2018-01-12 08:38:07 +00:00
views _mjit_compile_send.erb: inline attr_reader call 2018-04-20 13:42:08 +00:00