76448 Commits

Author SHA1 Message Date
Takashi Kokubun
e750e1e3ee Fix build without libcapstone 2023-03-05 22:11:20 -08:00
Takashi Kokubun
dfa19a1658 Properly return a value from the stack as well 2023-03-05 22:11:20 -08:00
Takashi Kokubun
145c937f3f Compile putnil properly 2023-03-05 22:11:20 -08:00
Takashi Kokubun
8deb0438c4 Remove debugging code 2023-03-05 22:11:20 -08:00
Takashi Kokubun
e60fc8c2ff Encode add insn properly 2023-03-05 22:11:20 -08:00
Takashi Kokubun
396d575451 Implement mov encoding properly 2023-03-05 22:11:20 -08:00
Takashi Kokubun
2700d35b7b Split responsibilities differently 2023-03-05 22:11:20 -08:00
Takashi Kokubun
d9c2eb6f42 Move modules around 2023-03-05 22:11:20 -08:00
Takashi Kokubun
6fc336fedc Compile a real return value 2023-03-05 22:11:20 -08:00
Takashi Kokubun
3fa4d41460 Implement --mjit-dump-disasm 2023-03-05 22:11:20 -08:00
Takashi Kokubun
fd04e1b4db Implement a no-op JIT compiler 2023-03-05 22:11:20 -08:00
Takashi Kokubun
baa120ee80 Prepare a JIT buffer 2023-03-05 22:11:20 -08:00
Takashi Kokubun
9c2f612017 Prepare for compiling an ISEQ 2023-03-05 22:11:20 -08:00
Takashi Kokubun
40ffc1e0f4 Drop existing MJIT tests 2023-03-05 22:11:20 -08:00
Takashi Kokubun
3d19db4f8b Use call-threshold 1 for now 2023-03-05 22:11:20 -08:00
Takashi Kokubun
251f976235 Prepare rb_mjit_compile hook 2023-03-05 22:11:20 -08:00
Takashi Kokubun
3c093fe391 Move important functions 2023-03-05 22:11:20 -08:00
Takashi Kokubun
c263ce9c80 Remove more code 2023-03-05 22:11:20 -08:00
Takashi Kokubun
5d819b9a15 Clean up the current MJIT implementation 2023-03-05 22:11:20 -08:00
git
55367b3bd7 Update bundled gems list at e87d0882910001ef3b0c2ccd43bf00 [ci skip] 2023-03-06 06:04:03 +00:00
Koichi Sasada
e87d088291 Change bytecode of f(*a, **kw)
`f(*a, **kw)` is compiled to `f([*a, kw])` but it makes an dummy
array, so change it to pass two arguments `a` and `kw` with calling
flags.

```
ruby 3.2.0 (2022-12-29 revision a7d467a792) [x86_64-linux]
Calculating -------------------------------------
               foo()     15.354M (± 4.2%) i/s -     77.295M in   5.043650s
              dele()     13.439M (± 3.9%) i/s -     67.109M in   5.001974s
             dele(*)      6.265M (± 4.5%) i/s -     31.730M in   5.075649s
            dele(*a)      6.286M (± 3.3%) i/s -     31.719M in   5.051516s
      dele(*a, **kw)      1.926M (± 4.5%) i/s -      9.753M in   5.076487s
         dele(*, **)      1.927M (± 4.2%) i/s -      9.710M in   5.048224s
           dele(...)      5.871M (± 3.9%) i/s -     29.471M in   5.028023s
         forwardable      4.969M (± 4.1%) i/s -     25.233M in   5.087498s

ruby 3.3.0dev (2023-01-13T01:28:00Z master 7e8802fa5b) [x86_64-linux]
Calculating -------------------------------------
               foo()     16.354M (± 4.7%) i/s -     81.799M in   5.014561s
              dele()     14.256M (± 3.5%) i/s -     71.656M in   5.032883s
             dele(*)      6.701M (± 3.8%) i/s -     33.948M in   5.074938s
            dele(*a)      6.681M (± 3.3%) i/s -     33.578M in   5.031720s
      dele(*a, **kw)      4.200M (± 4.4%) i/s -     21.258M in   5.072583s
         dele(*, **)      4.197M (± 5.3%) i/s -     21.322M in   5.096684s
           dele(...)      6.039M (± 6.8%) i/s -     30.355M in   5.052662s
         forwardable      4.788M (± 3.2%) i/s -     24.033M in   5.024875s
```
2023-03-06 15:03:06 +09:00
tomoya ishida
0463c5806a [ruby/irb] Improve method completion for string and regexp that
includes word break characters
(https://github.com/ruby/irb/pull/523)

* Improve method completion for string and regexp that includes word break characters

* Remove completion-test's assert_not_include because candidates no longer include every possible methods

* Add comment about string's method completion regexp

Co-authored-by: Stan Lo <stan001212@gmail.com>

* Add comment about regexp's method completion regexp

Co-authored-by: Stan Lo <stan001212@gmail.com>

---------

https://github.com/ruby/irb/commit/aa8128c533

Co-authored-by: Stan Lo <stan001212@gmail.com>
2023-03-06 05:52:46 +00:00
Hiroshi SHIBATA
62e2b61607
Replaced non-ascii charactor. It fails version detection at net-http.gemspec.
>#   Returns the X509 certificate chain for the session<E2><80><99>s socket peer.
2023-03-06 14:50:53 +09:00
Takashi Kokubun
760fe0a78a Disable test-spec as well for annocheck
https://github.com/ruby/ruby/actions/runs/4340193212/jobs/7578505652
2023-03-05 21:27:05 -08:00
Takashi Kokubun
5d35b4b0e1 Skip test-all for annocheck
It started to fail since totally unrelated changes. It suddenly gets
killed by SIGTERM only on this environment:
https://github.com/ruby/ruby/actions/runs/4340112185/jobs/7578344307

For now, we have no idea how to fix this, so let me skip this until we
figure it out.
2023-03-05 21:12:00 -08:00
Takashi Kokubun
f5b6b3dba7
Split a workflow for annocheck (#7450)
It's not really about different compilers. It seems confusing to have
this in compilers.yml.

This change only forks the entire workflow and modifies only matrix
entries.
2023-03-05 21:10:31 -08:00
Nobuyoshi Nakada
a5310e609d [DOC] Fix options of Regexp#initialize
`Integer#|` is bit-wise OR operator, not logical OR.
2023-03-06 13:57:17 +09:00
Nobuyoshi Nakada
8ee604b9d4 rb_scan_args never fills optional arguments with Qundef 2023-03-06 13:57:17 +09:00
Koichi Sasada
883871d722 add a test for Ractor
Ractor should take care method cache invalidation.
Added test will miss method cache on each method call.
2023-03-06 13:30:54 +09:00
Hiroshi SHIBATA
f70b46dbc7
More debug for 75829f4d37d31658aeebd9799b513e35fea805e0 2023-03-06 13:01:54 +09:00
Hiroshi SHIBATA
75829f4d37
Added debug message for http://rubyci.s3.amazonaws.com/freebsd12/ruby-master/log/20230306T023004Z.fail.html.gz#dist 2023-03-06 12:45:05 +09:00
dependabot[bot]
7fcb782e2d Bump ruby/setup-ruby from 1.139.0 to 1.143.0
Bumps [ruby/setup-ruby](https://github.com/ruby/setup-ruby) from 1.139.0 to 1.143.0.
- [Release notes](https://github.com/ruby/setup-ruby/releases)
- [Commits](92aece5fc9...31a7f6d628)

---
updated-dependencies:
- dependency-name: ruby/setup-ruby
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-03-06 12:39:18 +09:00
Hiroshi SHIBATA
5ad81e6627
Revert "Update bundled gems list at 2023-03-06"
This reverts commit 84150e6901ad0599d7bcbab34aed2f20235959ff.
2023-03-06 10:42:50 +09:00
Hiroshi SHIBATA
38831ae290
Introduce UPDATE_BUNDLED_GEMS_ALL option for auto update for bundled_gems file
We used `url` field for testing via git clone. Because `Gem::Specification#homepage` or
  `Gem::Specification#metadata` could assign non-git url. Unfotunately, We should specify
  clone URL for testing.
2023-03-06 10:42:36 +09:00
git
84150e6901 Update bundled gems list at 2023-03-06 2023-03-06 00:49:09 +00:00
Hiroshi SHIBATA
848b55ad8f
minitest moved minitest org from seattlerb now 2023-03-06 09:34:54 +09:00
Hiroshi SHIBATA
0c9a2ce6e0 [rubygems/rubygems] Build default gems same as fresh installtion.
Current implementation tried to build installation artifact. But default gems
  didn't provide normal gem files. So, It's always build failure.

  https://github.com/ruby/bigdecimal/actions/runs/4269574995/jobs/7432842788

    ERROR:  Error installing pkg/bigdecimal-3.1.4.gem:
    ERROR: Failed to build gem native extension.

    No such file or directory @ dir_s_mkdir - /Users/runner/.rubies/ruby-head/lib/ruby/gems/3.3.0+0/gems/bigdecimal-3.1.4/ext/bigdecimal/.gem.20230225-2301-2mul99

    Gem files will remain installed in /Users/runner/.rubies/ruby-head/lib/ruby/gems/3.3.0+0/gems/bigdecimal-3.1.4 for inspection.
    Results logged to /Users/runner/.rubies/ruby-head/lib/ruby/gems/3.3.0+0/extensions/x86_64-darwin-19/3.3.0+0/bigdecimal-3.1.4/gem_make.out

https://github.com/rubygems/rubygems/commit/2157aa8ec8
2023-03-05 23:52:28 +00:00
Hiroshi SHIBATA
bab809d98f [rubygems/rubygems] Introduce Gem::Specification.find_by_full_name for finding conbination of name and version for gemspec
https://github.com/rubygems/rubygems/commit/0430551215
2023-03-05 23:52:28 +00:00
Aaron Patterson
fc5482d088
Expose the address of MJIT Pointers (#7446)
This way we can manually dereference pointers with Fiddle
2023-03-05 13:00:34 -08:00
Burdette Lamar
1b4c1492c1 [ruby/net-http] [DOC] What's Here for Net:HTTP
(https://github.com/ruby/net-http/pull/128)

https://github.com/ruby/net-http/commit/39e70f0f9b
2023-03-05 19:06:37 +00:00
Takashi Kokubun
477fc776fd Just use the latest minitest 2023-03-04 22:35:50 -08:00
Takashi Kokubun
17ef1c8164 Revert "Workaround minitest's version issue"
This reverts commit a3abe3fd6d59a3624a193028a0d3b6b9e90b0260.
2023-03-04 22:34:58 -08:00
git
ecb99feff4 Update bundled gems list at a3abe3fd6d59a3624a193028a0d3b6 [ci skip] 2023-03-05 06:30:59 +00:00
Takashi Kokubun
a3abe3fd6d Workaround minitest's version issue
Every RubyCI is broken because minitest has a newer version.
http://rubyci.s3.amazonaws.com/ubuntu/ruby-master/log/20230305T061003Z.fail.html.gz
2023-03-04 22:29:20 -08:00
Stan Lo
191e4ae33f [ruby/irb] Drop chained methods' completion support
(https://github.com/ruby/irb/pull/529)

Consider completion for this example: `foo.bar.b`

Without type information, it is hard to know the return value of the `bar`
method, so the current implementation interates through `ObjectSpace` to
get all possible candidates for the second method.

In small projects, the performance and accuracy are acceptable. But in
bigger projects, the performance is unacceptable and the accuracy is mostly
poor.

So this commit drops the support for chained methods' completion.
2023-03-04 15:34:49 +00:00
tomoya ishida
6f81e38d1d [ruby/reline] Fix completion with multiline
(https://github.com/ruby/reline/pull/513)

https://github.com/ruby/reline/commit/d76c482c5f
2023-03-04 05:56:00 +00:00
Takashi Kokubun
4782bb352e Another attempt to skip test_ractor on ci.rvm.jp
This reverts commit 8d31a60f47fb053bcfe0c744a89bd666dae48539.
2023-03-03 20:39:38 -08:00
Takashi Kokubun
8d31a60f47 Fix a YJIT enablement check
This should be enough for `make test` and `make btest-ruby` while it
doesn't work for `make btest`.
2023-03-03 17:03:26 -08:00
Maxime Chevalier-Boisvert
4d59d01621
YJIT: fix CI issue reported by Koichi caused by small stack patch (#7442)
Includes small reproduction produced by Kokubun.

http://ci.rvm.jp/results/trunk-yjit@ruby-sp2-docker
2023-03-03 15:02:52 -08:00
Peter Zhu
62c2082f1f [Bug #19469] Fix crash when resizing generic iv list
The following script can sometimes trigger a crash:

```ruby
GC.stress = true

class Array
  def foo(bool)
    if bool
      @a = 1
      @b = 2
      @c = 1
    else
      @c = 1
    end
  end
end

obj = []
obj.foo(true)

obj2 = []
obj2.foo(false)

obj3 = []
obj3.foo(true)
```

This is because vm_setivar_default calls rb_ensure_generic_iv_list_size
to resize the iv list. However, the call to gen_ivtbl_resize reallocs
the iv list, and then inserts into the generic iv table. If the
st_insert triggers a GC then the old iv list will be read during
marking, causing a use-after-free bug.

Co-Authored-By: Jemma Issroff <jemmaissroff@gmail.com>
2023-03-03 16:12:03 -05:00