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

73674 Коммитов

Автор SHA1 Сообщение Дата
Nobuyoshi Nakada cc533cb607
Downloader: Define long option aliases 2022-09-19 01:09:47 +09:00
Nobuyoshi Nakada a0b0991eed
Downloader: Define per-class command line options
Move `Downloader::Unicode` specific options, and parse options after
the downloader specificier.
2022-09-19 01:09:47 +09:00
Takashi Kokubun e2e1058e66
Include lib/mjit/instruction.rb in a snapshot
baseruby shouldn't be necessary once a snapshot is built.
2022-09-18 21:21:37 +09:00
Takashi Kokubun 45ecc30a63 Move mjit/instruction.rb rule to common.mk
as suggested by nobu. We don't really need to generate this for Windows,
but using common.mk whenever possible would probably make maintenance
easier.
2022-09-18 21:16:15 +09:00
Takashi Kokubun 0ca037b35c
Update bindgen crate (#6397)
to get rid of deprecated indirect dependency, ansi_term
2022-09-18 20:42:57 +09:00
Takashi Kokubun a988fe0b3e
Introduce --basedir to insns2vm.rb
and leverage that to preserve the directory structure under tool/ruby_vm/views
2022-09-18 14:39:53 +09:00
Takashi Kokubun 12023c833f
Revert "Preserve the directory structure under tool/ruby_vm/views"
This reverts commit 62ec621f8c.

will revisit this once fixing non-MJIT targets
2022-09-18 14:21:40 +09:00
Takashi Kokubun 62ec621f8c
Preserve the directory structure under tool/ruby_vm/views
for nested target directories
2022-09-18 14:19:22 +09:00
Takashi Kokubun 0e816e6d30
Demote mjit_instruction.rb from builtin to stdlib 2022-09-18 14:04:20 +09:00
Takashi Kokubun 67417e795a
Replace revision.tmp with the HAVE_BASERUBY trick
but without relying on replacement.

This seems to work on OpenBSD as well.
2022-09-18 00:10:30 +09:00
Takashi Kokubun 39f91bc24b
Always generate non-empty revision.h
Non-GNU make seems to generate empty revision.h, but it doesn't make
sense since https://github.com/ruby/ruby/pull/6382.

Also the $(HAVE_BASERUBY:yes=tmp) hack doesn't seem to be working on
OpenBSD. I'll remove it to focus on fixing RubyCI first, and then deal
with baseruby-missing environments. At least a snapshot should have
revision.h and it might work fine though.
2022-09-17 23:44:14 +09:00
Takashi Kokubun 922e61fcc2
Remove git command existence check again
With 33c6dd2cc8, it's no longer necessary.

This is what I got on openbsd-current:

```
-bash-5.1$ git -v
unknown option: -v
usage: git [--version] [--help] [-C <path>] [-c <name>=<value>]
           [--exec-path[=<path>]] [--html-path] [--man-path] [--info-path]
           [-p | --paginate | -P | --no-pager] [--no-replace-objects] [--bare]
           [--git-dir=<path>] [--work-tree=<path>] [--namespace=<name>]
           [--super-prefix=<path>] [--config-env=<name>=<envvar>]
           <command> [<args>]
-bash-5.1$ git version
git version 2.35.1
```
2022-09-17 23:05:10 +09:00
Takashi Kokubun 33c6dd2cc8
Fallback to VCS.release_date on VCS::NotFoundError
when -q is given.

One of the RubyCI servers, freebsd12, had a broken git environment:

```
$ git show
fatal: detected dubious ownership in repository at '/usr/home/chkbuild/chkbuild/tmp/build/20220917T123002Z/ruby'
To add an exception for this directory, call:

        git config --global --add safe.directory /usr/home/chkbuild/chkbuild/tmp/build/20220917T123002Z/ruby
```

tool/lib/vcs.rb doesn't work normally for that server.
Even for such cases, we'd like to generate a usable revision.h.

So this patch lets revision.h fallback to default VCS.release_date
when VCS::NotFoundError is raised.
2022-09-17 22:24:10 +09:00
Takashi Kokubun 1825d3673f
Skip test_wait on MinGW CI
This test has been unstable, and it seems like we're not interested in
fixing that for MinGW.
https://github.com/ruby/ruby/actions/runs/3073317191/jobs/4965373284
2022-09-17 22:08:36 +09:00
Takashi Kokubun 38a7a13ac6
Auto-generate the release date on version.h from git CommitDate (#6382)
* Auto-generate the release date on version.h

from git CommitDate

* Generate revision.h on mswin
2022-09-17 21:16:06 +09:00
Nobuyoshi Nakada ca4cbe59ed
Move case-folding.rb to tooldir with enc-prefix 2022-09-17 12:37:48 +09:00
Nobuyoshi Nakada e9982fd679
Derive UNICODE_EMOJI_VERSION from UNICODE_VERSION 2022-09-17 12:37:48 +09:00
Nobuyoshi Nakada 03ce48dac7
Emoji files header changed at 15.0 again 2022-09-17 12:37:48 +09:00
Nobuyoshi Nakada 76c0056505
Follow emoji data files header change
The header of emoji data files in UCD, which were moved at 13.0.0, has
been changed since 14.0.0.  It seems to be the same as other files in
UCD.
2022-09-17 12:37:48 +09:00
Nobuyoshi Nakada 6898984f1c
[Bug #19005] dynamic_lookup linker option in external libraries
The warning against `-undefined dynamic_lookup` is just a warning yet,
and many gems seem to pay no attention to warnings.  Until it fails
actually, keep it as a migration path, except for standard extension
libraries and bundled extension gems.
2022-09-17 12:09:34 +09:00
git e3a32abe2e * 2022-09-17 [ci skip] 2022-09-17 02:25:39 +09:00
Jeremy Evans b07db96744 [ruby/irb] Support --noscript option to not use first non-option argument as script
Also add --script option to turn the option back on.

Previously there wasn't a way to get an interactive IRB session
and access arguments provided on the command line.

Additionally, handle `-` as script as stdin. In Unix-like tools, `-`
means to take standard input instead of a file.  This doesn't
result in exactly the same output for:

```
echo 'p ARGV' > args.rb; irb args.rb a b c
```

and

```
echo 'p ARGV' | irb - a b c
```

Due to how irb handles whether stdin is a tty.

However, this change allows use of `-` as a argument, instead of
giving an unrecognized switch error. This required some small
changes to context.rb (to handle `-` as standard input) and
input-method.rb (to have FileInputMethod accept IO arguments in
addition to strings).

Implements [Feature #15371]

https://github.com/ruby/irb/commit/4192683ba2
2022-09-17 02:25:26 +09:00
Peter Zhu 64200990c4 [ci skip] Fix typos in documentation in io.c 2022-09-16 09:47:32 -04:00
Takashi Kokubun 5b735d0beb
Invalidate i-cache after link_labels (#6388) 2022-09-16 20:44:58 +09:00
Koichi Sasada a28e7871e5 Update bundled_gems
Try latest patch to avoid some race on Mac OS X.
2022-09-16 18:54:33 +09:00
Takashi Kokubun 6ad6994457
Omit a DRb test on MinGW
This test seems to leak a thread and let TestIOWait fail:
https://github.com/ruby/ruby/actions/runs/3065426880/jobs/4949517274

DRb almost never seemed to stably work on MinGW. I don't think we intend
to fix it either. We should just omit DRb tests when they fail on MinGW.
2022-09-16 17:05:59 +09:00
Nobuyoshi Nakada c8d94d2797
Now test-bundler nees fake.rb 2022-09-16 14:46:21 +09:00
git 3ff65dcd8b * 2022-09-16 [ci skip] 2022-09-16 13:37:37 +09:00
Jimmy Miller 2387fbfb34
Fix splat args (#6385)
* Fix splat args

Cfuncs were not working properly so I disabled them right now.

There were some checks above that were also actually preventing splat args from being called.

Finally I did some basic code cleanup after realizing I didn't need to mutate argc so much

* Add can't compile for direct cfunc splat call

* Fix typo

* Update yjit/src/codegen.rs

Co-authored-by: Maxime Chevalier-Boisvert <maximechevalierb@gmail.com>
2022-09-16 13:37:15 +09:00
Noah Gibbs cc7f6fe734
YJIT should die if we compile on Aarch64 with no instruction cache clear available (#6380)
YJIT should die if we compile on ARM64 with no icache clear available
2022-09-15 10:14:27 -04:00
Maxime Chevalier-Boisvert 64a020324d
Add asm comments to make disasm more readable (#6377) 2022-09-15 10:12:27 -04:00
Kevin Newton 68a5b0f086 [rubygems/rubygems] Mask the file mode when extracting files
When extracting files from the tarball, a mode is retrieved from
the header. Occasionally you'll encounter a gem that was packaged
on a system whose permission bits result in a value that is larger
than the value that File.chmod will allow (anything >= 2^16). In
that case the extraction fails with a RangeError, which is pretty
esoteric.

If you extract the tarball with the tar and gunzip utilities, the
file permissions end up being just the bottom 16 bits masked off
from the original value. I've mirrored that behavior here. Per the
tar spec:

> Modes which are not supported by the operating system restoring
> files from the archive will be ignored.

I think that basically means what I've done here.

---

This commit also changes the behavior very slightly with regard to
when the chmod is called. Previously it was called while the file
descriptor was still open, but after the write call.

When write flushes, the file permissions are changed to the mode
value from the File.open call, undoing the changes made by
FileUtils.chmod. CRuby appears to flush the buffer after the
chmod call, whereas TruffleRuby flushes before the chmod call.
So the file permissions can change depending on implementation.
Both implementations end up getting the correct file permissions
for the bottom 9 bits (user, group, world), but differ with
regard to the sticky bit in the next 3.

To get consistent behavior, this commit changes it to close the
file descriptor before attempting to chmod anything, which makes
it consistent because the write flushes in both cases.

https://github.com/rubygems/rubygems/commit/22ce076e99
2022-09-15 14:49:20 +09:00
Nobuyoshi Nakada bf72afa766
Remove warning for old TLS version connection
RubyGems.org already has refused connection requests using older than
TLS 1.2.
2022-09-15 14:48:47 +09:00
Hiroshi SHIBATA 6b2b9e0019 [rubygems/rubygems] Also added x86_64-darwin-21
https://github.com/rubygems/rubygems/commit/c03e7e1564
2022-09-15 12:50:48 +09:00
Hiroshi SHIBATA ec0d9a6a6f [rubygems/rubygems] Added arm64-darwin-22 to lockfiles for testing
https://github.com/rubygems/rubygems/commit/d7956e9ce5
2022-09-15 12:50:48 +09:00
Nobuyoshi Nakada d152ac677c
Make CodeQL ignore syntax_suggest because of the performance problem
https://github.com/github/codeql/discussions/10120#discussioncomment-3485880
2022-09-15 10:25:11 +09:00
Jemma Issroff aecb57ceb0
Fix style on vm_ivar benchmarks (#6379) 2022-09-15 09:39:39 +09:00
Nobuyoshi Nakada 752ae81ed1 [ruby/irb] Refine assertion for failures
https://github.com/ruby/irb/commit/fd047512b3
2022-09-15 08:25:53 +09:00
Nobuyoshi Nakada ae2e8d364f [ruby/irb] `Dir.mktmpdir` creates a directory including the process ID
https://github.com/ruby/irb/commit/a15f68ffdb
2022-09-15 08:25:52 +09:00
Jemma Issroff 513a11b477 Add vm_ivar get, get_unitialized, and lazy_set benchmarks 2022-09-14 13:50:47 -07:00
John Hawthorn f98d6d3f38
YJIT: Implement specialized respond_to? (#6363)
* Add rb_callable_method_entry_or_negative

* YJIT: Implement specialized respond_to?

This implements a specialized respond_to? in YJIT.

* Update yjit/src/codegen.rs

Co-authored-by: Maxime Chevalier-Boisvert <maximechevalierb@gmail.com>
2022-09-14 16:15:55 -04:00
Nobuyoshi Nakada d5cdc2edd0
[TravisCI] The source of YAML is no longer bundled 2022-09-15 01:38:43 +09:00
Nobuyoshi Nakada fb2e9053b3
[TravisCI] Make gems/src directory writable 2022-09-15 01:38:42 +09:00
git 0953ea64a2 * 2022-09-15 [ci skip] 2022-09-15 00:32:30 +09:00
Nobuyoshi Nakada b6a9e68391
Add noarch-fake.rb target
`yes-fake` depends on it when `arch=noarch` is given, but the rule to
generate it from fake.rb.in is ignored now.
2022-09-15 00:31:35 +09:00
Jimmy Miller 758a1d7302
Initial support for VM_CALL_ARGS_SPLAT (#6341)
* Initial support for VM_CALL_ARGS_SPLAT

This implements support for calls with splat (*) for some methods. In
benchmarks this made very little difference for most benchmarks, but a
large difference for binarytrees. Looking at side exits, many
benchmarks now don't exit for splat, but exit for some other
reason. Binarytrees however had a number of calls that used splat args
that are now much faster. In my non-scientific benchmarking this made
splat args performance on par with not using splat args at all.

* Fix wording and whitespace

Co-authored-by: Maxime Chevalier-Boisvert <maximechevalierb@gmail.com>

* Get rid of side_effect reassignment

Co-authored-by: Maxime Chevalier-Boisvert <maximechevalierb@gmail.com>
2022-09-14 10:32:22 -04:00
Takashi Kokubun 8f37e9c918
YJIT: Add Opnd#with_num_bits to use only 8 bits (#6359)
* YJIT: Add Opnd#sub_opnd to use only 8 bits

* Add with_num_bits and let arm64_split use it

* Add another assertion to with_num_bits

* Use only with_num_bits
2022-09-14 10:27:52 -04:00
Kenta Murata 2e25b85a7e
configure.ac: Apply suggestions from code review in #6366
Co-authored-by: Nobuyoshi Nakada <nobu@ruby-lang.org>
2022-09-14 23:14:36 +09:00
S.H 960db13c47
Reuse `opt_arg_append` function 2022-09-14 23:10:21 +09:00
Kenta Murata f512df7398
configure.ac: Add --with-gmp-dir (#6366)
Add the `--with-gmp-dir` to specify the prefix directory of GMP.
The`--without-gmp` option is preserved for convenience.  It can
be used to force to reject using GMP even if the `--with-gmp-dir`
option is specified.
2022-09-14 22:17:39 +09:00