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

77432 Коммитов

Автор SHA1 Сообщение Дата
Takashi Kokubun 7297374c5e
YJIT: Reduce paddings if --yjit-exec-mem-size <= 128 on arm64 (#7671)
* YJIT: Reduce paddings if --yjit-exec-mem-size <= 128

on arm64

* YJIT: Define jmp_ptr_bytes on CodeBlock
2023-04-11 11:02:52 -04:00
Jean Boussier 8c360ce713 hash.c: Fix hash_iter_lev_dec corrupting shape
[Bug #19589]

When decrementing `iter_lev` from `65` to `64` the flags would be
corrupted, causing the shape_id to be invalid.
2023-04-11 16:56:14 +02:00
Peter Zhu 7b230bc848 [DOC] Documentation for flags of RObject 2023-04-11 08:31:56 -04:00
Hiroshi SHIBATA 0196c8527b
Removed file that is part of d89cc317c6 2023-04-11 19:15:25 +09:00
Hiroshi SHIBATA d89cc317c6
util/rubocop -A --only Style/NumericLiteralPrefix 2023-04-11 19:12:28 +09:00
dependabot[bot] 65e276096f [rubygems/rubygems] Bump rb-sys
Bumps [rb-sys](https://github.com/oxidize-rb/rb-sys) from 0.9.70 to 0.9.71.
- [Release notes](https://github.com/oxidize-rb/rb-sys/releases)
- [Commits](https://github.com/oxidize-rb/rb-sys/compare/v0.9.70...v0.9.71)

---
updated-dependencies:
- dependency-name: rb-sys
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-04-11 00:54:20 +00:00
Takashi Kokubun 1ff14a855a
YJIT: Avoid using a register for unspecified_bits (#7685)
Fix [Bug #19586]
2023-04-10 16:35:48 -07:00
Takashi Kokubun 4af9bd52cb Get rid of a breakpoint left in parse.y 2023-04-10 11:22:12 -07:00
Šimon Lukašík 2e50c07e23
[DOC] The Document-method hint is needed only in C files
'Document-method' string in C file has a special treatment. In Ruby source file,
however, it is considered to be part of the documentation.

Note Numeric#size was migrated from C to Ruby, in 3208a5df2d
2023-04-10 21:20:42 +09:00
Nobuyoshi Nakada dc5f938765
Prefer `write_warn` over `write_warn2` with a string literal 2023-04-10 15:23:44 +09:00
Nobuyoshi Nakada c30cab8ce4
[Bug #19570] Propagate message encoding to decorated message 2023-04-10 15:13:26 +09:00
Nobuyoshi Nakada e1d2dc4cfc
LLDB: Fix T_ARRAY inspect [ci skip] 2023-04-10 14:12:19 +09:00
Wai-Wai Ng 917e7eb50f
[DOC] Correct docs for Comparable 2023-04-10 01:09:03 +09:00
Nobuyoshi Nakada 038f9ade3c
Use tools appropriate with CC
To get rid of mysterious errors such as:

```
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/nm: error: libruby.3.3-static.a(/): The end of the file was unexpectedly encountered
```

and

```
ld: warning: ignoring file ../../libruby.3.3-static.a, building for macOS-x86_64 but attempting to link with file built for macOS-x86_64
Undefined symbols for architecture x86_64:
  "_rb_rational_num", referenced from:
```
2023-04-09 22:47:26 +09:00
git 3423ba9cef Update default gems list at f7c8d3bf96 [ci skip] 2023-04-09 13:44:59 +00:00
ima1zumi f7c8d3bf96 [ruby/irb] Bump version to 1.6.4
(https://github.com/ruby/irb/pull/560)

https://github.com/ruby/irb/commit/01328da9b6
2023-04-09 13:44:12 +00:00
HoNooD 671cfc2000 [ruby/bigdecimal] fix: typo in document comments of `f_BigDecimal` function
https://github.com/ruby/bigdecimal/commit/13abe1fd78
2023-04-08 18:54:01 +00:00
Nobuyoshi Nakada 8ec95c6074 [ruby/bigdecimal] Remove set but unused variable
This `prec` has not been used since https://github.com/ruby/bigdecimal/commit/1f5c46dbdd1c.

https://github.com/ruby/bigdecimal/commit/08a0ad563d
2023-04-08 18:53:28 +00:00
Kasumi Hanazuki 957595f218 [ruby/resolv] Do not compress domain name in SRV RDATA
[RFC2782] prohibits use of name compression for the target host name
in the RDATA of a SRV record.

[RFC2782]: https://datatracker.ietf.org/doc/rfc2782/

Closes: https://github.com/ruby/resolv/issues/29

https://github.com/ruby/resolv/commit/ac85724e17
2023-04-08 14:16:59 +00:00
Nobuyoshi Nakada a4cc3fcbd2
Replace arch_flags for universal build [ci skip] 2023-04-08 20:31:51 +09:00
Stan Lo e7f77e1e89 [ruby/irb] Simplify command method definition
(https://github.com/ruby/irb/pull/559)

* Remove unnecessary command argument generation code

Now that all the supported Ruby versions handle splat args and splat kwargs,
we don't need that args generation code anymore.

* Remove unused command definition code

If we look at `@EXTEND_COMMANDS`, all commands are defined in a file, which
means the `if load_file` branch is always executed. Therefore we can drop
the else branch of that condition.

* Avoid defining unnecessary command methods

There's no need to define another command method just to call `Command.execute`.
2023-04-08 10:11:50 +00:00
Nobuyoshi Nakada 08324ab9eb
Include `--no-llvm-bc` option in `NM` macro only if usable 2023-04-08 12:47:27 +09:00
Aaron Patterson a9bfb64153 Expose rb_sym_to_proc via RJIT
This is needed for getblockparamproxy
2023-04-07 09:49:15 -07:00
Nobuyoshi Nakada ac8a16237c
[Bug #19563] Yield words separators per lines
So that newlines across a here-doc terminator will be separated
tokens.

Cf. https://github.com/ruby/irb/pull/558
2023-04-07 23:13:56 +09:00
David Rodríguez 4df7c3946a [rubygems/rubygems] Remove one fallback to full indexes on big gemfiles
If Gemfile has a lot of dependencies, we have an optimization that uses
the full index in that case, assuming it's going to be faster.

I think this is an old optimization that predates compact index API
times, I believe we no longer need it these days.

Also, since a few releases ago we check for circular dependencies when
resolving by looping through all versions of each name and removing
those that have circular dependencies that would trip up the resolver.

This loop becomes actually very slow when full indexes are used because
to find dependencies of a gemspec, we need to explicitly fetch the
marshaled gemspec (`gemspec.rz` endpoint) for it, so the optimization
has the opposite effect of making things very slow.

https://github.com/rubygems/rubygems/commit/2f46289bd3
2023-04-07 13:53:00 +00:00
tomoya ishida f8115ec727 [ruby/irb] Fix RubyLex's heredoc_with_hembexpr test to avoid ripper
tokenizing issue
(https://github.com/ruby/irb/pull/558)

https://github.com/ruby/irb/commit/f68e891ed1
2023-04-07 11:03:28 +00:00
Hiroshi SHIBATA 250e97c0fb [rubygems/rubygems] util/rubocop -A --only Style/FormatString
https://github.com/rubygems/rubygems/commit/132a56569d
2023-04-07 05:13:05 +00:00
git 84ce6fc873 * expand tabs. [ci skip]
Please consider using misc/expand_tabs.rb as a pre-commit hook.
2023-04-07 04:43:21 +00:00
Nobuyoshi Nakada 4adcfc8cd7
[Bug #19584] [DOC] Tweek description of `rb_gc_register_address` 2023-04-07 13:42:58 +09:00
Nobuyoshi Nakada f99af43980 [Bug#19161] Detect thread local storage specifier
Checking by `__STDC_VERSION__` is unreliable because old gcc 4.8
supports `-std=gnu11` option but does not implement `_Thread_local`.
Check the implementation directly instead.
2023-04-07 13:42:48 +09:00
dependabot[bot] cc0b8c47bf Bump github/codeql-action from 2.2.10 to 2.2.11
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 2.2.10 to 2.2.11.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](8c8d71dde4...d186a2a36c)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-04-07 12:45:35 +09:00
Nobuyoshi Nakada 75a2dff0e0 [ruby/openssl] Register global variables before assignment
https://github.com/ruby/openssl/commit/98099d3796
2023-04-07 12:09:08 +09:00
Nobuyoshi Nakada e13575bb79
[Bug #19584] Register global variables before assignment 2023-04-07 11:53:36 +09:00
Nobuyoshi Nakada 5f8ebcada0
[Bug #19584] Register global variable address before assignment 2023-04-07 11:21:08 +09:00
Hiroshi SHIBATA fb822076d7 [rubygems/rubygems] util/rubocop -A --only Style/LineEndConcatenation
https://github.com/rubygems/rubygems/commit/67ece7b8b6
2023-04-06 23:33:20 +00:00
Peter Zhu bffadcd6d4 Add guard to compaction test in WeakMap
Some platforms don't support compaction, so we should skip this test.
2023-04-06 13:35:25 -04:00
Peter Zhu bccec7fb46 Fix crash in rb_gc_register_address
[Bug #19584]

Some C extensions pass a pointer to a global variable to
rb_gc_register_address. However, if a GC is triggered inside of
rb_gc_register_address, then the object could get swept since it does
not exist on the stack.
2023-04-06 13:19:19 -04:00
Takashi Kokubun 89bdf6e94c
YJIT: Stack temp register allocation for arm64 (#7659)
* YJIT: Stack temp register allocation for arm64

* Update a comment

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

* Update comments about assertion

* Update a comment

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

---------

Co-authored-by: Maxime Chevalier-Boisvert <maximechevalierb@gmail.com>
2023-04-06 11:34:58 -04:00
Matt Valentine-House 2a34bcaa10 Update VPATH for socket, & dependencies
The socket extensions rubysocket.h pulls in the "private" include/gc.h,
which now depends on vm_core.h. vm_core.h pulls in id.h

when tool/update-deps generates the dependencies for the makefiles, it
generates the line for id.h to be based on VPATH, which is configured in
the extconf.rb for each of the extensions. By default VPATH does not
include the actual source directory of the current Ruby so the
dependency fails to resolve and linking fails.

We need to append the topdir and top_srcdir to VPATH to have the
dependancy picked up correctly (and I believe we need both of these to
cope with in-tree and out-of-tree builds).

I copied this from the approach taken in
https://github.com/ruby/ruby/blob/master/ext/objspace/extconf.rb#L3
2023-04-06 11:07:16 +01:00
Matt Valentine-House 026321c5b9 [Feature #19474] Refactor NEWOBJ macros
NEWOBJ_OF is now our canonical newobj macro. It takes an optional ec
2023-04-06 11:07:16 +01:00
Matt Valentine-House 879cda98a4 Remove dependancy of vm_core.h on shape.h
so that now shape can happily include gc.h
2023-04-06 11:07:16 +01:00
Matt Valentine-House d91a82850a Pull the shape tree out of the vm object 2023-04-06 11:07:16 +01:00
Matt Valentine-House b0297feb1f Remove newobj_of_cr
We can just make newobj_of take a ractor
2023-04-06 11:07:16 +01:00
Hiroshi SHIBATA f269fae07e
Revert "[ruby/syntax_suggest] Introduce binstubs to set RUBYOPT for development"
This reverts commit d2eef4b786.
2023-04-06 16:36:09 +09:00
Hiroshi SHIBATA 70371aa071
Revert accidentally commit of wrong file
Revert "[ruby/syntax_suggest] Remove unnecessary `--color` option"

  This reverts commit 588dd44d41.
2023-04-06 16:30:00 +09:00
git c78476cee8 Update default gems list at 6ca1f3eec4 [ci skip] 2023-04-06 07:18:54 +00:00
Hiroshi SHIBATA 6ca1f3eec4
Load only SyntaxSuggest::VERSION for version check 2023-04-06 16:15:41 +09:00
schneems 7ab640d9dd
v1.0.4 2023-04-06 15:49:26 +09:00
schneems 8d72d6159c
v1.0.3
Fix a CI error and add a test to ensure we're testing the current version:

```
Run bundle exec rake test
bundler: failed to load command: rake (/home/runner/work/syntax_suggest/syntax_suggest/vendor/bundle/ruby/3.2.0/bin/rake)
/opt/hostedtoolcache/Ruby/3.2.1/x64/lib/ruby/gems/3.2.0/gems/bundler-2.3.14/lib/bundler/runtime.rb:309:in `check_for_activated_spec!': You have already activated syntax_suggest 1.0.2, but your Gemfile requires syntax_suggest 1.0.3. Since syntax_suggest is a default gem, you can either remove your dependency on it or try updating to a newer version of bundler that supports syntax_suggest as a default gem. (Gem::LoadError)
	from /opt/hostedtoolcache/Ruby/3.2.1/x64/lib/ruby/gems/3.2.0/gems/bundler-2.3.14/lib/bundler/runtime.rb:25:in `block in setup'
	from /opt/hostedtoolcache/Ruby/3.2.1/x64/lib/ruby/gems/3.2.0/gems/bundler-2.3.14/lib/bundler/spec_set.rb:138:in `each'
	from /opt/hostedtoolcache/Ruby/3.2.1/x64/lib/ruby/gems/3.2.0/gems/bundler-2.3.14/lib/bundler/spec_set.rb:138:in `each'
	from /opt/hostedtoolcache/Ruby/3.2.1/x64/lib/ruby/gems/3.2.0/gems/bundler-2.3.14/lib/bundler/runtime.rb:24:in `map'
	from /opt/hostedtoolcache/Ruby/3.2.1/x64/lib/ruby/gems/3.2.0/gems/bundler-2.3.14/lib/bundler/runtime.rb:24:in `setup'
	from /opt/hostedtoolcache/Ruby/3.2.1/x64/lib/ruby/gems/3.2.0/gems/bundler-2.3.14/lib/bundler.rb:151:in `setup'
	from /opt/hostedtoolcache/Ruby/3.2.1/x64/lib/ruby/gems/3.2.0/gems/bundler-2.3.14/lib/bundler/setup.rb:20:in `block in <top (required)>'
	from /opt/hostedtoolcache/Ruby/3.2.1/x64/lib/ruby/gems/3.2.0/gems/bundler-2.3.14/lib/bundler/ui/shell.rb:136:in `with_level'
	from /opt/hostedtoolcache/Ruby/3.2.1/x64/lib/ruby/gems/3.2.0/gems/bundler-2.3.14/lib/bundler/ui/shell.rb:88:in `silence'
	from /opt/hostedtoolcache/Ruby/3.2.1/x64/lib/ruby/gems/3.2.0/gems/bundler-2.3.14/lib/bundler/setup.rb:20:in `<top (required)>'
	from /opt/hostedtoolcache/Ruby/3.2.1/x64/lib/ruby/gems/3.2.0/gems/bundler-2.3.14/lib/bundler/cli/exec.rb:56:in `require_relative'
	from /opt/hostedtoolcache/Ruby/3.2.1/x64/lib/ruby/gems/3.2.0/gems/bundler-2.3.14/lib/bundler/cli/exec.rb:56:in `kernel_load'
	from /opt/hostedtoolcache/Ruby/3.2.1/x64/lib/ruby/gems/3.2.0/gems/bundler-2.3.14/lib/bundler/cli/exec.rb:23:in `run'
	from /opt/hostedtoolcache/Ruby/3.2.1/x64/lib/ruby/gems/3.2.0/gems/bundler-2.3.14/lib/bundler/cli.rb:483:in `exec'
	from /opt/hostedtoolcache/Ruby/3.2.1/x64/lib/ruby/gems/3.2.0/gems/bundler-2.3.14/lib/bundler/vendor/thor/lib/thor/command.rb:27:in `run'
```
2023-04-06 15:47:04 +09:00
schneems d2eef4b786 [ruby/syntax_suggest] Introduce binstubs to set RUBYOPT for development
Because `syntax_suggest` is a default gem you can get conflicts when working on this project with Ruby 3.2+. To fix conflicts you can disable loading `syntax_suggest` as a default gem by using then environment variable `RUBYOPT` with the value `--disable=syntax_suggest`. The `RUBYOPT` environment variable works the same as if we had entered those flags directly in the ruby cli (i.e. `ruby --disable=syntax_suggest` is the same as `RUBYOPT="--disable=syntax_suggest" ruby`). It's needed because we don't always directly execute Ruby and RUBYOPT will be picked up when other commands load ruby (`rspec`, `rake`, or `bundle` etc.).

There are some binstubs that already have this done for you. Instead of running `bundle exec rake` you can run `bin/rake`. Binstubs provided:

- `bin/rake`
- `bin/rspec`

https://github.com/ruby/syntax_suggest/commit/342093706d
2023-04-06 15:45:31 +09:00