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

1381 Коммитов

Автор SHA1 Сообщение Дата
Nobuyoshi Nakada 00d9278387
fileutils now depends on rbconfig.rb due to JRuby support 2020-04-17 14:07:14 +09:00
Nobuyoshi Nakada 9fa24018b7
Make y.output in ripper unlocalized [ci skip]
Often it is easy to search, grep, etc from command line, for
debugging purpose.
2020-04-14 13:10:28 +09:00
卜部昌平 c37a357c13 include what you use.
This reverts commit 443389effc.
This reverts commit d94960f22e.

Inclusion of header files must be explicit.  Every file shall directly
include what is necessary.

https://github.com/include-what-you-use/include-what-you-use says:

> When every file includes what it uses, then it is possible to edit any
> file and remove unused headers, without fear of accidentally breaking
> the upwards dependencies of that file. It also becomes easy to
> automatically track and update dependencies in the source code.

Though we don't use iwyu itself, the principle quoted above is a good
thing that we can agree.

Now that include guards were added to every and all of the headers
inside of our project this changeset does not increase compile time, at
least on my machine.
2020-04-13 16:06:00 +09:00
Koichi Sasada d94960f22e update dependencies 2020-04-10 14:53:25 +09:00
卜部昌平 9e6e39c351
Merge pull request #2991 from shyouhei/ruby.h
Split ruby.h
2020-04-08 13:28:13 +09:00
Nobuyoshi Nakada 310054b240 Moved `Dir.open` and `Dir#initialize` to dir.rb 2020-04-06 22:22:25 +09:00
Nobuyoshi Nakada 21d0b40de2 Added tooldir variable 2020-04-05 09:26:57 +09:00
Nobuyoshi Nakada f2807f4ec0
Refresh revision.h by after-update 2020-03-30 16:03:38 +09:00
Kazuhiro NISHIYAMA 930b012ad9
Add rexml to fix rss of test-bundled-gems (#2976) 2020-03-24 15:36:53 +09:00
Takashi Kokubun 5c4847f191
Use miniruby to run tool/mjit_tabs.rb
hoping to fix https://github.com/ruby/actions/runs/527422022
2020-03-23 22:44:57 -07:00
Takashi Kokubun 5b3157a511
Make file names and variable names consistent 2020-03-23 22:33:01 -07:00
Nobuyoshi Nakada 6ab3664635
Moved MJIT_WITHOUT_TABS default to configure.ac
And then the environment variable.
2020-03-24 13:46:00 +09:00
Takashi Kokubun 13e9551b97
Change the filename like make variable
for consistency
2020-03-22 23:15:50 -07:00
Takashi Kokubun 3bd7d5617f
Make the first argument slightly more robust 2020-03-22 23:14:32 -07:00
Takashi Kokubun d578f1d3ea
Change the run_without_tabs switching to dedicated
variable of make instead of d059714746 as requested.

You can disable this like `make MJIT_WITHOUT_TABS=false` or
`export MJIT_WITHOUT_TABS=false`.
2020-03-22 23:12:54 -07:00
Takashi Kokubun d059714746
Disable run_without_tabs when there's no -ggdb3
in debugflags, as requested by nobu

I actually wanted to check debugflags directly rather than MJIT_DEBUGFLAGS
because debugflags is always used but MJIT_DEBUGFLAGS may not be always used.
But I couldn't find a better way to check debugflags.
2020-03-22 20:20:27 -07:00
Takashi Kokubun 9ebf74fd78
Expand tabs for rb_mjit_header.h (#2975)
This is necessary to avoid converting a hard tab to just 1 space in
preprocessor to generate rb_mjit_header.h, which is helpful when using
gdb or perf report.

See also: [Misc #16112]

This reverts commit 91acdd17c4.
Fixed permission failure on Travis, encoding, and added SKIPPED_FILES.
2020-03-22 11:50:45 -07:00
Takashi Kokubun 91acdd17c4
Revert "Expand tabs for rb_mjit_header.h"
This reverts commit 57119dd561.

Temporarily reverting for Travis failures
2020-03-22 00:53:05 -07:00
Takashi Kokubun 57119dd561
Expand tabs for rb_mjit_header.h
I can't live without this when using gdb or perf report.

See also: [Misc #16112]
2020-03-22 00:37:31 -07:00
S.H 290d608637
support builtin for Kernel#clone 2020-03-17 19:37:07 +09:00
Takashi Kokubun 6e405b2611
Use a human-readable funcname with --jit-debug
for perf output like:

Samples: 100K of event 'cycles:ppp', Event count (approx.): 1007750000
  Children      Self  Command  Shared Object             Symbol
+   81.58%     1.47%  ruby     ruby                      [.] rb_vm_exec
+   81.06%     7.61%  ruby     ruby                      [.] vm_exec_core
+   80.16%     0.00%  ruby     ruby                      [.] vm_sendish (inlined)
+   75.03%     0.00%  ruby     ruby                      [.] mjit_exec (inlined)
+   74.37%     0.00%  ruby     ruby                      [.] mjit_exec (inlined)
+   73.42%     0.22%  ruby     _ruby_mjit_p11277u42.so   [.] _mjit42_rack_method_override_rb_call
+   73.25%     0.10%  ruby     _ruby_mjit_p11277u41.so   [.] _mjit41_sinatra_show_exceptions_rb_call
+   73.19%     0.22%  ruby     _ruby_mjit_p11277u44.so   [.] _mjit44_rack_head_rb_call
+   73.03%     0.15%  ruby     _ruby_mjit_p11277u45.so   [.] _mjit45_sinatra_base_rb_call
+   72.87%     0.26%  ruby     _ruby_mjit_p11277u49.so   [.] _mjit49_rack_logger_rb_call
+   70.56%     0.11%  ruby     _ruby_mjit_p11277u40.so   [.] _mjit40_sinatra_base_rb_call
+   68.70%     0.11%  ruby     _ruby_mjit_p11277u39.so   [.] _mjit39_sinatra_base_rb_call
+   68.39%     0.29%  ruby     _ruby_mjit_p11277u56.so   [.] _mjit56_rack_protection_frame_options_rb_call
+   67.89%     0.18%  ruby     _ruby_mjit_p11277u37.so   [.] _mjit37_sinatra_base_rb_block_in_call
+   67.04%     0.16%  ruby     _ruby_mjit_p11277u34.so   [.] _mjit34_sinatra_base_rb_synchronize

Reverting deb1c7b97d, fixing `sprint_funcname`'s argument in `compact_all_jit_code`.
Also updating common.mk.
2020-03-14 21:02:09 -07:00
David Rodríguez 459670d47f Fix bundled gems installation on a fresh clone 2020-03-14 18:16:47 +09:00
Nobuyoshi Nakada 88f4ebac83
Update and extract for each gem 2020-03-13 15:34:50 +09:00
Nobuyoshi Nakada 289bdb64d9
Add prepare-gems to download and extract bundled gems 2020-03-12 22:58:04 +09:00
Takashi Kokubun adcf0316d1
Prevent unloading methods used in root_fiber while calling another Fiber (#2939)
Fixing SEGVs like:
http://ci.rvm.jp/results/trunk-mjit-wait@silicon-docker/2744905
http://ci.rvm.jp/results/trunk-mjit-wait@silicon-docker/2744420
http://ci.rvm.jp/results/trunk-mjit-wait@silicon-docker/2741400
2020-02-28 23:58:33 -08:00
Nobuyoshi Nakada 55bf0ef1aa Share extracted bundled gems with gems for bundler
Extract bundled gems under ".bundle/gems" and get rid of
duplication which cause constant redefinition warnings at
`test-all` after `extract-gems` and `test-bundler`.
2020-02-25 20:40:36 +09:00
Nobuyoshi Nakada 8b6e2685a4
Fixed symbol misused as ID
`rb_funcallv_public` and `rb_respond_to` require an `ID`, not a
`Symbol`.  [Bug #16649]
2020-02-24 15:37:52 +09:00
Nobuyoshi Nakada 0ed3384fd4
Revert "Prefer `exe/ruby` to execute from it"
This reverts commit c7b71af9e2, as
an example in bundler expects untouch PATH.
2020-02-23 13:31:56 +09:00
Nobuyoshi Nakada c7b71af9e2
Prefer `exe/ruby` to execute from it 2020-02-22 16:01:38 +09:00
Koichi Sasada b9007b6c54 Introduce disposable call-cache.
This patch contains several ideas:

(1) Disposable inline method cache (IMC) for race-free inline method cache
    * Making call-cache (CC) as a RVALUE (GC target object) and allocate new
      CC on cache miss.
    * This technique allows race-free access from parallel processing
      elements like RCU.
(2) Introduce per-Class method cache (pCMC)
    * Instead of fixed-size global method cache (GMC), pCMC allows flexible
      cache size.
    * Caching CCs reduces CC allocation and allow sharing CC's fast-path
      between same call-info (CI) call-sites.
(3) Invalidate an inline method cache by invalidating corresponding method
    entries (MEs)
    * Instead of using class serials, we set "invalidated" flag for method
      entry itself to represent cache invalidation.
    * Compare with using class serials, the impact of method modification
      (add/overwrite/delete) is small.
    * Updating class serials invalidate all method caches of the class and
      sub-classes.
    * Proposed approach only invalidate the method cache of only one ME.

See [Feature #16614] for more details.
2020-02-22 09:58:59 +09:00
Koichi Sasada f2286925f0 VALUE size packed callinfo (ci).
Now, rb_call_info contains how to call the method with tuple of
(mid, orig_argc, flags, kwarg). Most of cases, kwarg == NULL and
mid+argc+flags only requires 64bits. So this patch packed
rb_call_info to VALUE (1 word) on such cases. If we can not
represent it in VALUE, then use imemo_callinfo which contains
conventional callinfo (rb_callinfo, renamed from rb_call_info).

iseq->body->ci_kw_size is removed because all of callinfo is VALUE
size (packed ci or a pointer to imemo_callinfo).

To access ci information, we need to use these functions:
vm_ci_mid(ci), _flag(ci), _argc(ci), _kwarg(ci).

struct rb_call_info_kw_arg is renamed to rb_callinfo_kwarg.

rb_funcallv_with_cc() and rb_method_basic_definition_p_with_cc()
is temporary removed because cd->ci should be marked.
2020-02-22 09:58:59 +09:00
Hiroshi SHIBATA 05485868cb Workaround for bison provided by scoop on mswin environment 2020-02-15 21:20:25 +09:00
Nobuyoshi Nakada 985d1b9ec4
Fixed a potential memory leak
`rb_str_new_cstr` can raise a `NoMemoryError`.
2020-02-12 11:58:56 +09:00
Nobuyoshi Nakada e3e96e3faa
Check if bindable against the refined target [Bug #16617] 2020-02-09 20:13:49 +09:00
Alan Wu 7d02441f0d Fix file dependency in make 2020-01-28 16:11:53 -05:00
Nobuyoshi Nakada e710e9e886
Fixed missing dependency on array.rb 2020-01-27 10:07:46 +09:00
Nobuyoshi Nakada 29eb1b1602
Moved Array#shuffle and Array#shuffle! to rbinc 2020-01-26 19:40:34 +09:00
Jeremy Evans e91c39f1c0 Remove special handling of $SAFE and related C-APIs
These were all deprecated in Ruby 2.7.
2020-01-22 09:09:47 -08:00
Koichi Sasada 8113f3fee4 add default break points 2020-01-21 16:58:00 +09:00
Nobuyoshi Nakada 93a51c15d9
Update clean-local [ci skip]
* Remove builtin_binary.inc which is generated for each time
  miniruby is built.

* dSYM is a directory, not a file.
2020-01-18 16:47:53 +09:00
Nobuyoshi Nakada f9788ca7fe
Update dependencies
internal/rational.h needs internal/warnings.h with Apple clang,
for `UNALIGNED_MEMBER_ACCESS`.
2020-01-17 16:41:46 +09:00
Kazuhiro NISHIYAMA 4e6bcac23e
Update dependencies in makefiles again
patch from https://travis-ci.org/ruby/ruby/jobs/638231960
2020-01-17 11:19:01 +09:00
Kazuhiro NISHIYAMA 73618d84e8
Update dependencies in makefiles
patch from https://travis-ci.org/ruby/ruby/jobs/638226493
2020-01-17 10:25:00 +09:00
Nobuyoshi Nakada e288632f22
Clean generated ChangeLog [ci skip] 2020-01-12 19:54:59 +09:00
Nobuyoshi Nakada 8afd304f41
Ignore existing ChangeLog file and generate always [ci skip] 2020-01-12 19:52:35 +09:00
Nobuyoshi Nakada cccfc66760
Added make target to export the ChangeLog file 2020-01-12 19:39:00 +09:00
Lourens Naudé 40c57ad4a1 Let execution context local storage be an ID table 2020-01-11 14:40:36 +13:00
Nobuyoshi Nakada 54e31f4a5f
Update dependencies for c6b26f5ccf 2020-01-10 09:09:51 +09:00
Lourens Naudé 8ba261c754 Bump benchmark-driver to v0.15.7 (#2811) 2020-01-02 14:26:20 -08:00
Koichi Sasada 9f460e017b move internal/debug.h definitions to internal.h
Debug utilities should be accessible from any internal code.
2020-01-03 04:46:51 +09:00