| Age | Commit message (Collapse) | Author |
|
Notes:
Merged: https://github.com/ruby/ruby/pull/13527
|
|
I didn't know `rb_ivar_get` existed until @Xrxr pointed me to it.
Thanks, Alan!
Notes:
Merged: https://github.com/ruby/ruby/pull/13527
|
|
Notes:
Merged-By: k0kubun <takashikkbn@gmail.com>
|
|
* ZJIT: Pass self through basic block params
Co-authored-by: Max Bernstein <tekknolagi@gmail.com>
* Add comments for self
* Use self_param for ivar
* Make self_param a loop local
* Fix rest parameter type check
* Push self_param first
* Add a test case for putself
* Use SELF_PARAM_IDX
Co-authored-by: Max Bernstein <tekknolagi@gmail.com>
* Fix test_unknown
---------
Co-authored-by: Max Bernstein <tekknolagi@gmail.com>
Notes:
Merged-By: k0kubun <takashikkbn@gmail.com>
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/13524
|
|
Now all flags are only in the `shape_id_t`, and can all be checked
without needing to dereference a pointer.
Notes:
Merged: https://github.com/ruby/ruby/pull/13515
|
|
* Add newrange support to zjit
* Add RangeType enum for Range insn's flag
* Address other feedback
Notes:
Merged-By: k0kubun <takashikkbn@gmail.com>
|
|
Co-authored-by: Max Bernstein <tekknolagi@gmail.com>
Co-authored-by: Alan Wu <alansi.xingwu@shopify.com>
Notes:
Merged-By: k0kubun <takashikkbn@gmail.com>
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/13487
Merged-By: XrXr
|
|
Instead it's now a `shape_id` flag.
This allows to check if an object is complex without having
to chase the `rb_shape_t` pointer.
Notes:
Merged: https://github.com/ruby/ruby/pull/13511
|
|
The FrameState on the SendWithoutBlock represents the entry state,
but for instructions that push to the stack in the middle of the
instruction before actually doing the send like opt_aref_with,
the FrameState is incorrect. We need to write to the stack using the
arguments for the instruction.
Notes:
Merged: https://github.com/ruby/ruby/pull/13468
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/13468
|
|
Followup: https://github.com/ruby/ruby/pull/13341 / [Feature #21353]
Even thought `shape_id_t` has been make 32bits, we were still limited
to use only the lower 16 bits because they had to fit alongside `attr_index_t`
inside a `uintptr_t` in inline caches.
By enlarging inline caches we can unlock the full 32bits on all
platforms, allowing to use these extra bits for tagging.
Notes:
Merged: https://github.com/ruby/ruby/pull/13500
|
|
Whenever we run into an inline cache miss when we try to set
an ivar, we may need to take the global lock, just to be able to
lookup inside `shape->edges`.
To solve that, when we're in multi-ractor mode, we can treat
the `shape->edges` as immutable. When we need to add a new
edge, we first copy the table, and then replace it with
CAS.
This increases memory allocations, however we expect that
creating new transitions becomes increasingly rare over time.
```ruby
class A
def initialize(bool)
@a = 1
if bool
@b = 2
else
@c = 3
end
end
def test
@d = 4
end
end
def bench(iterations)
i = iterations
while i > 0
A.new(true).test
A.new(false).test
i -= 1
end
end
if ARGV.first == "ractor"
ractors = 8.times.map do
Ractor.new do
bench(20_000_000 / 8)
end
end
ractors.each(&:take)
else
bench(20_000_000)
end
```
The above benchmark takes 27 seconds in Ractor mode on Ruby 3.4,
and only 1.7s with this branch.
Co-Authored-By: Étienne Barrié <etienne.barrie@gmail.com>
Notes:
Merged: https://github.com/ruby/ruby/pull/13441
|
|
Notes:
Merged-By: k0kubun <takashikkbn@gmail.com>
|
|
Notes:
Merged-By: k0kubun <takashikkbn@gmail.com>
|
|
This will be useful when we split Send into Lookup+Call.
For reasoning about various method types during optimization.
|
|
Previously we used a flag to set whether a module was uninitialized.
When checked whether a class was initialized, we first had to check that
it had a non-zero superclass, as well as that it wasn't BasicObject.
With the advent of namespaces, RCLASS_SUPER is now an expensive
operation, and though we could just check for the prime superclass, we
might as well take this opportunity to use a flag so that we can perform
the initialized check with as few instructions as possible.
It's possible in the future that we could prevent uninitialized classes
from being available to the user, but currently there are a few ways to
do that.
Notes:
Merged: https://github.com/ruby/ruby/pull/13443
|
|
Further reduce exposure of `rb_shape_t`.
Notes:
Merged: https://github.com/ruby/ruby/pull/13450
|
|
We should avoid conversions from `rb_shape_t *` into `shape_id_t`
outside of `shape.c` as the short term goal is to have `shape_id_t`
contain tags.
Notes:
Merged: https://github.com/ruby/ruby/pull/13448
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/13432
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/13432
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/13432
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/13430
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/13430
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/13430
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/13430
|
|
No need to bail out of compilation completely; we can compile all the
code up until that point.
Notes:
Merged: https://github.com/ruby/ruby/pull/13430
|
|
Notes:
Merged-By: k0kubun <takashikkbn@gmail.com>
|
|
Co-Authored-By: Max Bernstein <max.bernstein@shopify.com>
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/13414
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/13414
|
|
Notes:
Merged-By: k0kubun <takashikkbn@gmail.com>
|
|
Given `InsnId` is at the top of the file and everywhere, hopefully this
will help first time readers.
Notes:
Merged: https://github.com/ruby/ruby/pull/13399
|
|
Allow DCE to remove some CCalls
Add `elidable` field that signals that there would be no discernible
effect if the call to the method were removed. The default is false.
Notes:
Merged-By: k0kubun <takashikkbn@gmail.com>
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/13377
|
|
Notes:
Merged-By: k0kubun <takashikkbn@gmail.com>
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/13355
|
|
Right now we just crash if we can't compile an ISEQ for any reason
(unimplemented in HIR, unimplemented in codegen, ...) and this fixes
that by bailing out.
Notes:
Merged: https://github.com/ruby/ruby/pull/13356
|
|
This commit allows building YJIT and ZJIT simultaneously, a "combo
build". Previously, `./configure --enable-yjit --enable-zjit` failed. At
runtime, though, only one of the two can be enabled at a time.
Add a root Cargo workspace that contains both the yjit and zjit crate.
The common Rust build integration mechanisms are factored out into
defs/jit.mk.
Combo YJIT+ZJIT dev builds are supported; if either JIT uses
`--enable-*=dev`, both of them are built in dev mode.
The combo build requires Cargo, but building one JIT at a time with only
rustc in release build remains supported.
Notes:
Merged: https://github.com/ruby/ruby/pull/13262
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/13276
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/13276
|
|
The rest parameter is always a rb_cArray, even when anonymous. (This is
different from kw_rest, which can be nil.)
Notes:
Merged: https://github.com/ruby/ruby/pull/13276
|
|
Use total parameter size instead of lead parameter size when parsing
iseq into hir. Also, copy over IntoUsize for compile-time checked
u32->usize cast.
Notes:
Merged: https://github.com/ruby/ruby/pull/13276
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/13276
|
|
Notes:
Merged-By: k0kubun <takashikkbn@gmail.com>
|
|
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/13279
|
|
As well as `RB_OBJ_SHAPE_ID` -> `rb_obj_shape_id`
and `RSHAPE` is now a simple alias for `rb_shape_lookup`.
I tried to turn all these into `static inline` but I'm having
trouble with `RUBY_EXTERN rb_shape_tree_t *rb_shape_tree_ptr;`
not being exposed as I'd expect.
Notes:
Merged: https://github.com/ruby/ruby/pull/13283
|
|
And `rb_shape_get_shape` -> `RB_OBJ_SHAPE`.
Notes:
Merged: https://github.com/ruby/ruby/pull/13283
|