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

58778 Коммитов

Автор SHA1 Сообщение Дата
git 597ec43543 * 2019-11-08 [ci skip] 2019-11-08 02:31:29 +09:00
John Hawthorn b99833baec
Use a monotonically increasing number for object_id
This changes object_id from being based on the objects location in
memory (or a nearby memory location in the case of a conflict) to be
based on an always increasing number.

This number is a Ruby Integer which allows it to overflow the size of a
pointer without issue (very unlikely to happen in real programs
especially on 64-bit, but a nice guarantee).

This changes obj_to_id_tbl and id_to_obj_tbl to both be maps of Ruby
objects to Ruby objects (previously they were Ruby object to C integer)
which simplifies updating them after compaction as we can run them
through gc_update_table_refs.

Co-authored-by: Aaron Patterson <tenderlove@ruby-lang.org>
2019-11-07 09:31:07 -08:00
Nobuyoshi Nakada d62abc47c8
Suppress unused variable warning 2019-11-07 23:33:45 +09:00
NARUSE, Yui 6aa80d5583 Use FIX2LONG instead of FIX2INT like 26843cbcd0 2019-11-07 18:53:51 +09:00
NARUSE, Yui 26843cbcd0 Use FIX2LONG to avoid unexpected exception
Though it won't happen in the real world in this context, FIX2INT may
raise an exception and it cause to generate extra code.
2019-11-07 18:50:35 +09:00
卜部昌平 d45a013a1a extend rb_call_cache
Prior to this changeset, majority of inline cache mishits resulted
into the same method entry when rb_callable_method_entry() resolves
a method search.  Let's not call the function at the first place on
such situations.

In doing so we extend the struct rb_call_cache from 44 bytes (in
case of 64 bit machine) to 64 bytes, and fill the gap with
secondary class serial(s).  Call cache's class serials now behavies
as a LRU cache.

Calculating -------------------------------------
                           ours         2.7         2.6
vm2_poly_same_method     2.339M      1.744M      1.369M i/s - 6.000M times in 2.565086s 3.441329s 4.381386s

Comparison:
             vm2_poly_same_method
                ours:   2339103.0 i/s
                 2.7:   1743512.3 i/s - 1.34x  slower
                 2.6:   1369429.8 i/s - 1.71x  slower
2019-11-07 17:41:30 +09:00
Hiroshi SHIBATA 3c252651e1
Fixed test failure related Net::Protocol 2019-11-07 17:09:22 +09:00
Hiroshi SHIBATA c916f9600b
SMTP is not module 2019-11-07 16:44:38 +09:00
Hiroshi SHIBATA fc85bdeb77
Promote cgi to default gems 2019-11-07 16:36:14 +09:00
Hiroshi SHIBATA 223d3c460a
Promote net-smtp to default gems 2019-11-07 16:36:14 +09:00
Hiroshi SHIBATA eb0b13596d
Promote net-pop to default gems 2019-11-07 16:36:14 +09:00
Hiroshi SHIBATA 77c94e0dd8
Promote benchmark to default gems 2019-11-07 16:36:14 +09:00
Hiroshi SHIBATA 1159dbf305
Promote delegate to default gems 2019-11-07 16:36:14 +09:00
Hiroshi SHIBATA 3b0bd34001
Promote pstore to default gems 2019-11-07 16:36:14 +09:00
Hiroshi SHIBATA 6797c3e371
Promote getoptlong to default gems 2019-11-07 16:36:14 +09:00
Hiroshi SHIBATA 478f6e2b34
Fixed an Errno::ENOENT with non-test libraries 2019-11-07 16:36:13 +09:00
Kazuki Tsujimoto a396bef8d8
Disallow duplicated pattern variable 2019-11-07 15:40:35 +09:00
Kazuki Tsujimoto 1e620c67af
Add missing semicolon 2019-11-07 13:20:11 +09:00
Aaron Patterson d0d743ad45
Remove duplicate code
These functions are the same, so remove one.

Co-authored-by: John Hawthorn <john@hawthorn.email>
2019-11-06 16:31:55 -08:00
Aaron Patterson e58814d150
Revert "Use a monotonically increasing number for object_id"
This reverts commit bd2b314a05.
2019-11-06 15:12:28 -08:00
John Hawthorn bd2b314a05 Use a monotonically increasing number for object_id
This changes object_id from being based on the objects location in
memory (or a nearby memory location in the case of a conflict) to be
based on an always increasing number.

This number is a Ruby Integer which allows it to overflow the size of a
pointer without issue (very unlikely to happen in real programs
especially on 64-bit, but a nice guarantee).

This changes obj_to_id_tbl and id_to_obj_tbl to both be maps of Ruby
objects to Ruby objects (previously they were Ruby object to C integer)
which simplifies updating them after compaction as we can run them
through gc_update_table_refs.

Co-authored-by: Aaron Patterson <tenderlove@ruby-lang.org>
2019-11-06 14:59:53 -08:00
Hiroshi SHIBATA d1630d41ad
Promote open3 to default gems 2019-11-07 07:16:27 +09:00
Hiroshi SHIBATA fb7fe7f16c
Added rubygems url for published gem 2019-11-07 07:16:27 +09:00
Hiroshi SHIBATA ec2603c353
fallback standard structure library to sync_lib_gem method 2019-11-07 07:16:26 +09:00
Hiroshi SHIBATA 91135f6d29
Promote singleton to default gems 2019-11-07 07:16:26 +09:00
Benoit Daloze 40e161a612 Exclude some clocks on armv8 too
* See https://bugs.ruby-lang.org/issues/16234#note-16
2019-11-06 23:10:15 +01:00
Takashi Kokubun a1be11eb12
Revert "Remove arm64 from allow_failures"
This reverts commit 212f4d49ba.

It worked on PR, but master branch builds have another build issue.
https://travis-ci.org/ruby/ruby/jobs/608303393
2019-11-06 09:53:02 -08:00
Takashi Kokubun 212f4d49ba
Remove arm64 from allow_failures 2019-11-06 09:10:27 -08:00
git 7750edd1e6 * 2019-11-07 [ci skip] 2019-11-07 02:09:00 +09:00
Jun Aruga f5c7fc495a Fix spawn_spec.rb for Travis arm64 environment.
The process group id (/proc/[pid]/stat 5th field) is 0
in the Travis arm64 environment.

This is a case where it is available.

$ cat /proc/4543/stat
4543 (ruby) S 4525 4525 1384 34818 4525 4194304 37443 1754841 0 0 366 105 2291 391 20 0 3 0 1381328 1428127744 11475 18446744073709551615 94195983785984 94195986670225 140728933833312 0 0 0 0 0 1107394127 0 0 0 17 2 0 0 1 0 0 94195987686512 94195987708942 94196017770496 140728933835483 140728933835595 140728933835595 140728933842904 0

This is a case where it is not available in Travis arm64 environment.

$ cat /proc/19179/stat
19179 (ruby) S 19160 0 0 0 -1 4194560 37618 1710547 313 163 770 665 5206 1439 20 0 2 0 17529566 1196347392 10319 18446744073709551615 187650811428864 187650815023116 281474602721280 0 0 0 0 4096 1107390031 0 0 0 17 22 0 0 0 0 0 187650815091456 187650815114064 187651414974464 281474602725080 281474602725211 281474602725211 281474602729420 0

See "man proc" for detail.
2019-11-06 09:08:37 -08:00
Nobuyoshi Nakada 2fd465540f
Numbered parameter is an ID_LOCAL now [Bug #16293] 2019-11-06 12:45:11 +09:00
Nobuyoshi Nakada 82e840ad15
Numbered parameter cannot appear outside block now [Bug #16293] 2019-11-06 12:44:50 +09:00
Nobuyoshi Nakada f72dc407f2
Prohibit calling undefined allocator [Bug #16297] 2019-11-06 11:17:09 +09:00
Kazuhiro NISHIYAMA 5251d18982
Time#strftime does not support `%Q`
```
% ruby -r date -e 't=Time.utc(2001,2,3,4,5,6,7);p t; p [t, t.to_date, t.to_datetime].map{|d|d.strftime("%Q")}'
2001-02-03 04:05:06.000007 UTC
["%Q", "981158400000", "981173106000"]
```
2019-11-06 09:46:48 +09:00
Nobuyoshi Nakada aa94245a09
Undefine MatchData.allocate [Feature #16294] 2019-11-06 08:54:32 +09:00
Aaron Patterson 7460c884fb
Use an identity hash for pinning Ripper objects
Ripper reuses parse.y for its implementation.  Ripper changes the
grammar productions to sometimes return Ruby objects.  This Ruby objects
are put in to the parser's stack, so they must be kept alive.  This is
where the "mark_ary" comes in.  The mark array ensures that Ruby objects
created and pushed on the stack during the course of parsing will stay
alive for the life of the parsing functions.

Unfortunately, Arrays do not prevent their contents from moving.  If the
compactor runs, objects on the parser stack could move because the array
won't prevent them from moving.  But the GC doesn't know about the
parser stack, so it can't update references in that stack (it will
update them in the array).

This commit changes the mark array to be an identity hash.  Since the
identity hash relies on memory addresses for the definition of identity,
the GC will not allow keys in an identity hash to move.  We can prevent
movement of objects in the parser stack by sticking them in an identity
hash.
2019-11-05 08:24:14 -08:00
git d47b643428 * 2019-11-06 [ci skip] 2019-11-06 00:39:55 +09:00
Mark Abraham 07f2062c8f Improve string literal concatenation for C++11
Downstream C++ projects that compile with C++11 or newer and include
the generated config.h file issue compiler warnings. Both C and C++
compilers do string-literal token pasting regardless of whitespace
between the tokens to paste. C++ compilers since C++11 require such
spaces, to avoid ambiguity with the new style of string literals
introduced then. This change fixes such projects without affecting
core Ruby.
2019-11-06 00:31:52 +09:00
aycabta 6aacef4948 Assert return value of Readline.readline only if Ruby is before 2.7 2019-11-05 21:06:29 +09:00
Jeremy Evans c4b627e2da Only taint on Ruby <2.7
Ruby 2.7 deprecates taint and it no longer has an effect.
2019-11-05 20:57:22 +09:00
Jeremy Evans 652800cc09 Only untaint line on Ruby <2.7
Untaint is deprecated and has no effect on Ruby 2.7+.
2019-11-05 20:54:46 +09:00
Nobuyoshi Nakada c6a52cffd1
Separated `@counter` and `@tally` so that "-ft" works with "-j" 2019-11-05 17:43:38 +09:00
Nobuyoshi Nakada fa52a924aa Enable "-f" option in multi_exec mode
Make `MultiFormatter` a module and extend the formatter specified
by "-f" option.
2019-11-05 17:42:35 +09:00
Nobuyoshi Nakada 19f91f7880 `DottedFormatter#finish` consistency
Rmoved optional parameter `printed_exceptions`, and clear
`exceptions` just after printing each exception, instead.
2019-11-05 17:42:35 +09:00
Nobuyoshi Nakada dfb3322d27 `DottedFormatter#state` consistency
Let the method of `DottedFormatter` subclasses have the same
arity.
2019-11-05 17:42:35 +09:00
NARUSE, Yui bea322a352 Revert "[EXPERIMENTAL] Make Symbol#to_s return a frozen String [Feature #16150]"
This reverts commit 6ffc045a81.
2019-11-05 17:30:54 +09:00
Lars Kanis 853d91a04a Fix coroutine support on win32
Ruby master branch currently fails on win32 MINGW at this spec:
https://github.com/ruby/spec/blob/master/core/thread/element_set_spec.rb

MINGW makes use of setjmp3() implemented in MSVCRT.DLL.
This function traverses the SEH list up to a terminating pointer 0xFFFFFFFF.
It therefore currently segfaults on NULL.
The SEH linked list must be terminated by 0xFFFFFFFF instead of NULL.

This fixes the issue mentioned here:
  https://github.com/ruby/ruby/pull/2279#issuecomment-509508810
2019-11-05 15:31:21 +09:00
卜部昌平 7c07300491 let the .bss section initialize static variables
ISO/IEC 9899:1999 section 6.7.8 specifies the values of static
storage which are not explicitly initialized.  According to that
these initializers can be omitted.  Doing so improvoes future
compatibility against addition / deletion of the fields of this
struct.
2019-11-05 13:46:08 +09:00
卜部昌平 6ff1250739 rb_method_basic_definition_p with CC
Noticed that rb_method_basic_definition_p is frequently called.
Its callers include vm_caller_setup_args_block(),
rb_hash_default_value(), rb_num_neative_int_p(), and a lot more.

It seems worth caching the method resolution part.  Majority of
rb_method_basic_definion_p() usages take fixed class and fixed
method id combinations.

Calculating -------------------------------------
                           ours       trunk
           so_matrix      2.379       2.115 i/s -       1.000 times in 0.420409s 0.472879s

Comparison:
                        so_matrix
                ours:         2.4 i/s
               trunk:         2.1 i/s - 1.12x  slower
2019-11-05 11:39:35 +09:00
Nobuyoshi Nakada 1390d56ecf
Set $JOBS to Tests for parallel tests 2019-11-05 10:28:44 +09:00