Commit graph

12164 commits

Author SHA1 Message Date
Takashi Kokubun
da9c84f859 RJIT: Rename a side exit counter 2023-03-12 22:15:58 -07:00
Takashi Kokubun
d27b594841 RJIT: Fix a typo
and import a missing function
2023-03-12 22:09:05 -07:00
Takashi Kokubun
330086d3f6 RJIT: Implement definedivar 2023-03-12 22:07:02 -07:00
Takashi Kokubun
3938efa70f RJIT: Fix block param proxy on send
peek_at_stack was doubly accounting for C::VM_CALL_ARGS_BLOCKARG, which
made that case always side-exit and hide this bug.

When a block handler is block param proxy, you have to set LEP's specval
as next specval instead of block param proxy itself.
2023-03-12 22:01:38 -07:00
Takashi Kokubun
a23f64221e RJIT: Fix block finding logic
like YJIT does
2023-03-12 21:14:43 -07:00
Takashi Kokubun
9cd5441d28 RJIT: Implement --rjit-trace-exits 2023-03-12 15:15:08 -07:00
Takashi Kokubun
bbd9221e46 RJIT: Give up freezing InsnCompiler
for memoization
2023-03-12 13:31:15 -07:00
Takashi Kokubun
3efe4639ec RJIT: Handle Mod 10 for CMP r/m64, r64 2023-03-11 23:47:11 -08:00
Takashi Kokubun
9c220bf5e1 RJIT: Use lambda constants to match operands 2023-03-11 23:35:58 -08:00
Takashi Kokubun
8835f9d3bf RJIT: Define QwordPtr for in-clause readability 2023-03-11 22:30:54 -08:00
Takashi Kokubun
9501283dea RJIT: Leave it to NoMatchingPatternError
instead of manually implementing NotImplementedError
2023-03-11 22:25:00 -08:00
Takashi Kokubun
846fc356cb RJIT: Use case-in for exhaustive matches 2023-03-11 22:17:06 -08:00
Takashi Kokubun
fe34db5a1b RJIT: Migrate SIZET values to RJIT::C constants 2023-03-11 22:04:30 -08:00
Takashi Kokubun
50c5f94ed7 RJIT: Introduce constants under RubyVM::RJIT::C 2023-03-11 21:48:28 -08:00
Takashi Kokubun
58f7e8b7f8 RJIT: Automate function pointer imports 2023-03-11 21:26:40 -08:00
Takashi Kokubun
93e34fe42e RJIT: Write initial tests for Assembler 2023-03-10 14:57:37 -08:00
Takashi Kokubun
76808b1ee4 RJIT: Start testing Assembler 2023-03-10 13:57:52 -08:00
Takashi Kokubun
cdece5cf36 RJIT: Remove unused code from headers 2023-03-10 13:11:01 -08:00
Takashi Kokubun
c364e0745d RJIT: Introduce --rjit-exec-mem-size 2023-03-10 13:04:45 -08:00
Ian Ker-Seymer
dd47ce10db [rubygems/rubygems] Use RbSys::ExtensionTask when creating new rust gems
125f9fece9
2023-03-10 11:50:06 +00:00
Takashi Kokubun
4afe9c09a0 RJIT: Use imemo_type_p instead
which seems safer. It seems like imemo_type can cause SEGV.
2023-03-09 22:15:16 -08:00
Takashi Kokubun
35fd79ac37 RJIT: Lazily compile global ocb 2023-03-09 21:55:14 -08:00
Hiroshi SHIBATA
fade612d18 [rubygems/rubygems] Removed needless option
4489361a21
2023-03-10 03:51:17 +00:00
Hiroshi SHIBATA
15739c66b7 [rubygems/rubygems] Added only missing extensions option into pristine command
cfd0e615d7
2023-03-10 03:51:16 +00:00
Hiroshi SHIBATA
3926ad578c [rubygems/rubygems] Drop to support Psych 3.0 bundled at Ruby 2.5
a6650c2c96
2023-03-09 13:37:06 +00:00
Hiroshi SHIBATA
ea8b5e7359 [rubygems/rubygems] rubocop -a lib/rubygems/specification.rb
85d60e9886
2023-03-08 23:23:45 +00:00
Hiroshi SHIBATA
cb3f1f6de8 [rubygems/rubygems] Detect extension files under full_required_paths
When we use this methods with local gemspec, we don't handle
  build status of extension correctly. So We need to find extension
  files in require_paths.

  Example with ruby/erb repository:

  ```
  $ bundle exec irb
  Ignoring erb-4.0.2 because its extensions are not built. Try: gem pristine erb --version 4.0.2
  >>
  ```

f90e43cf3f
2023-03-08 23:23:45 +00:00
Burdette Lamar
2f19c5b7e0 [ruby/net-http] Enhanced RDoc for Net::HTTP
(https://github.com/ruby/net-http/pull/130)

698e18cfc1
2023-03-08 19:47:49 +00:00
Julie Haehn
c5296d9396 [rubygems/rubygems] Respect --no-install option for git: sources
Currently, the --no-install option to `bundle package` is totally
ignored for git sources. This can have very strange effects if you have:

- a git-sourced gem,
- with native extensions,
- whose extconf.rb script depends on another gem,
- which is installed from Rubygems in the gemfile.

In that circumstance, `bundle package --no-install --all` will download
the Rubygems dependencies to `vendor/cache` but NOT install them. It
will also check out the git gems to `vendor/cache` (good), and attempt
to build their native extensions (bad!).

The native extension build will fail because the extconf.rb script crashes,
since the dependency it needs is missing.

I implemented a fix for this in `source/git.rb`, since this is analogous
to what's happening in `source/rubygems.rb`. I do admit though the whole
thing is a little strange though - an "install" method that.... proceeds
to look at a global flag to not install anything.

Add test to confirm cache respects the --no-install flag

5a77d1c397

Co-authored-by: KJ Tsanaktsidis <kj@kjtsanaktsidis.id.au>
2023-03-07 22:36:36 +00:00
Martin Emde
85a1738ab3 [rubygems/rubygems] Add TarReader::Entry#seek to seek within the tar file entry
TarReader#each previously implemented a partial version of seek.
This code moved to Entry#seek for use from TarReader#each.

Entry#close now returns nil instead of true, like IO#close.

Closing an Entry now seeks to the end of the Entry, seeking past
any remaining zero byte tar file padding and moving the io to the
correcty position to read the next file in the archive.

Uses seek for Entry#rewind and #pos=, fixing the tar->gzip->tar nested
rewind that would break previous to this change.

Add Entry.open that behaves more like File.open.

f5149565d5
2023-03-07 20:21:43 +00:00
Samuel Giddins
638f68b2fe [rubygems/rubygems] Avoid calling String#dup in Gem::Version#marshal_dump
Might potentially save a second every time RubyGems.org creates a specs index

d6e4d50f8d
2023-03-07 11:48:41 +00:00
Josef Šimánek
dc33d32f12
Use proper memoized var name for Gem.state_home. 2023-03-07 16:52:28 +09:00
David Rodríguez
93f0749a64 [rubygems/rubygems] Fix gemspec file filter
Explicitly match directory separator to not match files in repo root
accidentally.

b936805ea9

Co-authored-by: Nobuyoshi Nakada <nobu@ruby-lang.org>
2023-03-07 16:51:36 +09:00
David Rodríguez
72591eb73f [rubygems/rubygems] Better suggestion when bundler/setup fails due to missing gems
If the original `BUNDLE_GEMFILE` is different from the default, then the
suggestion wouldn't work as is.

Before:

```
$ util/rubocop
Could not find rubocop-1.30.1 in locally installed gems
Run `bundle install` to install missing gems.

$  rubygems git:(better-cmd-suggestion) ✗ bundle install
Could not locate Gemfile
```

After:

```
$ util/rubocop
Could not find rubocop-1.30.1 in locally installed gems
Run `bundle install --gemfile /path/to/rubygems/bundler/tool/bundler/lint_gems.rb` to install missing gems.

$ bundle install --gemfile /path/to/rubygems/bundler/tool/bundler/lint_gems.rb
Fetching gem metadata from https://rubygems.org/.........
Using ast 2.4.2
Using bundler 2.4.7
Using parser 3.1.2.0
Using rainbow 3.1.1
Using parallel 1.22.1
Using regexp_parser 2.5.0
Using rubocop-ast 1.18.0
Using rexml 3.2.5
Using ruby-progressbar 1.11.0
Using unicode-display_width 2.1.0
Fetching rubocop 1.30.1
Installing rubocop 1.30.1
Using rubocop-performance 1.14.2
Bundle complete! 2 Gemfile dependencies, 12 gems now installed.
Use `bundle info [gemname]` to see where a bundled gem is installed.

$ util/rubocop
Inspecting 345 files
.........................................................................................................................................................................................................................................................................................................................................................

345 files inspected, no offenses detected
```

bf1320d805
2023-03-07 16:51:36 +09:00
David Rodríguez
bd0f2c7958 [rubygems/rubygems] Let git source use default cloned repo branch
d8af770379
2023-03-07 16:51:34 +09:00
Takashi Kokubun
23ec248e48 s/mjit/rjit/ 2023-03-06 23:44:01 -08:00
Takashi Kokubun
2e875549a9 s/MJIT/RJIT/ 2023-03-06 23:44:01 -08:00
Takashi Kokubun
eaccdc1941 Rename MJIT filenames to RJIT 2023-03-06 23:44:01 -08:00
Stan Lo
56ebeba436 [ruby/irb] Bump version to 1.6.3
(https://github.com/ruby/irb/pull/537)

110e4a3219
2023-03-07 02:47:15 +00:00
Hiroshi SHIBATA
030f39822a [ruby/net-http] Re-apply
d22ca54904 after
testing

7ac7401a9c
2023-03-07 01:35:20 +00:00
Nobuyoshi Nakada
755c379d87 [ruby/net-http] Exclude git related files
2767df580d
2023-03-06 13:26:36 +00:00
Nobuyoshi Nakada
c8c3431b0a [ruby/net-http] Read in binary mode to get rid of invalid byte sequence
38de3d17a7
2023-03-06 13:26:34 +00:00
Nobuyoshi Nakada
fd0a5659ca [ruby/net-http] Test building packages
Also revert commit d22ca54904 "Replaced
non-ascii charactor. It fails version detection at `net-http.gemspec`."

fbeb247d93
2023-03-06 13:26:34 +00:00
Takashi Kokubun
22d944c8b7 Avoid crashing at a random ISEQ access
[Feature #19420]
2023-03-05 23:28:59 -08:00
Takashi Kokubun
d6814fa24f Fix a BytePtr check of test 2023-03-05 23:28:59 -08:00
Takashi Kokubun
d51b4d4c3e Add Mod 10 to test r/m64, imm32 2023-03-05 23:28:59 -08:00
Takashi Kokubun
7573854c9f Add Mod 10 to cmp r/m64, imm8 2023-03-05 23:28:59 -08:00
Takashi Kokubun
823309debc Remove unused variables 2023-03-05 23:28:59 -08:00
Takashi Kokubun
f0218303e0 Optimize String#getbyte 2023-03-05 23:28:59 -08:00
Takashi Kokubun
31babc5cea Optimize Module#=== 2023-03-05 23:28:59 -08:00