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

545 Коммитов

Автор SHA1 Сообщение Дата
Koichi Sasada 7ad3aff48d Ractor#close_outgoping cancel Ractor.yield
Ractor#close_outgoing should cancel waiting Ractor.yield. However,
yield a value by the Ractor's block should not cancel (to recognize
terminating Ractor, introduce rb_ractor_t::yield_atexit flag).
2020-09-25 00:25:38 +09:00
Michael Lindley e06f4a3b1f Remove test for putiseq insn
putiseq was removed from instruction set in 2b5bb8a0
2020-09-24 09:56:12 +09:00
Quang-Minh Nguyen be2efb118f Fulfill missing tests and stabilize tests 2020-09-20 23:10:44 +09:00
Quang-Minh Nguyen 398da71175 Validate name during initialization 2020-09-20 23:10:44 +09:00
Quang-Minh Nguyen d5fa66156a Add status to Ractor#inspect 2020-09-20 23:10:44 +09:00
Benoit Daloze 9b535f3ff7 Interpolated strings are no longer frozen with frozen-string-literal: true
* Remove freezestring instruction since this was the only usage for it.
* [Feature #17104]
2020-09-15 21:32:35 +02:00
Koichi Sasada e81d7189a0 sync fstring pool
fstring pool should be sync with other Ractors.
2020-09-15 00:04:59 +09:00
Kazuhiro NISHIYAMA 3bdf8efd81
Fix typos [ci skip] 2020-09-13 12:35:06 +09:00
Koichi Sasada 3f922f3b77 don't use toplevel return
Toplevel return is supported after Ruby 2.4, so don't use it
for older BASERUBY.
2020-09-04 04:07:34 +09:00
Koichi Sasada b52513e2a1 skip Ractor tests on Compiler tests
This implementation has memory corruption errors so and
it causes BUG on rare occasions. This commit skips
suspect tests on Github actions Compiler tests.
2020-09-03 21:11:06 +09:00
Koichi Sasada 79df14c04b Introduce Ractor mechanism for parallel execution
This commit introduces Ractor mechanism to run Ruby program in
parallel. See doc/ractor.md for more details about Ractor.
See ticket [Feature #17100] to see the implementation details
and discussions.

[Feature #17100]

This commit does not complete the implementation. You can find
many bugs on using Ractor. Also the specification will be changed
so that this feature is experimental. You will see a warning when
you make the first Ractor with `Ractor.new`.

I hope this feature can help programmers from thread-safety issues.
2020-09-03 21:11:06 +09:00
Koichi Sasada ed22bf47cc display stderr output even if core dump files
On btest, stderr messages are not displayed if core files are
generated. There is no reason to skip it, so this patch display
stderr and check core files.
2020-07-29 18:45:39 +09:00
Takashi Kokubun e544a3a23c
Remove obsoleted opt_call_c_function insn (#3232)
* Remove obsoleted opt_call_c_function insn

* Keep opt_call_c_function with DEFINE_INSN_IF
2020-06-17 09:16:01 -07:00
Jeremy Evans f3e927b0cc Make proc/Proc.new without block an error instead of warning
The warning for these was added in 2.7.
2020-06-10 17:49:54 -07:00
Nobuyoshi Nakada 6009790e40
Moved already resolved test
Couldn't figure out failed/fixed versions.
2020-04-27 10:39:07 +09:00
Nobuyoshi Nakada c180c58fc1
Removed already resolved test [ci skip]
That bug has been fixed by ec0c394b9e, and the test has been
added by 181ffea5e0.
2020-04-27 10:39:07 +09:00
Nobuyoshi Nakada a9567cc2bf Added test for `debug_level:` option of `RubyVM::InstructionSequence.compile` 2020-04-15 16:06:48 +09:00
Jeremy Evans 900e83b501 Turn class variable warnings into exceptions
This changes the following warnings:

* warning: class variable access from toplevel
* warning: class variable @foo of D is overtaken by C

into RuntimeErrors.  Handle defined?(@@foo) at toplevel
by returning nil instead of raising an exception (the previous
behavior warned before returning nil when defined? was used).

Refactor the specs to avoid the warnings even in older versions.
The specs were checking for the warnings, but the purpose of
the related specs as evidenced from their description is to
test for behavior, not for warnings.

Fixes [Bug #14541]
2020-04-10 00:29:05 -07:00
Koichi Sasada fd0222caed should check pending interrupts correctly.
rb_uninterruptible() disables any interrupts using handle_interrupt
feature (This function is used by `p`).
After this function, pending interrupts should be checked correctly,
however there is no chance to setup interrupt flag of working
threads, it means that nobody checks pending interrupts.
For example, it ignores terminate signal delivered at the end
of main thread and program can't stop.

This patch set interrupt flag if there are pending interrupts.
2020-04-09 12:51:51 +09:00
Koichi Sasada 21d8e69248 disable to show the maximum number of threads.
On Deiban 9 environment, the thread tests failed and
this maximum threads information can finish up the machine
resources. To check it, I turned-off showing this information.
2020-03-23 11:32:20 +09:00
Jeremy Evans 7a288df7b8 Make yield in singleton class definitions in methods a SyntaxError
This behavior was deprecated in 2.7 and scheduled to be removed
in 3.0.

Calling yield in a class definition outside a method is now a
SyntaxError instead of a LocalJumpError, as well.
2020-02-11 12:44:23 -08: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
Nobuyoshi Nakada 93b27c69cc
Show the failed message too 2019-12-12 23:26:35 +09:00
Nobuyoshi Nakada 0afee4d803
Show the failed message 2019-12-11 14:27:21 +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
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
Nobuyoshi Nakada 801a11d0ab
Relaxed tests for CPDEBUG mode 2019-10-23 01:05:52 +09:00
卜部昌平 9b919885a0 fix memory corruption in old GCC
This typo introduced memory corruption when __builtin_add_overflow
is not available but uint128_t is.  GCC before 5 are one of such
situatins.

See also https://rubyci.org/logs/rubyci.s3.amazonaws.com/opensuseleap/ruby-master/log/20191009T120004Z.log.html.gz
2019-10-10 00:13:30 +09:00
Nobuyoshi Nakada ea68bb914a Changed numbered parameter prefix 2019-09-24 21:57:54 +09:00
卜部昌平 436099ee04 add tests
Some coverage improvements.
2019-09-05 15:02:44 +09:00
Takashi Kokubun fb67d4fc77
Move an unstable bootstraptest to pending
This has been unstable on AppVeyor mswin since the introduction
3fd83cb6fc.
https://ci.appveyor.com/project/ruby/ruby/builds/27103307/job/j7xwjmsos2k22cck

Let's have it in pending.rb to be fixed.
2019-09-03 21:49:52 +09:00
Takashi Kokubun 1a5a01e9ce
Add insn tests for newarraykwsplat 2019-09-03 01:39:00 +09:00
Takashi Kokubun c69545ae32
Fix opt_regexpmatch1 references 2019-09-02 14:33:37 +09:00
Jeremy Evans 856bb3c35d Fix remaining warning issues in the tests due to keyword argument separation 2019-08-30 12:39:31 -07:00
Nobuyoshi Nakada 8827697ec4
Compare actual result 2019-08-14 00:23:19 +09:00
Kazuhiro NISHIYAMA 2eec526053
bootstraptest/test_insns.rb: test opt_nil_p 2019-08-01 20:34:31 +09:00
Nobuyoshi Nakada c2428b8bf6
Erase only on tty 2019-07-29 23:05:41 +09:00
Samuel Williams 012e954b47
Improved fiber benchmarks. Increase number of iterations. 2019-07-12 11:56:51 +12:00
Nobuyoshi Nakada f47254d216
colors file has been moved from test to tool 2019-07-02 09:19:38 +09:00
Nobuyoshi Nakada 7f4f40ab31
bootstraptest/runner.rb (show_limit): defer messages unless verbose and a tty 2019-07-01 17:09:08 +09:00
Nobuyoshi Nakada fe03bbaf34
bootstraptest/runner.rb (show_limit): show dots only when printing to a tty 2019-07-01 10:16:47 +09:00
git cbe06cd350 * remove trailing spaces, expand tabs. 2019-06-19 17:39:58 +09:00
Samuel Williams 69195fd9b2 Show thread and fiber limits as part of bootstrap tests. 2019-06-19 20:39:10 +12:00
Samuel Williams 3fd83cb6fc Improve benchmarks and tests for threads. 2019-06-19 20:39:10 +12:00
nobu 12acc751e3 Numbered parameters [Feature #4475]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67278 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-03-17 05:21:18 +00:00
shyouhei 232f31ca12 on-smash canary detection
In addition to detect dead canary, we try to detect the very moment
when we smash the stack top.  Requested by k0kubun:
https://twitter.com/k0kubun/status/1085180749899194368


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66981 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-02-01 07:26:39 +00:00
nobu 62ec5eb018 parse.y: more token names
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66896 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-01-21 10:24:56 +00:00
naruse e90d826de7 Indented here document (<<~) is Ruby 2.3 feature
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66871 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-01-19 07:49:47 +00:00
ko1 b4ab9c0e32 support older BASERUBY for btest.
* bootstraptest/test_insns.rb: check RbConfig::LIMITS to support
  older BASERUBY.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66860 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-01-18 02:04:41 +00:00