66378 Commits

Author SHA1 Message Date
Nobuyoshi Nakada
3c57c087ec
lldb_cruby.py: fix non-flonum float inspection [ci skip] 2021-06-04 09:12:34 +09:00
git
9f3240d4f4 * 2021-06-04 [ci skip] 2021-06-04 05:57:15 +09:00
Aaron Patterson
38c5f2737f
Support an arbitrary number of header bits (< BITS_BITLENGTH)
NUM_IN_PAGE(page->start) will sometimes return a 0 or a 1 depending on
how the alignment of the 40 byte slots work out.  This commit uses the
NUM_IN_PAGE function to shift the bitmap down on the first bitmap plane.
Iterating on the first bitmap plane is "special", but this commit allows
us to align object addresses on something besides 40 bytes, and also
eliminates the need to fill guard bits.
2021-06-03 13:56:53 -07:00
Nobuyoshi Nakada
93be7a4c6b
Suppress clobbered warnings on Travis-CI ppc64le-linux 2021-06-03 20:07:26 +09:00
Samuel Williams
dc25412042 Expose rb_fiber_transfer and rb_fiber_transfer_kw. 2021-06-03 20:47:31 +12:00
Takashi Kokubun
7e14762159
Do not doubly hold an MJIT lock
This is a follow-up of 86c262541ad07528842d76dab4b9b34bd888d5f4.
CRITICAL_SECTION_START/FINISH are not needed when it's called from an
MJIT worker.

Also, ZALLOC needs to be calloc because ZALLOC may trigger GC, which an
MJIT worker must not do.
2021-06-02 23:59:33 -07:00
Nobuyoshi Nakada
9f3888d6a3 Warn more duplicate literal hash keys
Following non-special_const literals:
* T_REGEXP
2021-06-03 15:11:18 +09:00
Nobuyoshi Nakada
37eb5e7439 Warn more duplicate literal hash keys
Following non-special_const literals:
* T_BIGNUM
* T_FLOAT (non-flonum)
* T_RATIONAL
* T_COMPLEX
2021-06-03 15:11:18 +09:00
Nobuyoshi Nakada
a023db49bf Assertions for duplicate literal hash key warnings 2021-06-03 15:11:18 +09:00
Takashi Kokubun
31b9ce365d
Note about 07c05b6fe931337e928a89ac5ebf654862dc0eca 2021-06-02 22:26:27 -07:00
Takashi Kokubun
86c262541a
Fix a race condition around mjit_recompile
This fixes SEGVs like https://github.com/ruby/ruby/runs/2715166621?check_suite_focus=true.

When mjit_recompile is called when mjit_compile is compiling the exact
same iseq (and after it called mjit_capture_cc_entries), iseq->body->jit_unit
is re-created and its cc_entries becomes NULL. Then, when it tries to
lookup cc_entries through iseq->body->jit_unit, it fails.
2021-06-02 22:11:37 -07:00
Takashi Kokubun
007e439fe9
Do not expect ec on rb_vm_bugreport
because a SEGV might happen on an MJIT worker. As you can clearly see
from `if (vm && ec) {`, ec is not guaranteed to exist here.
2021-06-02 21:50:40 -07:00
Yusuke Endoh
b957c3dbcb [rubygems/rubygems] Rename test/rubygems/test_{case,utilities}.rb to avoid "test_" prefix
This changes "test/rubygems/test_case.rb" to "test/rubygems/helper.rb",
and "test/rubygems/test_utilities.rb" to "test/rubygems/utilities.rb".

The two files are a helper for tests, not test files. However, a file
starting with "test_" prefix is handled as a test file directly loaded
by test-unit because Rakefile specifies:

```
t.test_files = FileList['test/**/test_*.rb']
```

Directly loading test/rubygems/test_utilities.rb caused "uninitialized
constant Gem::TestCase". This issue was fixed by
59c682097197fee4052b47e4b4ab86562f3eaa9b, but the fix caused a
"circular require" warning because test_utilities.rb and test_case.rb
are now requiring each other.

Anyway, adding "test_" prefix to a test helper file is confusing, so
this changeset reverts the fix and solve the issue by renaming them.

https://github.com/rubygems/rubygems/commit/6460e018df
2021-06-03 12:23:22 +09:00
S.H
28b481938b
Implemented some NilClass method in Ruby code is faster [Feature #17054] (#3366) 2021-06-02 20:04:56 -07:00
Aaron Patterson
bc65cf1a92
use a bool instead of int 2021-06-02 14:13:34 -07:00
Peter Zhu
ad734a8cc3 Allocate exact space for objspace_each_objects
We are only iterating over the eden heap so `heap_eden->total_pages`
contains the exact number of pages we need to allocate for.
`heap_allocated_pages` may contain pages in the tomb.
2021-06-02 15:49:32 -04:00
git
2a685da1fc * 2021-06-03 [ci skip] 2021-06-03 00:07:44 +09:00
Daisuke Fujimura (fd0)
e451f0f678 Fix _MSC_VER warnings 2021-06-03 00:07:25 +09:00
Benoit Daloze
750f807575 Update to ruby/spec@c6e9285 2021-06-02 15:54:38 +02:00
Benoit Daloze
22e2a6a999 Update to ruby/spec@a0b7d0d 2021-06-02 14:34:07 +02:00
Benoit Daloze
a4fbc7e288 Update to ruby/mspec@0091e8a 2021-06-02 14:34:01 +02:00
Jun Aruga
2048dfc5d3 Skip a File.atime test randomly failing on Travis ppc64le.
See <https://bugs.ruby-lang.org/issues/17926>.
2021-06-02 12:38:27 +02:00
Takashi Kokubun
070caf54d2
Refactor rb_vm_insn_addr2insn calls
It's been a way too much amount of ifdefs.
2021-06-02 01:16:50 -07:00
Takashi Kokubun
c32ce2cbf1
Clarify these are just for MJIT
and not for third-party libraries.

See: e6484a153038703447b50fcac26349249922ab28
2021-06-02 00:09:47 -07:00
Nobuyoshi Nakada
0f97aaa6cf
Suppress false warning by MSVC
https://github.com/ruby/ruby/runs/2707566811#step:10:147
```
D:\a\ruby\ruby\src\mjit_worker.c(1212): warning C4090: 'function': different 'const' qualifiers
```
2021-06-02 13:41:54 +09:00
aycabta
9137caaf45 [ruby/rdoc] Add a dependency on psych gem 4.0.0 or newer
https://github.com/ruby/rdoc/commit/ebe185c877
2021-06-02 11:35:45 +09:00
aycabta
77e1b47729 [ruby/rdoc] Add an alias for test-unit with older versions of RubyGems
https://github.com/ruby/rdoc/commit/b8d68fdd87
2021-06-02 11:35:45 +09:00
git
04a5ee6a23 * 2021-06-02 [ci skip] 2021-06-02 07:25:36 +09:00
Aaron Patterson
f9b9d1c580
Use the current object as the compaction index
Instead of keeping track of the current bit plane, keep track of the
actual slot when compacting.  This means we don't need to re-scan
objects inside the same bit plane when we continue with movement
2021-06-01 15:25:08 -07:00
Nobuyoshi Nakada
9024c7f1bb
Make Thread#native_thread_id not-implemented if unsupported
Raise `NotImplementedError` on unsupported platforms regardless
the argument consistently.
2021-06-01 22:27:13 +09:00
Hiroshi SHIBATA
6e7e9a80ad
Expose assert_all? for ruby/csv repo 2021-06-01 19:38:05 +09:00
S.H
c57610dcd5
Add static modifier to C function in hash.c (#3138)
* add static modifier for rb_hash_reject_bang func

* add static modifier for rb_hash_reject func

* add static modifier for rb_hash_values_at func

* add static modifier for rb_hash_assoc func

* add static modifier for rb_hash_rassoc func
2021-06-01 01:00:45 -07:00
S.H
d627b75e01
Add static modifier to C function in re.c (#3153)
* add static modifier for rb_reg_eqq func

* add static modifier for rb_check_regexp_type func
2021-06-01 00:59:33 -07:00
S.H
b70fdf1b55
Refactor rb_define_class_variable function (#4400) 2021-06-01 00:38:50 -07:00
S.H
588446c39c
Remove unneeded rb_ary_ptr_use_start defination in internal/array.h (#4427) 2021-06-01 00:37:45 -07:00
S.H
45662c54c9
Remove unneeded rb_str_initialize defination in internal/string.h (#4465) 2021-06-01 00:37:24 -07:00
S.H
a2cf0607b0
Refactor rb_class_path_cached function (#4485) 2021-06-01 00:34:56 -07:00
S.H
1055b37ef5
Refactor rb_define_class_variable function (#4492) 2021-06-01 00:32:24 -07:00
Takashi Kokubun
e1b03b0c2b
Enable VM_ASSERT in --jit CIs (#4543) 2021-06-01 00:15:51 -07:00
Takashi Kokubun
0d32a18f5b
Make --without-mjit-tabs work again
vm_sync.{c,h} don't have tabs
2021-05-31 22:56:22 -07:00
Takashi Kokubun
b9019c1ae8
Revert "Try enabling VM_ASSERT in --jit CIs"
This reverts commit e9e3b65d836b5796882b5bf28717e4586366ceec.

We were not ready for it
https://github.com/ruby/ruby/runs/2715306375?check_suite_focus=true
2021-05-31 22:46:56 -07:00
Takashi Kokubun
028f1887c2
Change the default --jit-max-cache to 10000
This is useful for large applications like Rails.
https://k0kubun.medium.com/ruby-3-jit-can-make-rails-faster-756310f235a
2021-05-31 22:01:04 -07:00
Takashi Kokubun
2209e152c0
Decompose the captured_cc code for investigation
I'm investigating SEGVs like https://github.com/ruby/ruby/runs/2715166621?check_suite_focus=true.
Because a lot of things are going on on this line, it's hard to identify
the cause, especially because we can't get the core file of the failures.

Therefore I intentionally increased the number of lines for
investigation.
2021-05-31 21:57:57 -07:00
Takashi Kokubun
e9e3b65d83
Try enabling VM_ASSERT in --jit CIs 2021-05-31 21:50:55 -07:00
git
45651e800b * 2021-06-01 [ci skip] 2021-06-01 13:14:56 +09:00
Takashi Kokubun
07c05b6fe9
Drop JIT_ISEQ_SIZE_THRESHOLD
Compiling everything seems to contributed to improving the final
performance in general. MJIT's compilation is slow anyway, especially
when you need to wait for JIT compaction.

This might make sense for short-time benchmarks like Optcarrot with
default parameters, but it didn't give benefits in my local environment.
2021-05-31 21:12:48 -07:00
aycabta
c9ab8fe2b1 The test for command injection on Unix platforms should be omitted on Windows 2021-05-31 23:34:40 +09:00
Jun Aruga
ff6f4e631c tool/ci_functions.sh: Fix typos and improve the comment. [ci skip] 2021-05-31 16:24:16 +02:00
David Rodríguez
3954799071 Tweak skipped files in bundler gemspec
We won't be using the `extra_rdoc_files` field, because it's very slow
for markdown files.
2021-05-31 21:26:24 +09:00
Hiroshi SHIBATA
cd2190448d
[ruby/net-protocol] Bump version to 0.1.1
https://github.com/ruby/net-protocol/commit/97c4b68528
2021-05-31 17:40:07 +09:00