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

54558 Коммитов

Автор SHA1 Сообщение Дата
nobu d10451f3fd object.c: fix searching nested const paths
* object.c (rb_mod_const_get, rb_mod_const_defined): nested const
  paths should not search from toplevel constants.
  [ruby-core:92202] [Bug #15758]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67472 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-04-08 13:47:37 +00:00
nobu e1b592b508 test_module.rb: fix a typo
* test/ruby/test_module.rb (TestModule#test_nested_get): fix a
  typo.  nested module's name is a qualified path.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67471 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-04-08 13:47:36 +00:00
nobu 7a4c39c5f2 struct.c: force hash values fixable
* struct.c (rb_struct_hash): force hash values fixable on LLP64
  environment.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67470 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-04-08 05:06:43 +00:00
svn b29f55c5ac * 2019-04-08
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67469 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-04-08 03:26:29 +00:00
nobu ae6c195f30 range.c: force hash values fixable
* range.c (range_hash): force hash values fixable on LLP64
  environment.  [ruby-core:92194] [Bug #15757]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67468 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-04-08 03:26:29 +00:00
nobu b5baceda18 range.c: force hash values fixable
* range.c (method_hash): force hash values fixable on LLP64
  environment.  [ruby-core:92191] [Bug #15756]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67467 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-04-08 03:26:28 +00:00
nobu 06eece87c6 enumerator.c: force hash values fixable
* enumerator.c (arith_seq_hash): force hash values fixable on
  LLP64 environment.  [ruby-core:92190] [Bug #15755]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67466 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-04-08 03:26:27 +00:00
eregon 012faccf04 doc/signals.rdoc: Clarify a bit where Signal.trap handlers are executed
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67465 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-04-07 11:26:27 +00:00
nobu b7c4e6d11c gc.c: missing break
* gc.c (obj_memsize_of): T_RATIONAL and T_COMPLEX cannot be an
  imemo.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67464 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-04-07 11:14:06 +00:00
k0kubun 575735664b Add debug message for test_rinda crash
We often see test-all worker crash on test_rinda, but for now we even
can't know which test is unstable from this output:
http://ci.rvm.jp/results/trunk_gcc5@silicon-docker/1926481

Let me print `caller` on the timeout failure.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67463 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-04-07 08:18:09 +00:00
svn 93ecb9a1de * 2019-04-07
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67462 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-04-06 16:03:14 +00:00
k0kubun bbb0db6f1c Fix typo in a comment [ci skip]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67461 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-04-06 16:03:11 +00:00
k0kubun 5a6b0e39a1 Add debug counter for VM <-> MJIT calls
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67460 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-04-06 14:42:02 +00:00
nobu fe979e5bce internal.h: fix potential memory leak
* internal.h (rb_imemo_tmpbuf_auto_free_pointer_new_from_an_RString):
  create tmpbuf to keep the pointer before xmalloc which can raise
  a NoMemoryError exception.  extracted from
  https://github.com/bear-metal/ruby/tree/transient-imemo-tmpbuf

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67459 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-04-06 13:21:18 +00:00
k0kubun f15d043588 Cover all insns in test_jit again
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67458 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-04-06 02:53:32 +00:00
k0kubun feecc10bfc Suppress unnecessary warnings in test_jit
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67457 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-04-06 02:42:30 +00:00
k0kubun 4d1163b182 Resurrect a test dropped in r67442
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67456 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-04-06 02:35:37 +00:00
k0kubun a26d525ae4 appveyor.yml: try porting r67454 to msys2
Trying to fix
https://ci.appveyor.com/project/ruby/ruby/builds/23639998/job/0hm9v79xlryod1ff

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67455 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-04-06 01:25:15 +00:00
nobu b5df5296a4 appveyor.yml: Use pre-generated headers and tables
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67454 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-04-06 00:08:04 +00:00
duerst 50eea44a27 remove Unicode 12.0.0 related directory and generated files
This completes issue #15195.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67453 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-04-05 23:52:15 +00:00
svn 4e78854080 * 2019-04-06
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67452 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-04-05 23:16:03 +00:00
duerst cab005db92 revert r67445, (r67446,) r67447
Debugging output is no longer needed because the problem has been fixed with r67449.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67451 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-04-05 23:16:00 +00:00
nobu 6e0e93e60e downloader.rb: fix typo, extra %
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67450 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-04-05 14:44:15 +00:00
nobu 9dcc6f0810 appveyor.yml: download beta version for test
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67449 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-04-05 14:44:13 +00:00
nobu aebc11dfe6 downloader.rb: quote base name
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67448 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-04-05 12:44:04 +00:00
duerst 8f734dc7b5 output more debug information in downloader.rb (temporary)
Unicode file download doesn't work with Visual Studio, we need more debug output.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67447 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-04-05 12:36:29 +00:00
svn f6338966f1 * remove trailing spaces.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67446 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-04-05 10:39:02 +00:00
duerst 7fd8cdf398 add puts statements to debug Unicode file download (temporary)
Unicode file download doesn't work with Visual Studio, see e.g.
https://ci.appveyor.com/project/ruby/ruby/builds/23614399/job/f8vya2l7fjdfcye4
We temporarily produce more output for debugging.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67445 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-04-05 10:39:01 +00:00
ko1 b2311c6767 `rb_add_method` is void function.
* method.h (rb_add_method): make it void function because
  nobody use a return value.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67444 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-04-05 08:41:04 +00:00
svn 4b53f84326 * expand tabs.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67443 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-04-05 08:15:21 +00:00
ko1 2b5bb8a087 add definemethod/definesmethod insn.
* insns.def: add definemethod and definesmethod (singleton method)
  instructions. Old YARV contains these instructions, but it is moved
  to methods of FrozenCore class because remove number of instructions
  can improve performance for some techniques (static stack caching
  and so on). However, we don't employ these technique and it is hard
  to optimize/analysis definition sequence. So I decide to introduce
  them (and remove definition methods). `putiseq` insn is also removed.

* vm_method.c (rb_scope_visibility_get): renamed to
  `vm_scope_visibility_get()` and make it accept `ec`.
  Same for `vm_scope_module_func_check()`.
  These fixes are result of refactoring `vm_define_method`.

* vm_insnhelper.c (rb_vm_get_cref): renamed to `vm_get_cref`
  because of consistency with other functions.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67442 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-04-05 08:15:11 +00:00
duerst 7fe64d17d3 update to Unicode Version 12.1.0 (beta)
Unicode Version 12.1.0 adds one single character, U+32FF SQUARE ERA NAME REIWA,
for the new Japanese era starting on May 1st. 12.1.0 will be finalized only on
May 7th, so we go with the beta version because further changes in the data we
need are highly unlikely, and we want to make sure Ruby is ready for the new era.

* common.mk: change UNICODE_VERSION to 12.1.0, UNICODE_BETA to YES

* enc/unicode/12.1.0, enc/unicode/12.1.0/casefold.h, enc/unicode/12.1.0/name2ctype.h:
  add directory and generated data files for new version

* lib/unicode_normalize/tables.rb: update for new character

* test/ruby/test_regexp.rb: add test for character property age=12.1

* test/test_unicode_normalize.rb: add test for NFKC decomposition of new character

This (mostly) completes issue #15195.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67441 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-04-05 00:58:51 +00:00
svn c8d60fddc0 * 2019-04-05
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67440 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-04-04 23:40:51 +00:00
duerst c604219e8d change lib/unicode_normalize/tables.rb to single item per line to make diffs shorter
* template/unicode_norm_gen.tmpl: Change formatting of output to produce only a
  single item (or range) for each line to make future diffs shorter and easier
  to understand and check.

* lib/unicode_normalize/tables.rb: output of the above

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67439 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-04-04 23:40:48 +00:00
nobu 59a37c0283 gmake.mk: get rid of unicode normalization table timestamp
* common.mk, defs/gmake.mk: rid of unicode normalization tables
  timestamp.  update the target tables file only when only it
  exists.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67438 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-04-04 12:11:53 +00:00
nobu 6f015efc64 iseq.h: Remove dead members
* iseq.h (struct iseq_compile_data): Remove the dead ensure_node
  and for_iseq members.

[Fix GH-2108]

From: Lourens Naudé <lourens@bearmetal.eu>

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67437 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-04-04 05:26:11 +00:00
nobu 6faf266893 gmake.mk: update normalization table
* defs/gmake.mk: try to update Unicode normalization tables file
  if Unicode data files exist.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67436 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-04-04 05:10:26 +00:00
mrkn f1fb989f1a enumerator.c: make arith_seq_first support nil begin
* enumerator.c: (arith_seq_first): support nil begin.

* test/ruby/test_arithmetic_sequence.rb (test_first): add assertions for
  beginless and endless arithmetic sequences.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67435 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-04-04 03:34:55 +00:00
mrkn 53d3fe0643 ruby/test_arithmetic_sequence.rb: add assertions for beginless and endless ranges
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67434 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-04-04 03:34:53 +00:00
mrkn dcb37d0639 range.c: support to make beginless arithmetic sequences
* range.c (range_step): fix the guard condition so that a beginless
  range can be turned into a beginless arithmetic sequence.

* test/ruby/test_range.rb (test_step): add assertions for the above
  change.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67433 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-04-04 03:34:52 +00:00
svn e590173547 * expand tabs.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67432 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-04-04 01:34:56 +00:00
k0kubun 22fd30e605 Revert "Introduce inline cache for invokesuper"
This reverts commit d147ad6231.

because failing on CI:
http://ci.rvm.jp/results/trunk-mjit@silicon-docker/1916925

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67431 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-04-04 01:34:53 +00:00
svn e896292d64 * 2019-04-04
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67430 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-04-03 16:06:06 +00:00
k0kubun d147ad6231 Introduce inline cache for invokesuper
Looks good in micro benchmark:
```
$ benchmark-driver benchmark/vm2_super.yml -v --rbenv 'before;after'
before: ruby 2.7.0dev (2019-04-03 trunk 67428) [x86_64-linux]
after: ruby 2.7.0dev (2019-04-03 trunk 67428) [x86_64-linux]
last_commit=Introduce inline cache for invokesuper
Calculating -------------------------------------
                         before       after
           vm2_super    19.265M     31.280M i/s -      6.000M times in 0.311447s 0.191813s

Comparison:
                        vm2_super
               after:  31280464.2 i/s
              before:  19264906.2 i/s - 1.62x  slower
```

No significant impact to Optcarrot:
```
$ benchmark-driver benchmark.yml --rbenv='before;after' -v --output=all --repeat-count=12
before: ruby 2.7.0dev (2019-04-03 trunk 67428) [x86_64-linux]
after: ruby 2.7.0dev (2019-04-03 trunk 67428) [x86_64-linux]
last_commit=Introduce inline cache for invokesuper
Calculating -------------------------------------
                                       before                 after
Optcarrot Lan_Master.nes    48.41126024010233     47.28027196127746 fps
                            49.49212664510990     48.75072555488074
                            49.51485564376117     49.20650895701073
                            49.58351773328487     49.24563592659139
                            49.64022392458479     49.26292753046641
                            49.92566235019630     49.44496216868009
                            50.18022198879376     49.45467429762771
                            50.33038373991723     49.52003367348857
                            50.43202877523305     49.69190055704068
                            50.61368587766504     49.79856204866324
                            50.77975014460643     50.27764769510704
                            50.89807360753746     50.35785776505005
```

A little improvement to k0kubun/railsbench?:
```
$ rbenv shell before; RUBYOPT="-v" WARMUP=1 BENCHMARK=30000 bin/bench
ruby 2.7.0dev (2019-04-03 trunk 67428) [x86_64-linux]
Warmup: 1 requests
Benchmark: 30000 requests

Request per second: 897.1 [#/s] (mean)

Percentage of the requests served within a certain time (ms)
  50%    1.01
  66%    1.02
  75%    1.03
  80%    1.04
  90%    1.08
  95%    1.23
  98%    2.10
  99%    5.52
 100%   13.26

$ rbenv shell after; RUBYOPT="-v" WARMUP=1 BENCHMARK=30000 bin/bench
ruby 2.7.0dev (2019-04-03 trunk 67428) [x86_64-linux]
last_commit=Introduce inline cache for invokesuper
Warmup: 1 requests
Benchmark: 30000 requests

Request per second: 913.0 [#/s] (mean)

Percentage of the requests served within a certain time (ms)
  50%    0.99
  66%    1.00
  75%    1.01
  80%    1.02
  90%    1.06
  95%    1.20
  98%    2.12
  99%    5.57
 100%   12.39
```

No significant impact to discourse:
```
* before
categories_admin:
  50: 54
  75: 60
  90: 70
  99: 86
home_admin:
  50: 56
  75: 65
  90: 71
  99: 122
topic_admin:
  50: 64
  75: 73
  90: 79
  99: 117
categories:
  50: 32
  75: 33
  90: 46
  99: 61
home:
  50: 34
  75: 36
  90: 48
  99: 56
topic:
  50: 40
  75: 42
  90: 55
  99: 83

* after
categories_admin:
  50: 59
  75: 66
  90: 80
  99: 149
home_admin:
  50: 54
  75: 58
  90: 70
  99: 96
topic_admin:
  50: 63
  75: 66
  90: 79
  99: 115
categories:
  50: 31
  75: 32
  90: 45
  99: 65
home:
  50: 34
  75: 35
  90: 49
  99: 58
topic:
  50: 40
  75: 42
  90: 55
  99: 78
```

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67429 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-04-03 16:06:03 +00:00
k0kubun 2482d1f9e6 Partially allow failures in test-bundled-gems
Tests of minitest randomly fails with strange errors:
https://dev.azure.com/rubylang/ruby/_build/results?buildId=303
https://dev.azure.com/rubylang/ruby/_build/results?buildId=314

Instead of marking `continueOnError` for all, let me select
failure-allowed gems individually.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67428 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-04-03 12:48:02 +00:00
k0kubun f4a1235abe vs2019 build is not functional now
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67427 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-04-03 11:16:47 +00:00
svn a6146af5bd * expand tabs.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67426 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-04-03 10:56:37 +00:00
nobu 1329c7cdca date: make zone a substring to copy encoding and taintedness
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67425 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-04-03 10:56:36 +00:00
kazu f0204a2547 Revive accidentally removed assertion
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67424 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-04-03 09:35:26 +00:00
mame d4319541e8 range.c (r_cover_range_p): support beginless range
`(..2).cover?(..1)` should return true.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67423 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-04-03 08:35:57 +00:00