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

1156 Коммитов

Автор SHA1 Сообщение Дата
k0kubun e23aefe288 transform_mjit_header.rb: restrict transformation
to whitelisted patterns. This fix is for NetBSD.

[Bug #14439]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62235 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-02-05 15:39:55 +00:00
nobu da79033a30 transform_mjit_header.rb: same command after error
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62232 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-02-05 13:58:48 +00:00
k0kubun 349e7fcb66 tool/downloader.rb: retry SocketError
I would like to stabilize RubyCI.

https://rubyci.org/logs/rubyci.s3.amazonaws.com/fedora26/ruby-trunk/log/20180205T123003Z.fail.html.gz

downloading did_you_mean-1.2.0.gem ... /home/hsbt/chkbuild/tmp/build/20180205T123003Z/tmp/ruby-snapshot20180205-23226-3201ha/ruby-2.6.0-r62226/tool/downloader.rb:212:in `rescue in download': failed to download did_you_mean-1.2.0.gem (RuntimeError)
SocketError: Failed to open TCP connection to rubygems.org:443 (getaddrinfo: Name or service not known): https://rubygems.org/downloads/did_you_mean-1.2.0.gem
	from /home/hsbt/chkbuild/tmp/build/20180205T123003Z/tmp/ruby-snapshot20180205-23226-3201ha/ruby-2.6.0-r62226/tool/downloader.rb:123:in `download'
	from /home/hsbt/chkbuild/tmp/build/20180205T123003Z/tmp/ruby-snapshot20180205-23226-3201ha/ruby-2.6.0-r62226/tool/downloader.rb:66:in `download'
	from -e:4:in `<main>'
make[1]: *** [Makefile:1685: update-gems] Error 1

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62231 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-02-05 13:24:00 +00:00
kazu 1ddaa1ce09 Fix undefined behavior
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62229 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-02-05 12:34:37 +00:00
kazu 5a68bd7f00 Fix a typo [ci skip]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62228 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-02-05 12:34:35 +00:00
k0kubun 9895f69460 transform_mjit_header.rb: check initial code
separating the macros. Applying the kept macros to code which is already
affected by the macros may cause errors in initial code.

This is hopefully the final fix for icc build failure.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62226 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-02-05 12:19:38 +00:00
k0kubun 70a7bc3967 transform_mjit_header.rb: remove predefined macros
semi-automatically.

This is basically for icc's __DATE__, __TIME__, and many other families.
It causes an error by predefined macro redefinition.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62225 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-02-05 12:05:04 +00:00
shyouhei a3225c6eba need shell's escape instead of M4's.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62224 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-02-05 05:22:22 +00:00
nobu 961569b952 transform_mjit_header.rb: no extra CRs
* tool/transform_mjit_header.rb (MJITHeader.check_code!): open
  temporary file in binary mode too, not to include extra CRs.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62222 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-02-05 04:58:04 +00:00
shyouhei 779c18bf23 va_copy is a C99ism
Should provide appropriate fallback implementation.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62220 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-02-05 04:07:25 +00:00
nobu 59cc9e3a67 vcs.rb: no meaningless splat
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62218 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-02-05 03:19:39 +00:00
nobu 3a4183d2b7 vcs.rb: for old ruby
* tool/vcs.rb (DebugSystem#system): pop option hash for old
  version ruby which does not support `system` options.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62217 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-02-05 03:19:39 +00:00
nobu 5c6162ad3f transform_mjit_header.rb: take program name from $0
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62216 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-02-05 02:07:49 +00:00
nobu 3f45bbfe0e transform_mjit_header.rb: read/write in binmode
* tool/transform_mjit_header.rb: read and write as ASCII-8BIT to
  make single-byte-optimizable always.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62215 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-02-05 02:02:23 +00:00
nobu 70ae83f8e1 transform_mjit_header.rb: separate macro and code
* tool/transform_mjit_header.rb (separate_macro_and_code): return
  macro and code separately as the name, and concat before output.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62214 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-02-05 00:52:45 +00:00
nobu a38b3307b6 transform_mjit_header.rb: scan by regexp
* tool/transform_mjit_header.rb (find_decl): scan by regexp
  instead of char-by-char loop.  return nil when finished.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62213 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-02-05 00:52:20 +00:00
kazu e743b36318 Use system option instead of shell redirect
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62212 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-02-05 00:09:09 +00:00
nobu e81687527a transform_mjit_header.rb: refactor messages and exit
* tool/transform_mjit_header.rb: print non-error messages to
  STDOUT instead of STDERR.  exit with false or abort instead of
  exit 1.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62205 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-02-04 13:51:02 +00:00
nobu e35ff78985 match whole word
* tool/transform_mjit_header.rb: add word boundary anchors and
  match whole word to get rid of false `static` declarations,
  e.g., rb_str_new_static.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62199 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-02-04 13:12:57 +00:00
kazu 83a9ccb0f2 Fix typos and remove redundant `/#{}/`
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62198 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-02-04 11:59:19 +00:00
k0kubun ed935aa5be mjit_compile.c: merge initial JIT compiler
which has been developed by Takashi Kokubun <takashikkbn@gmail> as
YARV-MJIT. Many of its bugs are fixed by wanabe <s.wanabe@gmail.com>.

This JIT compiler is designed to be a safe migration path to introduce
JIT compiler to MRI. So this commit does not include any bytecode
changes or dynamic instruction modifications, which are done in original
MJIT.

This commit even strips off some aggressive optimizations from
YARV-MJIT, and thus it's slower than YARV-MJIT too. But it's still
fairly faster than Ruby 2.5 in some benchmarks (attached below).

Note that this JIT compiler passes `make test`, `make test-all`, `make
test-spec` without JIT, and even with JIT. Not only it's perfectly safe
with JIT disabled because it does not replace VM instructions unlike
MJIT, but also with JIT enabled it stably runs Ruby applications
including Rails applications.

I'm expecting this version as just "initial" JIT compiler. I have many
optimization ideas which are skipped for initial merging, and you may
easily replace this JIT compiler with a faster one by just replacing
mjit_compile.c. `mjit_compile` interface is designed for the purpose.

common.mk: update dependencies for mjit_compile.c.

internal.h: declare `rb_vm_insn_addr2insn` for MJIT.

vm.c: exclude some definitions if `-DMJIT_HEADER` is provided to
compiler. This avoids to include some functions which take a long time
to compile, e.g. vm_exec_core. Some of the purpose is achieved in
transform_mjit_header.rb (see `IGNORED_FUNCTIONS`) but others are
manually resolved for now. Load mjit_helper.h for MJIT header.
mjit_helper.h: New. This is a file used only by JIT-ed code. I'll
refactor `mjit_call_cfunc` later.
vm_eval.c: add some #ifdef switches to skip compiling some functions
like Init_vm_eval.

win32/mkexports.rb: export thread/ec functions, which are used by MJIT.

include/ruby/defines.h: add MJIT_FUNC_EXPORTED macro alis to clarify
that a function is exported only for MJIT.

array.c: export a function used by MJIT.
bignum.c: ditto.
class.c: ditto.
compile.c: ditto.
error.c: ditto.
gc.c: ditto.
hash.c: ditto.
iseq.c: ditto.
numeric.c: ditto.
object.c: ditto.
proc.c: ditto.
re.c: ditto.
st.c: ditto.
string.c: ditto.
thread.c: ditto.
variable.c: ditto.
vm_backtrace.c: ditto.
vm_insnhelper.c: ditto.
vm_method.c: ditto.

I would like to improve maintainability of function exports, but I
believe this way is acceptable as initial merging if we clarify the
new exports are for MJIT (so that we can use them as TODO list to fix)
and add unit tests to detect unresolved symbols.
I'll add unit tests of JIT compilations in succeeding commits.

Author: Takashi Kokubun <takashikkbn@gmail.com>
Contributor: wanabe <s.wanabe@gmail.com>

Part of [Feature #14235]

---

* Known issues
  * Code generated by gcc is faster than clang. The benchmark may be worse
    in macOS. Following benchmark result is provided by gcc w/ Linux.
  * Performance is decreased when Google Chrome is running
  * JIT can work on MinGW, but it doesn't improve performance at least
    in short running benchmark.
  * Currently it doesn't perform well with Rails. We'll try to fix this
    before release.

---

* Benchmark reslts

Benchmarked with:
Intel 4.0GHz i7-4790K with 16GB memory under x86-64 Ubuntu 8 Cores

- 2.0.0-p0: Ruby 2.0.0-p0
- r62186: Ruby trunk (early 2.6.0), before MJIT changes
- JIT off: On this commit, but without `--jit` option
- JIT on: On this commit, and with `--jit` option

** Optcarrot fps

Benchmark: https://github.com/mame/optcarrot

|         |2.0.0-p0 |r62186   |JIT off  |JIT on   |
|:--------|:--------|:--------|:--------|:--------|
|fps      |37.32    |51.46    |51.31    |58.88    |
|vs 2.0.0 |1.00x    |1.38x    |1.37x    |1.58x    |

** MJIT benchmarks

Benchmark: https://github.com/benchmark-driver/mjit-benchmarks
(Original: https://github.com/vnmakarov/ruby/tree/rtl_mjit_branch/MJIT-benchmarks)

|           |2.0.0-p0 |r62186   |JIT off  |JIT on   |
|:----------|:--------|:--------|:--------|:--------|
|aread      |1.00     |1.09     |1.07     |2.19     |
|aref       |1.00     |1.13     |1.11     |2.22     |
|aset       |1.00     |1.50     |1.45     |2.64     |
|awrite     |1.00     |1.17     |1.13     |2.20     |
|call       |1.00     |1.29     |1.26     |2.02     |
|const2     |1.00     |1.10     |1.10     |2.19     |
|const      |1.00     |1.11     |1.10     |2.19     |
|fannk      |1.00     |1.04     |1.02     |1.00     |
|fib        |1.00     |1.32     |1.31     |1.84     |
|ivread     |1.00     |1.13     |1.12     |2.43     |
|ivwrite    |1.00     |1.23     |1.21     |2.40     |
|mandelbrot |1.00     |1.13     |1.16     |1.28     |
|meteor     |1.00     |2.97     |2.92     |3.17     |
|nbody      |1.00     |1.17     |1.15     |1.49     |
|nest-ntimes|1.00     |1.22     |1.20     |1.39     |
|nest-while |1.00     |1.10     |1.10     |1.37     |
|norm       |1.00     |1.18     |1.16     |1.24     |
|nsvb       |1.00     |1.16     |1.16     |1.17     |
|red-black  |1.00     |1.02     |0.99     |1.12     |
|sieve      |1.00     |1.30     |1.28     |1.62     |
|trees      |1.00     |1.14     |1.13     |1.19     |
|while      |1.00     |1.12     |1.11     |2.41     |

** Discourse's script/bench.rb

Benchmark: https://github.com/discourse/discourse/blob/v1.8.7/script/bench.rb

NOTE: Rails performance was somehow a little degraded with JIT for now.
We should fix this.
(At least I know opt_aref is performing badly in JIT and I have an idea
 to fix it. Please wait for the fix.)

*** JIT off
Your Results: (note for timings- percentile is first, duration is second in millisecs)

categories_admin:
  50: 17
  75: 18
  90: 22
  99: 29
home_admin:
  50: 21
  75: 21
  90: 27
  99: 40
topic_admin:
  50: 17
  75: 18
  90: 22
  99: 32
categories:
  50: 35
  75: 41
  90: 43
  99: 77
home:
  50: 39
  75: 46
  90: 49
  99: 95
topic:
  50: 46
  75: 52
  90: 56
  99: 101

*** JIT on
Your Results: (note for timings- percentile is first, duration is second in millisecs)

categories_admin:
  50: 19
  75: 21
  90: 25
  99: 33
home_admin:
  50: 24
  75: 26
  90: 30
  99: 35
topic_admin:
  50: 19
  75: 20
  90: 25
  99: 30
categories:
  50: 40
  75: 44
  90: 48
  99: 76
home:
  50: 42
  75: 48
  90: 51
  99: 89
topic:
  50: 49
  75: 55
  90: 58
  99: 99

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62197 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-02-04 11:22:28 +00:00
k0kubun 0af44e7261 common.mk: install a single header file for JIT
compilation which is created by transforming a preprocessed vm.c.
This file will be used by JIT compiler's generated code which we are
going to have from succeeding commits.

Makefile.in: generate MJIT header for UNIX environments.
win32/Makefile.sub: generate MJIT header for mswin environments.
At initial merge, we're going to support only MinGW for Windows. So the
header installed by this file won't be used for short term, but we'll
add mswin support in a half year or so, for sure.

tool/transform_mjit_header.rb: New. This script was originally written as
minimize_mjit_header.rb by Vladimir N. Makarov <vmakarov@redhat.com> for
Feature 12589.
Then I refactored a little so that it can conform CodeClimate CI which is
currently set for Ruby's GitHub repository, and fixed some bugs and ported
it to work on Windows.

Also, as original minimize_mjit_header.rb takes too long time to run,
this is modified to skip minimization step because having *static*
unused definitions does not waste compilation time on -O2 since compiler
can skip to compile unused static functions. So this does no longer
"minimize" the header and is renamed.

This header installation does NOT include a header to automatically
export symbols used by MJIT. That's because original MJIT code was
failing to export symbols in the import header in macOS environment.
But I would like to have the functionality for maintainability in the
future. I'll manually export things but it would be just an intemediate
solution.

Patch by: Vladimir N. Makarov <vmakarov@redhat.com>
Part of: Feature 12589 and 14235.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62187 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-02-04 05:49:21 +00:00
naruse 42bb73cf64 support ruby 1.9.3
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62109 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-01-30 07:34:06 +00:00
nobu c3ce3b4744 vcs.rb: checkout the current branch before rebase
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62105 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-01-30 04:17:32 +00:00
nobu d4d671f2b0 bare_instructions.rb: sp_inc is signed
* tool/ruby_vm/models/bare_instructions.rb (predefine_attributes):
  `sp_inc` attribute which may return negative values must be
  signed `rb_snum_t`, to be signed-expanded at type promotion.

* vm_insnhelper.h (ADJ_SP): removed the workaround for platforms
  where rb_num_t is wider than int.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62103 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-01-30 03:21:52 +00:00
nobu a24ccfe6af vcs.rb: fix errors
* tool/vcs.rb (DebugSystem#system): fix undefined local variable
  error.  as system doesn't accept `exception:` option before 2.6,
  remove it from `opts`.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62101 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-01-30 02:20:02 +00:00
naruse be264f4a65 Suport ruby 1.9.3
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62097 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-01-29 17:05:41 +00:00
shyouhei 3bc2f5a9b6 redefinition of a typedef is a C11ism
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62090 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-01-29 08:11:02 +00:00
shyouhei 31ecd18f1a s/CALL_SIMPLE_METHOD/DISPATCH_ORIGINAL_INSN/
Now that DISPATCH_ORIGINAL_INSN is introduced, we can replace
CALL_SIMPLE_METHOD with DISPATCH_ORIGINAL_INSN. These two macros
differ in size very much and results in this big difference in
compiled binary size. This changeset reduces the size of
vm_exec_core from 32,352 bytes to 27,008 bytes on my machine.  As
a result it yields slightly better performance.
Closes [GH-1779].

-----------------------------------------------------------
benchmark results:
minimum results in each 3 measurements.
Execution time (sec)
name    before  after
so_ackermann     0.484  0.454
so_array         0.837  0.779
so_binary_trees  5.928  5.801
so_concatenate   3.473  3.543
so_count_words   0.201  0.222
so_exception     0.255  0.252
so_fannkuch      1.080  1.019
so_fasta         1.459  1.463
so_k_nucleotide  1.218  1.180
so_lists         0.499  0.484
so_mandelbrot    2.189  2.324
so_matrix        0.510  0.496
so_meteor_contest        3.025  2.925
so_nbody         1.319  1.273
so_nested_loop   0.941  0.932
so_nsieve        1.806  1.647
so_nsieve_bits   2.151  2.078
so_object        0.632  0.621
so_partial_sums  1.560  1.632
so_pidigits      1.190  1.183
so_random        0.333  0.353
so_reverse_complement    0.604  0.586
so_sieve         0.521  0.481
so_spectralnorm  1.774  1.722

Speedup ratio: compare with the result of `before' (greater is better)
name    after
so_ackermann    1.065
so_array        1.075
so_binary_trees 1.022
so_concatenate  0.980
so_count_words  0.903
so_exception    1.009
so_fannkuch     1.059
so_fasta        0.997
so_k_nucleotide 1.032
so_lists        1.032
so_mandelbrot   0.942
so_matrix       1.028
so_meteor_contest       1.034
so_nbody        1.036
so_nested_loop  1.009
so_nsieve       1.097
so_nsieve_bits  1.035
so_object       1.018
so_partial_sums 0.956
so_pidigits     1.006
so_random       0.943
so_reverse_complement   1.032
so_sieve        1.083
so_spectralnorm 1.030

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62088 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-01-29 07:04:50 +00:00
shyouhei 7d4ad74f22 also use sp_inc in vm core
Now that sp_inc attributes are officially provided as inline
functions. Why not use them directly from the vm core, not just
by the compiler. By doing so, it is now possible for us to
optimize stack manipulations. We can now know exactly how many
words of stack space an instruction consumes before it actually
does. This changeset deletes some lines from insns.def because
they are no longer needed.  As a result it reduces the size of
vm_exec_core function from 32,400 bytes to 32,352 bytes on my
machine.

It seems it does not affect performance:

-----------------------------------------------------------
benchmark results:
minimum results in each 3 measurements.
Execution time (sec)
name    before  after
loop_for         1.093  1.061
loop_generator   1.156  1.152
loop_times       0.982  0.974
loop_whileloop   0.549  0.587
loop_whileloop2  0.115  0.121

Speedup ratio: compare with the result of `before' (greater is better)
name    after
loop_for        1.030
loop_generator  1.003
loop_times      1.008
loop_whileloop  0.935
loop_whileloop2 0.949

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62087 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-01-29 06:56:56 +00:00
shyouhei 9a8b38cacf extensive use of instruction attributes
Instead of using magic numbers, let us define a series of attributes
and use them from the VM core.  Proper function declarations makes
these attributes inlined in most modern compilers.  On my machine
exact same binary is generated with or without this changeset.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62085 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-01-29 06:47:05 +00:00
nobu 17d8433d27 vcs.rb: prepend DebugSystem to VCS
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62070 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-01-27 06:11:23 +00:00
k0kubun fe18a62347 bare_instructions.rb: show class name on inspect
as it's helpful for debugging.

I'm not sure what's the good output for RubyVM::TraceInstructions, so I
left it as it is.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62068 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-01-27 04:14:29 +00:00
k0kubun 3e458f15c8 insns2vm.rb: add missing word to help
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62066 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-01-27 02:14:20 +00:00
k0kubun c8e5796f61 insns2vm.rb: make #generate_parser private
which is only used by #router.

To make it private, we need to stop defining them on top-level.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62065 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-01-27 02:14:20 +00:00
k0kubun be27efdb83 dumper.rb: stop getting --destdir option value
via current directory. It's kind of a global state and fragile to
implementation changes in other places, and how the `Dir.getwd` is set
is not obvious from just reading around `RubyVM::Dumper#initialize` if
it depends on the global state.

tool/ruby_vm/controllers/application_controller.rb: explicitly pass
destdir to RubyVM::Dumper.

tool/ruby_vm/scripts/insns2vm.rb: explicitly pass destdir parsed from
optparse.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62064 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-01-27 01:59:08 +00:00
nobu 78c81718d2 vcs.rb: old version cannot refine modules
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62060 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-01-26 13:38:00 +00:00
nobu eab10990ac vcs.rb: dcommit for each commit
svn to git bridge on ci.ruby-lang.org sometimes stalls when
dcommitting some commits at once.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62059 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-01-26 13:34:09 +00:00
nobu e168963d8a vcs.rb: debug print in system method
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62058 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-01-26 13:27:56 +00:00
shyouhei 3234245ae3 move ADD_PC around to optimize PC manipluiations
This commit introduces new attribute handles_flame and if that is
_not_ the case, places ADD_PC right after INC_SP.  This improves
locality of PC manipulations to prevents unnecessary register spill-
outs. As a result, it reduces the size of vm_exec_core from 32,688
bytes to 32,384 bytes on my machine.

Speedup is very faint, but certain.

-----------------------------------------------------------
benchmark results:
minimum results in each 3 measurements.
Execution time (sec)
name    before  after
so_ackermann     0.476  0.464
so_array         0.742  0.728
so_binary_trees  5.493  5.466
so_concatenate   3.619  3.395
so_count_words   0.190  0.184
so_exception     0.249  0.239
so_fannkuch      0.994  0.953
so_fasta         1.369  1.374
so_k_nucleotide  1.111  1.111
so_lists         0.470  0.481
so_mandelbrot    2.059  2.050
so_matrix        0.466  0.465
so_meteor_contest        2.712  2.781
so_nbody         1.154  1.204
so_nested_loop   0.852  0.846
so_nsieve        1.636  1.623
so_nsieve_bits   2.073  2.039
so_object        0.616  0.584
so_partial_sums  1.464  1.481
so_pidigits      1.075  1.082
so_random        0.321  0.317
so_reverse_complement    0.555  0.558
so_sieve         0.495  0.490
so_spectralnorm  1.634  1.627

Speedup ratio: compare with the result of `before' (greater is better)
name    after
so_ackermann    1.025
so_array        1.019
so_binary_trees 1.005
so_concatenate  1.066
so_count_words  1.030
so_exception    1.040
so_fannkuch     1.043
so_fasta        0.996
so_k_nucleotide 1.000
so_lists        0.978
so_mandelbrot   1.004
so_matrix       1.001
so_meteor_contest       0.975
so_nbody        0.959
so_nested_loop  1.007
so_nsieve       1.008
so_nsieve_bits  1.017
so_object       1.056
so_partial_sums 0.989
so_pidigits     0.994
so_random       1.014
so_reverse_complement   0.996
so_sieve        1.010
so_spectralnorm 1.004

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62051 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-01-26 06:30:58 +00:00
shyouhei 5839396028 Emacs friendliness [ci skip]
Just add comment by:
sed -i $'1i\\\n# -*- Autoconf -*-' tool/m4/*.m4

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61983 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-01-20 07:14:59 +00:00
shyouhei 0664a6377a refactor split configure.ac into files
This does not (yet) change anything. The generated configure file
is the identical to previous one (except several empty lines added
and deleted).

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61981 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-01-20 07:05:25 +00:00
nobu 55af62599a tool/ruby_vm/models/attribute.rb: void for empty arguments
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61838 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-01-15 05:27:11 +00:00
nobu 65236c069e more ytab.sed fixes
* tool/ytab.sed: fix for more old bison which does not support %lex-param
  at yydestruct (missed at the previous commit).
  define yy_stack_print macro to add `p` argument instead of
  replacement at callers.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61832 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-01-15 02:39:32 +00:00
nobu 630ab3b925 more ytab.sed fixes
* tool/ytab.sed: `p` is too short to distinguish alone from other
  names.  fix for more old bison which does not support %lex-param
  at yydestruct.  add `p` argument to non-prototype declaration of
  yy_stack_print.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61826 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-01-15 02:23:24 +00:00
mame 4cc9894845 tool/ytab.sed: Support some old bison implementations
At least, I confirmed bison 2.3 (because macOS uses the version).

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61824 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-01-15 00:45:26 +00:00
mame 14be478d88 parse.y: Use "p" for the variable of struct parser_params consistently
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61816 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-01-14 13:51:38 +00:00
shyouhei 90cb7d3048 __VA_ARGS__ is a C99ism
give up CALL_ATTRIBUTE macro.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61802 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-01-13 10:47:33 +00:00
shyouhei 84012cd19f merge revision: 61746
`signed` is required for Rasbian (x86_64).

* tool/ruby_vm/views/_insn_stack_increase.erb: specify `signed` explicitly
  for systems which use `unsigned` for `char` type.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61792 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-01-12 13:14:53 +00:00
shyouhei fbacf5faad tool/ruby_vm support for pre-2.0 BASERUBY
This was not requested :) but actually easier than the previous
so I just did it anyway.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61787 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-01-12 08:38:12 +00:00
shyouhei 8a72c77c79 tool/ruby_vm support for pre-2.1 BASERUBY
as requested by devs, support for BASERUBY prior to 2.1

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61786 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-01-12 08:38:11 +00:00
shyouhei 069e9ff52c tool/ruby_vm support for pre-2.3 BASERUBY
as requested by devs, support for BASERUBY prior to 2.3

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61785 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-01-12 08:38:10 +00:00
shyouhei f6ea376317 delete tool/instruction.rb (2nd try)
Previous commit changed insns.def format. Now is the time for its
generators. In doing so I chose to modernize the system, not just
patch.  My attempt includes

- extensive use of Onigumo regular expressions
- split from one big file (instruction.rb) into separated MVC
- partial view

Also, let me take this opportunity to kill old unused features
such as

- stack caching
- minsns / yasmdata which are never seriously used
- yarvarch document generation (moved to doc/)
- vast majority of unused arguments to insns2vm.rb

This commit generates VM source codes that cleanly compile, and
the generated binary passes tests.  At least for me.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61784 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-01-12 08:38:09 +00:00
shyouhei e2b7cb9d32 new insns.def format (2nd try)
- Gave up @j comments
- Room for sp_inc to be a proper grammer element

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61782 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-01-12 08:38:07 +00:00
k0kubun 35e631273a tool/downloader.rb: retry against Errno::ETIMEDOUT
instead of Errno::ECONNREFUSED.

As I commented in r61498, at that moment I was not sure if the actual
exception is really `Errno::ECONNREFUSED` or not.

In https://ci.appveyor.com/project/ruby/ruby/build/1.0.6974, I could
confirm that the download can fail with `Errno::ETIMEDOUT`. So I want to
retry that.

Let's add `Errno::ECONNREFUSED` too if it fails with the exception.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61762 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-01-10 15:44:52 +00:00
shyouhei 5ad95486e6 merge revisions 61753:61750 61747:61740 61737:61728
Revert all the VM generator rewrites; requested by naruse


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61755 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-01-10 01:53:24 +00:00
hsbt 2340d5e7ea Fixed typos.
* tool/ruby_vm/loaders/opt_operand_def.rb: grammer -> grammar
  * tool/ruby_vm/scripts/insns2vm.rb: beginnig -> beginning

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61752 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-01-10 01:00:21 +00:00
ko1 39c2149840 `signed` is required for Rasbian (x86_64).
* tool/ruby_vm/views/_insn_stack_increase.erb: specify `signed` explicitly
  for systems which use `unsigned` for `char` type.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61746 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-01-09 16:27:50 +00:00
naruse 0533d9a25e grep_v is ruby 2.3 feature
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61744 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-01-09 15:47:53 +00:00
naruse f5b459c2ed Here document <<~ is Ruby 2.3 feature
baseruby should support wider ruby versions

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61741 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-01-09 15:41:10 +00:00
shyouhei 8a233a2b0b insns_info.inc.tmpl: share large tablese
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61736 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-01-09 13:30:35 +00:00
shyouhei e43fec9a6f insns_info.inc: position independent
* template/insns_info.inc.tmpl (insn_name_info): make position
  independent for large strings.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61735 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-01-09 13:30:34 +00:00
shyouhei 30bd46a358 comma at the end of enum is a C99ism.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61734 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-01-09 13:30:33 +00:00
shyouhei 55317a74f7 delete tool/instruction.rb
Previous commit changed insns.def format. Now is the time for its
generators. In doing so I chose to modernize the system, not just
patch.  My attempt includes

- extensive use of Onigumo regular expressions
- split from one big file (instruction.rb) into separated MVC
- partial view

Also, let me take this opportunity to kill old unused features
such as

- stack caching
- minsns / yasmdata which are never seriously used
- yarvarch document generation (moved to doc/)
- vast majority of unused arguments to insns2vm.rb

This commit generates VM source codes that cleanly compile, and
the generated binary passes tests.  At least for me.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61733 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-01-09 13:30:31 +00:00
svn 7d02105e69 * append newline at EOF.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61731 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-01-09 13:30:30 +00:00
shyouhei 89df12d849 new insns.def format
- Gave up @j comments
- Room for sp_inc to be a proper grammer element

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61729 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-01-09 13:30:28 +00:00
nobu 141d794f00 update-deps: strip -j option
* update-deps: strip -j option from ENV['GNUMAKEFLAGS'], not
  dirstack to get confused by intermingled entering/leaveing
  directory messages.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61714 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-01-09 06:55:54 +00:00
normal 6c721bd44f tool/rbinstall.rb: allow owner to have write permissions
Denying write permissions to the owner seems wrong.

Oddly, this problem only manifests in the "ruby_2_4" branch when
installing bundled gems (rake and friends).  It does not happen
with "ruby_2_3", or "trunk", so it might be related to RubyGems
changes.

* tool/rbinstall.rb: set umask to 022
  [ruby-core:84420] [Bug #14227]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61611 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-01-05 09:41:21 +00:00
k0kubun 57e95f38b1 tool/downloader.rb: don't suppress exception
on the end of retry failure.

Fixed mistake in r61498

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61499 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-27 13:35:25 +00:00
k0kubun ff6c540adb tool/downloader.rb: retry downloads
because it's randomly failing on CI like
https://ci.appveyor.com/project/ruby/ruby/build/1.0.6724

Actually I'm not sure whether the exception class is Errno::ECONNREFUSED
or not. Please change the rescued exception to the correct one if it's
wrong. I changed to log exception class too in this commit.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61498 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-27 13:32:59 +00:00
nobu 42c6ef00af fake.rb: set libdir
* tool/fake.rb: set "libdir" to build directory too, so that
  spec/ruby/optional/capi/spec_helper.rb can find libruby_so.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61490 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-27 01:26:22 +00:00
hsbt 7825e8363d Postponing the Bundler merge.
I faced a big issue about Bundler with ruby core.
  I have no time to resolve it issue before 2.5 final release.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61416 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-22 23:08:05 +00:00
nobu 92bfddff92 vcs: --add-author-from
* tool/vcs.rb (VCS::GIT#commit): no --add-author-from option if
  author equals committer.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61334 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-19 03:17:37 +00:00
nobu fb6db414a1 vcs.rb: --add-author-from option
From: Nobuyoshi Nakada <nobu@ruby-lang.org>

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61312 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-18 01:55:55 +00:00
usa d837e5321d aliases
* tool/merger.rb: aliases for removetag command.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61294 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-16 01:56:14 +00:00
nobu 7c4306e6e9 gperf.sed: static declarations
* tool/gperf.sed: comment out arguments part only, to keep the
  following declarations static.  [Feature #13883]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61282 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-15 14:42:43 +00:00
usa e13d347df6 add `removetag` command
* tool/merger.rb (remove_tag): add `removetag` command.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61269 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-15 03:22:51 +00:00
usa 3b10f70220 check the existence of specified tag
* tool/merger.rb (tag): check the existence of specified tag before tagging to
  get rid of careless mistakes.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61267 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-15 03:04:56 +00:00
nobu 692e00f3fd vcs.rb: raise NotFoundError when command not found
* tool/vcs.rb (VCS#get_revisions): raise VCS::NotFoundError when
  command not found.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61211 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-13 12:06:11 +00:00
naruse 4b4f7c428c Revert r61054
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61202 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-13 08:38:43 +00:00
hsbt 774f650bbe Revert "switch from http to https for Unicode data file downloads"
This reverts commit 90de118a75.

  The environment of mswinci couldn't handle https download.
  (It's certificates problem, We should upgrade its environment)

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61169 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-12 14:10:43 +00:00
duerst 90de118a75 switch from http to https for Unicode data file downloads
(patch from MSP-Greg (Greg L), this closes issue #13962)

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61145 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-12 09:00:20 +00:00
mame 9b1d8ab7d0 ext/coverage/coverage.c: remove COVERAGE_EXPERIMENTAL_MODE
A NEWS entry is also added.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61129 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-12 00:20:58 +00:00
ko1 b5d5cce11b vm_exec.h: introduce macros for abstarction.
* vm_exec.h: declare two macros
  * START_OF_ORIGINAL_INSN()
  * DISPATCH_ORIGINAL_INSN()
  instead of inserting label and goto lines.
  For OPT_CALL_THREADED_CODE, first macro is empty and second macro
  is simply call the original insn function.

* tool/instruction.rb: use above macros.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61120 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-11 16:07:21 +00:00
nobu a4804fbdf5 support gperf 3.1
* tool/gperf.sed: extracted sed commands to a script.  ANSI-C code
  produced by gperf 3.1 declares length arguments as `size_t`.  it
  causes conflict with existing declarations, and needs casts for
  a local variable and return statements.
  [Feature #13883]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61076 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-08 05:51:19 +00:00
nobu 86f05884a5 vcs.rb: fix r61054
* tool/vcs.rb (VCS::SVN.get_revisions): cmd_readd_at expects the
  whole arguments for IO.popen as the second argument, that is an
  array of command and mode.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61056 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-06 11:36:42 +00:00
nobu 951ef1d413 file2lastrev.rb: suppress_not_found
* tool/file2lastrev.rb: exit successfully when command not found,
  and if --suppress_not_found is given.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61055 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-06 11:18:53 +00:00
nobu 3234d6a6cb vcs.rb: raise NotFoundError when command not found
* tool/vcs.rb (cmd_pipe_at, cmd_read_at, system): moved from GIT
  to VCS, and now raise VCS::NotFoundError when command not found.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61054 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-06 11:18:52 +00:00
mame 0a6816ecd7 Revamp method coverage to support define_method
Traditionally, method coverage measurement was implemented by inserting
`trace2` instruction to the head of method iseq.  So, it just measured
methods defined by `def` keyword.

This commit drastically changes the measuring mechanism of method
coverage; at `RUBY_EVENT_CALL`, it keeps a hash from rb_method_entry_t*
to runs (i.e., it counts the runs per method entry), and at
`Coverage.result`, it creates the result hash by enumerating all
`rb_method_entry_t*` objects (by `ObjectSpace.each_object`).

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61023 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-05 07:16:42 +00:00
naruse 71c2e59988 Set binmode to handle non ASCII commit message
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60995 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-03 12:11:19 +00:00
nobu 01830719f6 fix for emoji-data.txt
* common.mk: download emoji-data.txt.  As emoji data files are
  located in a separate directory in Unicode.org site, reearranged
  Unicode data files directories same as the site.

* tool/enc-unicode.rb (get_file): search emoji data files in the
  second argument path.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60977 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-02 03:12:51 +00:00
nobu 8b180dd74e enc-unicode.rb: for gperf 3.1
* tool/enc-unicode.rb: support for gperf 3.1, which defines length
  arguments as `size_t` but a local variable as `unsigned int`.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60976 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-02 03:12:50 +00:00
naruse 31796f17d3 Update to Onigmo 6.1.3-669ac9997619954c298da971fcfacccf36909d05.
[Bug #13892]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60966 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-01 13:50:13 +00:00
hsbt 6592dca931 Ignored obsoleted `bundle_ruby` command from upstream.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60922 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-11-27 11:02:48 +00:00
ko1 665ba24b44 remove `trace` instruction. [Feature #14104]
* tool/instruction.rb: create `trace_` prefix instructions.

* compile.c (ADD_TRACE): do not add `trace` instructions but add
  TRACE link elements. TRACE elements will be unified with a next
  instruction as instruction information.

* vm_trace.c (update_global_event_hook): modify all ISeqs when
  hooks are enabled.

* iseq.c (rb_iseq_trace_set): added to toggle `trace_` instructions.

* vm_insnhelper.c (vm_trace): added.
  This function is a body of `trace_` prefix instructions.

* vm_insnhelper.h (JUMP): save PC to a control frame.

* insns.def (trace): removed.

* vm_exec.h (INSN_ENTRY_SIG): add debug output (disabled).


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60763 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-11-14 12:58:36 +00:00
nobu 6820727a90 mk_call_iseq_optimized.rb: add mode string [ci skip]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60731 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-11-09 23:02:52 +00:00
nobu c2a08ef876 tool/runruby.rb: fix RUNRUBY_USE_GDB case
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60698 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-11-07 11:21:09 +00:00
nobu ca551eed45 runruby.rb: add -C/--chdir option
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60664 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-11-05 21:13:17 +00:00
nobu 80aee7903d runruby.rb: support run.gdb by --debugger option
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60661 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-11-05 05:11:04 +00:00
nobu e24e33c134 rbinstall.rb: show categories of default gems
* tool/rbinstall.rb (#install_default_gem): show categories of
  default gems, pure ruby libraries and libraries with extensions.
  [ruby-core:83600] [Bug #14065]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60578 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-10-30 05:45:20 +00:00