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

52017 Коммитов

Автор SHA1 Сообщение Дата
nobu 9580586b63 Use opt_{aref,aset} over opt_{aref,aset}_with
* compile.c (iseq_compile_each0): Use `opt_aref`/`opt_aset` over
  `opt_aref_with`/`opt_aset_with` when frozen_string_literal: true,
  not to resurrect the index string on non-Hash receiver.

[Fix GH-1957]

From: chopraanmol1 <chopraanmol1@gmail.com>

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64745 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-09-15 02:20:47 +00:00
svn fa457e65fe * properties.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64744 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-09-14 13:19:46 +00:00
hsbt f021df0099 Partly reverted for ruby-style.el.
Revert "Removed old elisp files. New upstream repository was moved https://github.com/ruby/elisp."

  This reverts commit 7eedd308b8.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64743 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-09-14 13:19:45 +00:00
hsbt 23e8fc3918 Added entries for lldb files in misc directory.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64742 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-09-14 12:37:51 +00:00
hsbt 7eedd308b8 Removed old elisp files. New upstream repository was moved https://github.com/ruby/elisp.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64741 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-09-14 12:34:50 +00:00
shyouhei 5c16b21f44 PRI_64_PREFIX "u" is called PRIu64
See also ISO9899:1999 section 7.8.1 paragraph 3.

The #ifndef is for C compilers older than C99.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64740 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-09-14 08:27:44 +00:00
shyouhei 08af3f1b39 forgot to expand tabs [ci skip]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64739 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-09-14 07:57:19 +00:00
svn b80ea712e0 * 2018-09-14
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64738 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-09-14 07:44:45 +00:00
shyouhei 9c6bd0d840 move ADD_PC around (take 2)
Now that we can say for sure if an instruction calls a method or
not internally, it is now possible to reroute the bugs that
forced us to revert the "move PC around" optimization.

First try: r62051
Reverted:  r63763
See also:  r63999

----

trunk: ruby 2.6.0dev (2018-09-13 trunk 64736) [x86_64-darwin15]
ours: ruby 2.6.0dev (2018-09-13 trunk 64736) [x86_64-darwin15]
last_commit=move ADD_PC around (take 2)
Calculating -------------------------------------
                           trunk        ours
         so_ackermann      1.884       2.278 i/s -       1.000 times in 0.530926s 0.438935s
             so_array      1.178       1.157 i/s -       1.000 times in 0.848786s 0.864467s
      so_binary_trees      0.176       0.177 i/s -       1.000 times in 5.683895s 5.657707s
       so_concatenate      0.220       0.221 i/s -       1.000 times in 4.546896s 4.518949s
       so_count_words      6.729       6.470 i/s -       1.000 times in 0.148602s 0.154561s
         so_exception      3.324       3.688 i/s -       1.000 times in 0.300872s 0.271147s
          so_fannkuch      0.546       0.968 i/s -       1.000 times in 1.831328s 1.033376s
             so_fasta      0.541       0.547 i/s -       1.000 times in 1.849923s 1.827091s
      so_k_nucleotide      0.800       0.777 i/s -       1.000 times in 1.250635s 1.286295s
             so_lists      2.101       1.848 i/s -       1.000 times in 0.475954s 0.541095s
        so_mandelbrot      0.435       0.408 i/s -       1.000 times in 2.299328s 2.450535s
            so_matrix      1.946       1.912 i/s -       1.000 times in 0.513872s 0.523076s
    so_meteor_contest      0.311       0.317 i/s -       1.000 times in 3.219297s 3.152052s
             so_nbody      0.746       0.703 i/s -       1.000 times in 1.339815s 1.423441s
       so_nested_loop      0.899       0.901 i/s -       1.000 times in 1.111767s 1.109555s
            so_nsieve      0.559       0.579 i/s -       1.000 times in 1.787763s 1.726552s
       so_nsieve_bits      0.435       0.428 i/s -       1.000 times in 2.296282s 2.333852s
            so_object      1.368       1.442 i/s -       1.000 times in 0.731237s 0.693684s
      so_partial_sums      0.616       0.546 i/s -       1.000 times in 1.623592s 1.833097s
          so_pidigits      0.831       0.832 i/s -       1.000 times in 1.203117s 1.202334s
            so_random      2.934       2.724 i/s -       1.000 times in 0.340791s 0.367150s
so_reverse_complement      0.583       0.866 i/s -       1.000 times in 1.714144s 1.154615s
             so_sieve      1.829       2.081 i/s -       1.000 times in 0.546607s 0.480562s
      so_spectralnorm      0.524       0.558 i/s -       1.000 times in 1.908716s 1.792382s



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64737 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-09-14 07:44:44 +00:00
k0kubun 402001d6c7 iseq.c: prefix rb_ to non-static iseq functions
I assume we always prefix rb_ to non-static functions to avoid conflict.
These functions are not exported and safe to be renamed.

iseq.h: ditto
compile.c: ditto

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64736 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-09-13 13:59:25 +00:00
k0kubun 519c62fdc2 vm_insnhelper.h: drop OPT_CALL_FASTPATH macro support
because cc->call is NULL by default and it is not overridden by
vm_search_super_method if OPT_CALL_FASTPATH is 0. So this macro is not
just a switch for optimization but now it's mandatory.

vm_insnhelper.c: cosmetic change. Use boolean-ish `TRUE` instead of 1 to
specify `enabled` flag.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64735 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-09-13 12:29:57 +00:00
kazu f03e68edb8 Remove old ruby-mode.el
Use emacs bundled ruby-mode.el instead.
[Feature #6823] [ci skip]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64734 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-09-13 12:06:18 +00:00
nobu 384fda18b8 warn unused blocks with Enumerable#all? any? one? none?
[Fix GH-1953]

From: Koji Onishi <fursich0@gmail.com>

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64733 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-09-13 11:10:24 +00:00
nobu cff6bdfcba Make qsort_r() flavor detecting work if qsort_r() is a macro
On FreeBSD we're going to switch to the GNU-ish version of qsort_r().
POSIX is also considering standardizing that one. To prevent faulty
calls, we have a macro in place to throw a compiler error if a BSD-style
qsort_r() call is performed on a patched system. Such an approach tends
to be permitted by POSIX.

The configure check we have in Ruby would fail if qsort_r() is a
function macro. Add parentheses around it to prevent macro expansion and
force the declaration of a prototype.

[Fix GH-1954]

From: Ed Schouten <ed@nuxi.nl>

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64732 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-09-13 11:00:55 +00:00
nobu 38122275f3 thread.c: fix -Wformat warning where uint64_t is not unsigned long
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64731 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-09-13 10:59:12 +00:00
k0kubun 26a11ae771 Revert "vm_insnhelper.h: simplify EXEC_EC_CFP implementation"
This reverts commit r64711, because EXEC_EC_CFP on JIT-ed code does not
call jit_func with the patch when catch_except_p is true. It wasn't intentional.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64730 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-09-13 07:12:07 +00:00
k0kubun 8bc5c172f9 thread.c: fix -Wformat warning
../thread.c:1219:18: warning: format specifies type 'unsigned long' but the argument has type 'rb_hrtime_t'
      (aka 'unsigned long long') [-Wformat]
                 end, now);
                 ^~~
../thread.c:1219:23: warning: format specifies type 'unsigned long' but the argument has type 'rb_hrtime_t'
      (aka 'unsigned long long') [-Wformat]
                 end, now);
                      ^~~

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64712 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-09-13 06:49:49 +00:00
k0kubun bada0d24eb vm_insnhelper.h: simplify EXEC_EC_CFP implementation
and possibly memory access for iseq->body may be reduced.

No significant impact for performance on Optcarrot.

* before
fps: 55.03865935187656
fps: 57.16854675983188
fps: 57.672458407661765
fps: 58.28989837869383
fps: 58.80503815099268
fps: 59.068054176528534
fps: 59.55736806358244
fps: 61.01018920533034
fps: 63.34167049232186
fps: 65.20575018321766
fps: 65.46758316561318

* after
fps: 55.21860411005677
fps: 55.34840351179166
fps: 58.23666596747484
fps: 59.71987124578901
fps: 61.131485120234935
fps: 61.279905164649485
fps: 61.66060774175459
fps: 64.11215576508765
fps: 64.63699742853154
fps: 65.28260058920769
fps: 65.85447796482678

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64711 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-09-13 06:39:40 +00:00
nobu 14ad11a963 node.h: removed unused macros
* node.h (enum node_type): removed unused macros which redefine the
  same name enum values, and probably had ended the historical role.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64710 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-09-13 04:53:52 +00:00
shyouhei 6925c9c6f5 move canary-related statements into macros
This is mostly cosmetic.  Should generate a slightly readable
vm.inc output.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64709 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-09-13 03:46:46 +00:00
k0kubun 63130b2348 appveyor.yml: increase timeout for vs
vs140 tends to die with 10s timeout on TestThreadQueue#test_queue_with_trap
https://ci.appveyor.com/project/ruby/ruby/build/9610/job/di9durc5rv0dwhor
https://ci.appveyor.com/project/ruby/ruby/build/9598/job/t7wugyn1sm57lbw3

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64708 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-09-13 01:45:38 +00:00
normal 8a7b4b397f thread.c (rb_thread_atfork): reinitialize current th->interrupt_lock
Another thread may be holding th->interrupt_lock while our
current thread calls fork.  Therefore we must reinitialize our
own th->interrupt_lock in the child process because the owner
of the lock is only in the parent.  The original parent process
is unaffected.  We cannot destroy the lock while it has an unknown
state, either, so some implementations can leak a small amount
of memory, here (NPTL won't).

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64707 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-09-13 01:43:03 +00:00
normal 12409ad28c fiber: fix crash on GC after forking
Remove the remainder of ROOT_FIBER_CONTEXT use and unnecessary
differences between the root and non-root fiber.  This makes
it easier to follow new root fiber at fork time.

Multiple sources of truth often leads to bugs, as in this case.
We can determinte root fiber by checking a fiber against the root_fiber
of its owner thread.  The new `fiber_is_root_p' function
supports that.

Now, we can care only about free-ing/recycling/munmap-ing stacks
as appropriate.

[Bug #15050]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64706 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-09-12 20:49:24 +00:00
normal d40694de72 cont.c (fiber_memsize): do not rely on ROOT_FIBER_CONTEXT
We can check if the fiber we're interested in is the
th->root_fiber for the owner thread, so there is no need to use
ROOT_FIBER_CONTEXT.

Note: there is no guarantee th->ec points to
&th->root_fiber->cont.saved_ec, thus vm::thread_memsize may not
account for root fiber correctly (pre-existing bug).

[Bug #15050]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64705 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-09-12 20:49:19 +00:00
normal 7ae24709a6 cont.c (ec_set_vm_stack): avoid needless casting
Am I missing something, here?  Casting was totally unnecessary
and ugly...

[ruby-core:88929]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64704 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-09-12 20:49:14 +00:00
normal c99b9eb039 share VM stack between threads and fibers if identical in size
ec->vm_stack is always allocated with malloc, so stack cache for
root fiber (thread stack) and non-root fibers can be shared as
long as the size is the same.  The purpose of this change is to
reduce dependencies on ROOT_FIBER_CONTEXT.

[Feature #15095] [Bug #15050]

v2: vm.c: fix build with USE_THREAD_DATA_RECYCLE==0

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64703 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-09-12 20:49:10 +00:00
svn 2bd4c51455 * 2018-09-13
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64702 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-09-12 16:05:08 +00:00
kazu c0f62450bb [DOC] aseq.each always return self [ci skip]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64701 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-09-12 16:05:07 +00:00
nobu 351b8a322e time.c split time_utc_or_local
* time.c (time_utc_or_local): split into time_s_mkutc and
  time_s_mktime without utc flag.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64700 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-09-12 14:37:51 +00:00
k0kubun f7b0a791ca _mjit_compile_pc_and_sp.erb: forget about memcpy [ci skip]
because using memcpy here actually made performance worse.
In Optcarrot,

* for loop
fps: 55.90428960597268
fps: 57.21690379342434
fps: 58.41751168279789
fps: 58.7317470613203
fps: 62.81371000202459
fps: 63.02541045417479
fps: 63.77324026366317
fps: 65.48067818347447
fps: 66.02324323831398
fps: 66.3816048847424
fps: 66.54526488660156

* memcpy
fps: 54.98389812126847
fps: 57.96524857391357
fps: 57.974918725327946
fps: 58.285987089087364
fps: 58.639003211333225
fps: 59.03244214601948
fps: 59.89964772199603
fps: 60.809490242786175
fps: 62.462070790624146
fps: 62.534599002918306
fps: 63.787312566163756

That's probably because the copied size is very small.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64699 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-09-12 13:32:11 +00:00
nobu db4c91be27 .travis.yml: run ruby/spec version guards check in parallel
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64698 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-09-12 12:14:45 +00:00
mrkn 98fa0ab4d9 [DOC] Modify descriptions for ArithmeticSequence
[ci-skip]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64697 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-09-12 08:51:34 +00:00
mrkn 1595421ce0 [DOC] Add the documentation of ArithmeticSequence
[ci-skip]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64696 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-09-12 08:36:48 +00:00
mrkn 11ff6569ea enumerator.c: Fix ArithmeticSequence for complex step
Make sure Enumerator::ArithmeticSequence#each to work well
for a complex step value.

This reverts commit ca47fb329a.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64695 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-09-12 07:35:42 +00:00
nobu f677ba8871 deduce versioned tools from CC
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64694 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-09-12 07:01:59 +00:00
mrkn ca47fb329a Revert "enumerator.c: Fix ArithmeticSequence for complex step"
This reverts commit 0a0f8238d0.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64693 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-09-12 05:52:27 +00:00
mrkn 0a0f8238d0 enumerator.c: Fix ArithmeticSequence for complex step
Make sure Enumerator::ArithmeticSequence#each to work well
for a complex step value.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64692 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-09-12 05:35:46 +00:00
shyouhei 0f6708eb9b resurrect the string to expect modifications
String#freeze can be redefined to be destructive.  While such
redefinition is definitely weird, it should be possible.  Resurrect
the string to prepare for that sort of things.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64691 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-09-12 04:04:31 +00:00
shyouhei 02b52b2733 make opt_str_freeze leaf
Simply use DISPATCH_ORIGINAL_INSN instead of rb_funcall.  This is,
when possible, overall performant because method dispatch results are
cached inside of CALL_CACHE.  Should also be good for JIT.

----

trunk: ruby 2.6.0dev (2018-09-12 trunk 64689) [x86_64-darwin15]
ours: ruby 2.6.0dev (2018-09-12 leaf-insn 64688) [x86_64-darwin15]
last_commit=make opt_str_freeze leaf
Calculating -------------------------------------
                          trunk        ours
    vm2_freezestring     5.440M     31.411M i/s -      6.000M times in 1.102968s 0.191017s

Comparison:
                 vm2_freezestring
                ours:  31410864.5 i/s
               trunk:   5439865.4 i/s - 5.77x  slower



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64690 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-09-12 03:39:36 +00:00
shyouhei 33c8171c65 make opt_case_dispatch leaf
This instruction can be written without rb_funcall. It not only boosts
performance of case statements, but also makes room of future JIT
improvements.  Because opt_case_dispatch is about optimization this
should not be a bad thing to have.

----

trunk: ruby 2.6.0dev (2018-09-05 trunk 64634) [x86_64-darwin15]
ours: ruby 2.6.0dev (2018-09-12 leaf-insn 64688) [x86_64-darwin15]
last_commit=make opt_case_dispatch leaf
Calculating -------------------------------------
                          trunk        ours
        vm2_case_lit      1.366       2.012 i/s -       1.000 times in 0.731839s 0.497008s

Comparison:
                     vm2_case_lit
                ours:         2.0 i/s
               trunk:         1.4 i/s - 1.47x  slower



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64689 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-09-12 01:55:00 +00:00
svn bddc28b2ae * 2018-09-12
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64688 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-09-11 15:14:57 +00:00
k0kubun 0325145f4c _mjit_compile_insn.erb: move pc on JIT cancel
if and only if it's not moved yet, to avoid potential bugs in the future.

_mjit_compile_send.erb: ditto

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64687 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-09-11 15:14:56 +00:00
k0kubun 9f6e9b40d3 mjit_worker.c: atomically print main message and \n
To attempt to fix CI failure on rubyci freebsd:
https://rubyci.org/logs/rubyci.s3.amazonaws.com/freebsd11zfs/ruby-trunk/log/20180911T123001Z.fail.html.gz

```
JIT success (68.7ms): mjit9@(eval):1 -> /usr/home/hsbt/chkbuild/tmp/build/20180911T123001Z/tmp/jit_test_unload_units_20180911-96427-13cagj9/_ruby_mjit_p99188u9.c
JIT compaction (25.1ms): Compacted 10 methods -> /usr/home/hsbt/chkbuild/tmp/build/20180911T123001Z/tmp/jit_test_unload_units_20180911-96427-13cagj9/_ruby_mjit_p99188u10.soToo many JIT code -- 1 units unloaded

JIT success (68.2ms): mjit10@(eval):1 -> /usr/home/hsbt/chkbuild/tmp/build/20180911T123001Z/tmp/jit_test_unload_units_20180911-96427-13cagj9/_ruby_mjit_p99188u11.c
```

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64686 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-09-11 14:38:05 +00:00
k0kubun 6e3fe890d5 bare_instructions.rb: use Hash#fetch to read attr
to raise descriptive KeyError instead of NoMethodError in case these
attrs are accidentally removed.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64685 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-09-11 14:10:00 +00:00
k0kubun 10ff0a2bbe _mjit_compile_insn.erb: prefer insn.always_leaf?
rather than `trace_enablable_insns` which is hard to maintain.

This would make performance bad because new branches for tracepoint will
be added.

Optcarrot before:
fps: 56.885371547337655
fps: 60.02493636060194
fps: 63.051028327122076
fps: 63.78463316242535
fps: 64.20391937940403
fps: 64.55990344731123
fps: 64.56771099162921
fps: 64.95991277629723
fps: 65.15120708973232
fps: 65.90558702393933
fps: 66.29579283026303

Optcarrot after:
fps: 52.7647027470875
fps: 53.67404855529564
fps: 58.40514319229468
fps: 60.90736996487708
fps: 62.83487236283472
fps: 63.01386139447994
fps: 63.42395443471596
fps: 63.78328559878602
fps: 64.58432081229746
fps: 64.78720429848532
fps: 65.48720618907552

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64684 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-09-11 13:48:00 +00:00
k0kubun 67bd8fb36b _mjit_compile_pc_and_sp.erb: skip moving pc
when catch_except_p is false and insn.always_leaf? is true (never makes
arbitrary method call in the insn).

On Optcarrot, unfortunately this didn't have measureable performance impact.
But still this is a good direction since it becomes much faster when
marking all insns as always leaf.

bare_instructions.rb: add `#always_leaf?` that indicates the insn can
always be considered as leaf. Using dynamic leaf for JIT would be hard
since it requires to discard outdated code somehow.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64683 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-09-11 12:53:52 +00:00
k0kubun 24e30ef76e transform_mjit_header.rb: add static to Init_*
as well, to make CI succeed with VM_CHECK_MODE > 1.

vm_insnhelper.c: drop unnecessary MJIT_HEADER ifdef. This is intended to
be ignored by having `static inline`. Removing that by macro would be
helpful for minimizing compilation time, but the impact is not so big
and having many MJIT_HEADER check would be bad for maintainability.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64682 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-09-11 11:26:15 +00:00
k0kubun 0f3bd3e6a8 test_jit.rb: show extra debug info for #test_unload_units
failure

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64681 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-09-11 11:09:59 +00:00
nobu 6f7fafbf00 random.c: prefixed fill_random_bytes
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64680 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-09-11 11:05:20 +00:00
k0kubun db40f67849 vm_insnhelper.c: stop unnecessarily using rb_sprintf
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64679 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-09-11 11:01:18 +00:00