When sharing between threads we need both atomic reads and writes. We
probably didn't need to use this in some cases (where we weren't running
in multi-ractor mode) but I think it's best to be consistent.
This was using < so subtract one from the last shape id would have us
miss the last inserted shape. I think this is unlikely to have caused
issues because I don't think the newest shape will ever have edges.
We do need to use `- 1` because otherwise RSHAPE wraps around and
returns the root shape.
io-wait became a default gem at ruby 3.0.
Even it can be installed on earlier versions, but the standard library
will be loaded instead of the installed gem.
https://github.com/ruby/io-wait/commit/15b96736cd
io-nonblock became a default gem at ruby 3.0.
Even it can be installed on earlier versions, but the standard library
will be loaded instead of the installed gem.
https://github.com/ruby/io-nonblock/commit/c86d0d37af
* Conditionally set changelog_url if gh username passed
and enabled
* conditionally set homepage, source code uri, homepage uri when gh
username passed in
* update documentation to say username will also be used for gemspec file
https://github.com/rubygems/rubygems/commit/1c1ada593b
We sometimes send HEAD requests. The s3_uri_signer.rb code allways assumed GETs.
This lead to consistently getting 403 responses back from S3. Recently, S3
attempted to change the behaviour of how 403s are handled when TCP connections
are reused, which escalated this bug from "just noise" to "breaks gem installs".
They've reverted that behaviour, so the severity of this problem is back to
"just noise". Either way, it's a bug in rubygems and warrants a fix it.
https://github.com/rubygems/rubygems/commit/c38f502b73
ZJIT already can generate guard type instructions for *Exact types.
For example:
```
def test(strings)
strings.map do |string|
string.bytesize
end
end
test(["foo", "bar"])
```
```
HIR:
fn block in test:
bb0(v0:BasicObject, v1:BasicObject):
PatchPoint MethodRedefined(String@0x1014be890, bytesize@0x19f1)
v7:StringExact = GuardType v1, StringExact
v8:Fixnum = CCall bytesize@0x16fa4cc18, v7
Return v8
```
But zjit only supported guarding fixnums so this script would panic.
This commit adds support for guarding *Exact types.
This allows ZJIT to profile `nil?` calls and create type guards for
its receiver.
- Add `zjit_profile` to `opt_nil_p` insn
- Start profiling `opt_nil_p` calls
- Use `runtime_exact_ruby_class` instead of `exact_ruby_class` to determine
the profiled receiver class
Along the same lines as the `opnd` macro we already have, but for a
`Vec<InsnId>` instead of a single `InsnId`.
This gets a few for loops and `jit.get_opnd` calls out of the `gen_`
functions.
None of the datastructures involved in the require process are
safe to call on a secondary ractor, however when autoloading
encodings, we do so from the current ractor.
So all sorts of corruption can happen when using an autoloaded
encoding for the first time from a secondary ractor.
Prior to this commit the debug output for negative offsets would look
like:
```
Mem64[Reg(3) - -8
```
That makes it look like we're adding instead of subtracting. After this
commit we'll print:
```
Mem64[Reg(3) - 8
```