aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Add specs that #caller and #caller_locations include core library methods ↵Benoit Daloze2020-10-262-0/+24
| | | | defined in Ruby
* Update to ruby/spec@b164536Benoit Daloze2020-10-261-0/+57
|
* Remove spec which is too difficult to get working with various compilersBenoit Daloze2020-10-262-14/+0
| | | | * The spec means to use an actual system library function, not a wrapper.
* [DOC] Expanded glob patterns for Dir.globNobuyoshi Nakada2020-10-261-9/+5
| | | | | No longer need to get rid of C block comments in builtin ruby script comments.
* Include c_escape.rb in COMPILE_PRELUDENobuyoshi Nakada2020-10-261-1/+2
| | | | template/prelude.c.tmpl requires tool/ruby_vm/helpers/c_escape.rb.
* Escape '/*' within block comment tooNobuyoshi Nakada2020-10-261-1/+1
|
* Use gcc-specific pragma only on gcc (and the family)Nobuyoshi Nakada2020-10-261-0/+2
|
* Fix bootstrap-test error in previous commitJeremy Evans2020-10-252-2/+2
|
* Use 'shareable' with an 'e' [ci skip]Marc-Andre Lafortune2020-10-251-8/+8
|
* * 2020-10-26 [ci skip]git2020-10-261-1/+1
|
* Tweak a few Ractor tests that were missing comments [ci skip]Marc-Andre Lafortune2020-10-251-0/+4
|
* Remove trailing whitespace [ci skip]Marc-Andre Lafortune2020-10-251-1/+1
|
* Fix compilation on MSVCNobuyoshi Nakada2020-10-251-9/+4
| | | | | * cast scalar value instead of function * use `rb_pid_t` for the portability
* [DOC] refined "**" description in `Dir.glob` [ci skip]Nobuyoshi Nakada2020-10-251-1/+1
| | | | | As same as the description for `File.fnmatch`. [Bug #17283]
* * 2020-10-25 [ci skip]git2020-10-251-1/+1
|
* Try to fix compilation on MSVCBenoit Daloze2020-10-251-0/+6
|
* Update to ruby/spec@4f59d86Benoit Daloze2020-10-2447-61/+725
|
* Update to ruby/mspec@b56e7a2Benoit Daloze2020-10-242-2/+16
|
* * 2020-10-24 [ci skip]git2020-10-241-1/+1
|
* Tweaks for the ruby/spec workflowBenoit Daloze2020-10-241-5/+4
|
* numeric.c, range.c: prohibit zero stepKenta Murata2020-10-239-80/+124
| | | | | | | | | * numeric.c: prohibit zero step in Numeric#step * range.c: prohibit zero step in Range#step * Fix ruby-spec [Feature #15573]
* Assert in_gc >= 0 instead of guarding it (#3687)Takashi Kokubun2020-10-221-3/+1
|
* .github/workflows/spec_guards.yml add卜部昌平2020-10-232-24/+40
| | | | Translate a part of .travis.yml into GitHub Actions workflow.
* mutete -> mutateAlan Wu2020-10-221-1/+1
|
* Fix small typo in comment in lib/irb.cAndrew Kerr2020-10-221-1/+1
|
* * 2020-10-23 [ci skip]git2020-10-231-1/+1
|
* Revert "Add assertions when inline caches are copied to MJIT"Aaron Patterson2020-10-221-11/+0
| | | | | | | | This reverts commit 6cb6d5abc36ede9d5158c2cd90734134838e6bfb. This reverts commit 1484b786aee8d411a9e2278ac6d6e44aedbf6662. I think we don't need these assertions anymore. I believe the problem is solved by abf678a4397c6c00a1bb686043e377d372e695a4
* Use a lock level for a less granular lock.Aaron Patterson2020-10-223-6/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | We are seeing an error where code that is generated with MJIT contains references to objects that have been moved. I believe this is due to a race condition in the compaction function. `gc_compact` has two steps: 1. Run a full GC to pin objects 2. Compact / update references Step one is executed with `garbage_collect`. `garbage_collect` calls `gc_enter` / `gc_exit`, these functions acquire a JIT lock and release a JIT lock. So a lock is held for the duration of step 1. Step two is executed by `gc_compact_after_gc`. It also holds a JIT lock. I believe the problem is that the JIT is free to execute between step 1 and step 2. It copies call cache values, but doesn't pin them when it copies them. So the compactor thinks it's OK to move the call cache even though it is not safe. We need to hold a lock for the duration of `garbage_collect` *and* `gc_compact_after_gc`. This patch introduces a lock level which increments and decrements. The compaction function can increment and decrement the lock level and prevent MJIT from executing during both steps.
* rational.c: try converting by to_int in Rational() (#3684)Kenta Murata2020-10-222-3/+50
| | | [Bug #12485]
* refactoring obj_traverse_iKoichi Sasada2020-10-221-29/+34
|
* allow to access ivars of frozen shareable objectsKoichi Sasada2020-10-222-1/+14
| | | | | | Accessing a shareable object is prohibitted because it can cause race condition, but if the shareable object is frozen, there is no problem to access ivars.
* * 2020-10-22 [ci skip]git2020-10-221-1/+1
|
* refactoring frozen_shareable_pKoichi Sasada2020-10-211-10/+6
|
* refactoring rb_obj_traverse()Koichi Sasada2020-10-211-37/+43
| | | | | | * create rec check hash lazily * do not pass *data pointer for enter/leave function because it is not used.
* refactoring rb_ractor_confirm_belonging()Koichi Sasada2020-10-211-3/+8
| | | | | | rb_ractor_belonging() returns 0 only if it has sharable flag. rb_ractor_confirm_belonging() checks rb_ractor_shareable_p() if the belonging ractor id is different from current ractor id.
* check main-ractor or not firstKoichi Sasada2020-10-211-2/+3
| | | | | On non-multi-ractor-mode, the cost of rb_ractor_main_p() is low so check it first.
* test/json/json_parser_test.rb: suppress warningsYusuke Endoh2020-10-211-2/+2
| | | | | | | | http://rubyci.s3.amazonaws.com/ubuntu/ruby-master/log/20201021T123003Z.log.html.gz ``` /home/chkbuild/chkbuild/tmp/build/20201021T123003Z/ruby/test/json/json_parser_test.rb:227: warning: ambiguous first argument; put parentheses or a space even after `-' operator /home/chkbuild/chkbuild/tmp/build/20201021T123003Z/ruby/test/json/json_parser_test.rb:228: warning: ambiguous first argument; put parentheses or a space even after `-' operator ```
* extend timeout of rbs test on rbs testsKoichi Sasada2020-10-211-1/+4
|
* Ractor-safe rb_objspace_reachable_objects_fromKoichi Sasada2020-10-212-77/+88
| | | | | | | | | | rb_objspace_reachable_objects_from(obj) is used to traverse all reachable objects from obj. This function modify objspace but it is not ractor-safe (thread-safe). This patch fix the problem. Strategy: (1) call GC mark process during_gc (2) call Ractor-local custom mark func when !during_gc
* Removed more unnecessary ID cachesNobuyoshi Nakada2020-10-211-53/+54
| | | | | | | | | | ``` find . -name \*.o -exec nm {} + |& grep -e 'InitVM_.*\.rbimpl_id' -e 'Init_.*\.rbimpl_id' | sed 's/^.* b //;s/\.[1-9][0-9]*$//;s/\.rbimpl_id$//' | uniq ``` should be empty.
* Use rb_intern_const instead of rb_intern in Init functionsNobuyoshi Nakada2020-10-217-42/+42
| | | | | | | | | ``` find . -name \*.o -exec nm {} + |& sed '/Init_.*\.rbimpl_id/!d;s/^.* b //;s/\.[1-9][0-9]*$//;s/\.rbimpl_id$//' | uniq ``` should be empty.
* Don't redefine #rb_intern over and over againStefan Stüben2020-10-2123-241/+180
|
* Update dependencies for macOSNobuyoshi Nakada2020-10-215-52/+860
|
* Check dependencies on macOS tooNobuyoshi Nakada2020-10-211-1/+12
|
* Calculate transient heap block usable size at compile timeJacob Matthews2020-10-211-6/+5
|
* .github: reduce copy&paste卜部昌平2020-10-217-70/+40
| | | | Found that we can set default working directory for github actions.
* .travis.yml: reduce redundant tests卜部昌平2020-10-211-173/+0
| | | | These tests are (more or less) covered by github actions now.
* Ractor.make_shareable(obj)Koichi Sasada2020-10-217-125/+384
| | | | | | | | | | | | | | | | | | | | | | | | | | Introduce new method Ractor.make_shareable(obj) which tries to make obj shareable object. Protocol is here. (1) If obj is shareable, it is shareable. (2) If obj is not a shareable object and if obj can be shareable object if it is frozen, then freeze obj. If obj has reachable objects (rs), do rs.each{|o| Ractor.make_shareable(o)} recursively (recursion is not Ruby-level, but C-level). (3) Otherwise, raise Ractor::Error. Now T_DATA is not a shareable object even if the object is frozen. If the method finished without error, given obj is marked as a sharable object. To allow makng a shareable frozen T_DATA object, then set `RUBY_TYPED_FROZEN_SHAREABLE` as type->flags. On default, this flag is not set. It means user defined T_DATA objects are not allowed to become shareable objects when it is frozen. You can make any object shareable by setting FL_SHAREABLE flag, so if you know that the T_DATA object is shareable (== thread-safe), set this flag, at creation time for example. `Ractor` object is one example, which is not a frozen, but a shareable object.
* * 2020-10-21 [ci skip]git2020-10-211-1/+1
|
* Feature #16812: Allow slicing arrays with ArithmeticSequence (#3241)Kenta Murata2020-10-216-31/+216
| | | | | | | | | | | | | | | | | * Support ArithmeticSequence in Array#slice * Extract rb_range_component_beg_len * Use rb_range_values to check Range object * Fix ary_make_partial_step * Fix for negative step cases * range.c: Describe the role of err argument in rb_range_component_beg_len * Raise a RangeError when an arithmetic sequence refers the outside of an array [Feature #16812]