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

79782 Коммитов

Автор SHA1 Сообщение Дата
Kevin Newton a4b4ebc7c1 [ruby/yarp] Error when numbered parameters are written
https://github.com/ruby/yarp/commit/65b536ba12
2023-09-15 15:14:36 +00:00
Kevin Newton 6031ab18c7 [ruby/yarp] Support parsing numbered parameters
https://github.com/ruby/yarp/commit/ffc8f35e56
2023-09-15 15:14:34 +00:00
Kevin Newton 236fe914af [ruby/yarp] Track explicit parameters on blocks
https://github.com/ruby/yarp/commit/99c91931e0
2023-09-15 15:14:33 +00:00
Kevin Newton 1badb09f61 [ruby/yarp] Properly handle missing method names
https://github.com/ruby/yarp/commit/4a30c69051
2023-09-15 15:14:19 +00:00
Nobuyoshi Nakada 89802078f9
[Bug #19882] Reject tokens invalid as symbols 2023-09-15 17:27:36 +09:00
dependabot[bot] 5a7f5bb0de Bump actions/checkout from 3.6.0 to 4.0.0
Bumps [actions/checkout](https://github.com/actions/checkout) from 3.6.0 to 4.0.0.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](f43a0e5ff2...3df4ab11eb)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-09-15 17:05:23 +09:00
Nobuyoshi Nakada fe0225ff4d [Bug #19778] Add `-I` options for opt-dir to `$INCFLAGS`
These options have been separated from `$CFLAGS` already in the
other places.
2023-09-15 13:27:19 +09:00
dependabot[bot] 74277f9998 Bump ruby/setup-ruby from 1.152.0 to 1.153.0
Bumps [ruby/setup-ruby](https://github.com/ruby/setup-ruby) from 1.152.0 to 1.153.0.
- [Release notes](https://github.com/ruby/setup-ruby/releases)
- [Commits](250fcd6a74...5311f05890)

---
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-09-15 12:20:35 +09:00
KJ Tsanaktsidis 0117a6d389
Fix Thread#native_thread_id being cached across fork (#8418)
The native thread ID can and does change on some operating systems (e.g.
Linux) after forking, so it needs to be re-queried.

[Bug #19873]
2023-09-15 10:33:32 +09:00
Aaron Patterson f08cac066e Don't call malloc with 0
It seems not-uncommon for methods to have no IV, ISE, or ICVARC caches.
Calling malloc with 0 will actually allocate something, so if there
aren't any caches (`ISEQ_IS_SIZE(body) == 0`), then we can avoid
allocating memory by not calling malloc.  If there are no caches, then
theoretically nobody should be reading from the buffer anyway.

This saves about 1MB on Lobsters benchmark.
2023-09-14 16:15:53 -07:00
Takashi Kokubun 982d6503b9
YJIT: Skip Insn::Comment and format! if disasm is disabled (#8441)
* YJIT: Skip Insn::Comment and format!

if disasm is disabled

Co-authored-by: Alan Wu <alansi.xingwu@shopify.com>

* YJIT: Get rid of asm.comment

---------

Co-authored-by: Alan Wu <alansi.xingwu@shopify.com>
2023-09-14 15:49:40 -07:00
Alan Wu 0ba6c603bc YJIT: Remove UTF-8 BOM [ci skip]
/yjit/src/backend/x86_64/mod.rs Is also UTF-8 and it doesn't have the
marker. The standard recommends against it, so remove it.
2023-09-14 18:40:45 -04:00
Takashi Kokubun 07b615bb3b Skip renaming OpenSSL DLLs
to fix CI failures like:
https://github.com/ruby/ruby/actions/runs/6190995187/job/16808382442
2023-09-14 15:02:12 -07:00
Alan Wu 1961c5bb76
YJIT: Plug native stack overflow
Previously, TestStack#test_machine_stack_size failed pretty consistently
on ARM64 macOS, with Rust code and part of the interpreter used for
per-instruction fallback (rb_vm_invokeblock() and friends) touching the
stack guard page and crashing with SEGV. I've also seen the same test
fail on x64 Linux, though with a different symptom.
2023-09-14 17:18:45 -04:00
Martin Emde 66ffa15ce0 [rubygems/rubygems] Gemfile ruby file: covers more version formats
Increase test coverage and be explicit about what is and is not supported.

https://github.com/rubygems/rubygems/commit/a096397a00
2023-09-14 19:43:21 +00:00
Kevin Newton 0d33bc0cde [ruby/yarp] Simplify multi-target parsing
This simplifies how we handle multi-targets, and also fixes a bug we
had where for loops were always getting multi-targets, even when there
was only a single target.

https://github.com/ruby/yarp/commit/31eb8b7ad5
2023-09-14 19:16:39 +00:00
Kevin Newton 0a8f3670d1 [ruby/yarp] Introduce MatchWriteNode
This rarely used node holds information about the local variables
that need to get written in the case a regular expression is used on
the left-hand side of a =~ operator and it has named capture groups.

Note that we already "handled" these nodes by adding locals to the
AST, but we didn't actually expose this information, making it
difficult to compile.

The general idea behind this node is that it maintains the ability
for consumers to find all of the call nodes in the tree easily so
it's not flattening down. However, it should be okay because you
hopefully don't need any information in the call node to determine
what to compile because the locals list is on the top level.

https://github.com/ruby/yarp/commit/e136e7f9a8
2023-09-14 19:10:58 +00:00
Kevin Newton 9d2549ac31 [ruby/yarp] Write names should not underflow size_t
If the read_name is invalid, we shouldn't try to set a write name.

https://github.com/ruby/yarp/commit/06881c8ca7
2023-09-14 19:10:47 +00:00
Kevin Newton 63d1e05665 [ruby/yarp] Handle errors when operator writes on a call with a block
https://github.com/ruby/yarp/commit/93bec2c173
2023-09-14 18:32:16 +00:00
Kevin Newton fb1328e467 [ruby/yarp] Fix multi target parentheses locations
https://github.com/ruby/yarp/commit/7f71527522
2023-09-14 18:31:55 +00:00
Kevin Newton b098c4247b [ruby/yarp] Remove deprecated aliases
https://github.com/ruby/yarp/commit/db28e22363
2023-09-14 18:31:43 +00:00
Kevin Newton de2fe8631c [ruby/yarp] Extract out parse_write_name
https://github.com/ruby/yarp/commit/0d3e8cdcd7
2023-09-14 18:30:11 +00:00
Kevin Newton 826bebb7d8 [ruby/yarp] Reject invalid call-operator-write
https://github.com/ruby/yarp/commit/d3a852dac2
2023-09-14 18:30:11 +00:00
Kevin Newton 7f6cf2d283 [ruby/yarp] Use bytes instead of bit fields
https://github.com/ruby/yarp/commit/890fa72fdd
2023-09-14 18:28:46 +00:00
Kevin Newton 581bda0cba [ruby/yarp] Add a frozen string flag
https://github.com/ruby/yarp/commit/09248a1f9e
2023-09-14 18:28:45 +00:00
Kevin Newton 282e4388ed [ruby/yarp] Introduce a flag for a static literal check
https://github.com/ruby/yarp/commit/c61658c0fd
2023-09-14 18:28:45 +00:00
Kevin Newton 500f38e06f [ruby/yarp] Parse frozen string literal comment
https://github.com/ruby/yarp/commit/373898e7cb
2023-09-14 18:28:44 +00:00
Kevin Newton 122f3d64be [ruby/yarp] Move booleans on the parser to the end so they are more compact
https://github.com/ruby/yarp/commit/21a43034d0
2023-09-14 18:28:44 +00:00
Kevin Newton 533c4072a9
[YARP] Fix up alias and true node (#8423)
* [YARP] Use ALIAS_METHOD as opposed to ALIAS

* [YARP] Use YP_TRUE_NODE instead of YP_NODE_TRUE_NODE
2023-09-14 14:16:21 -04:00
Takashi Kokubun fcc1699162
YJIT: Initialize Vec with capacity for iterators (#8439) 2023-09-14 10:55:00 -07:00
Nobuyoshi Nakada 9cb33aad55
[Bug #19877] Fix flip-flop in block 2023-09-15 01:09:07 +09:00
Nobuyoshi Nakada 864bb8680c
[Bug #19877] Named captures should take place from regexps in block 2023-09-15 01:09:06 +09:00
Nobuyoshi Nakada e8896a31d4
[Bug #19877] Literals cannot have singleton methods even in blocks 2023-09-15 01:09:06 +09:00
Nobuyoshi Nakada 3f492921c8
Reuse `rb_reg_named_capture_assign_iter_impl` 2023-09-15 01:09:06 +09:00
Kevin Newton 6df0927be2 [ruby/yarp] Remove varargs entirely
Following up on #1483, this removes our usage of varargs entirely.
Under the new approach we make explicit methods for the various
signatures. Because we know the type of everything any it's very
consistent, this makes it easier for compilers to inline.

Also, I renamed the functions to be more consistent with each other
so that we'll have some more internal consistency.

https://github.com/ruby/yarp/commit/87af9ba29b
2023-09-14 15:11:32 +00:00
Takashi Kokubun cdc69da9e5
YJIT: Initialize Assembler vectors with capacity (#8437) 2023-09-14 10:10:31 -04:00
Kevin Newton 1b6d2b9184 [ruby/yarp] Fix up unary minus precedence
https://github.com/ruby/yarp/commit/6be28eeed0
2023-09-14 13:58:33 +00:00
Kevin Newton 174aa53656 [ruby/yarp] Handle concat character literal and string
https://github.com/ruby/yarp/commit/fb141b8d07
2023-09-14 13:58:13 +00:00
Kevin Newton 57745450dd [ruby/yarp] Extract out heredoc parsing into parse_strings
https://github.com/ruby/yarp/commit/c5a1094988
2023-09-14 13:58:12 +00:00
Kevin Newton 72d008d88d [ruby/yarp] Extract out parse_strings
https://github.com/ruby/yarp/commit/55446f7a43
2023-09-14 13:58:12 +00:00
Nobuyoshi Nakada b85bb90c34
[DOC] Sort "Core classes updates" section
Alphabetically by class or module names.
2023-09-14 22:43:55 +09:00
Kevin Newton 9a1c5a1268 [ruby/yarp] Handle invalid operator write on fcall
https://github.com/ruby/yarp/commit/22c800eab1
2023-09-14 13:39:06 +00:00
Nathan Froyd c95f344798 [ruby/yarp] get rid of `accept_any_p` and just use regular functions
https://github.com/ruby/yarp/commit/4512daf769
2023-09-14 12:17:06 +00:00
Nathan Froyd a921d4be43 [ruby/yarp] don't use varargs for common cases of `match_any_type_p`
https://github.com/ruby/yarp/commit/79794b4833
2023-09-14 12:17:06 +00:00
Nathan Froyd 990234015c [ruby/yarp] add some `const` qualifiers
https://github.com/ruby/yarp/commit/e807462c6d
2023-09-14 12:17:05 +00:00
Samuel Williams a095740fed
Fix `io_buffer_get_string` default length computation. (#8427)
* Fix `io_buffer_get_string` default length computation.

When an offset bigger than the size is given, the resulting length will be
computed incorrectly. Raise an argument error in this case.

* Validate all arguments.
2023-09-14 20:37:43 +12:00
Nobuyoshi Nakada 998ae7c3f3
[Bug #19868] Deprecate `Process::Status#&` and `Process::Status#>>` 2023-09-14 15:26:25 +09:00
Nobuyoshi Nakada b6de0a6c69
[Bug #19868] Suggest other Process::Status method for `&` and `>>`
`Process::Status#&` and `Process::Status#>>` are provided only for
the backward compatibility with older Ruby than 1.8 where `$?` was
a `Fixnum`, and the knowledge about internals of system dependent
macros is necessary to use them.  Modern programs and libraries
should not need these methods.
2023-09-14 14:57:57 +09:00
Nobuyoshi Nakada efe5e6e8d0
Negative value to Process::Status method for compatibility 2023-09-14 14:38:14 +09:00
Nathan Froyd e50fcca9a7 [ruby/yarp] make some encoding tables `const`
https://github.com/ruby/yarp/commit/777c376deb
2023-09-14 01:09:33 +00:00