diff options
author | Kevin Newton <kddnewton@gmail.com> | 2022-07-11 17:51:58 -0400 |
---|---|---|
committer | Takashi Kokubun <takashikkbn@gmail.com> | 2022-08-29 08:46:59 -0700 |
commit | 8864691bde2560ef440c4a8dac16b2c661faa228 (patch) | |
tree | 4934f9dc7c92daa820a22b5b11c6dc8a61079b19 /.cirrus.yml | |
parent | e1f3f038e93d5b36ed6e6a15feac478bf3cfe1fa (diff) | |
download | ruby-8864691bde2560ef440c4a8dac16b2c661faa228.tar.gz |
Better label refs (https://github.com/Shopify/ruby/pull/310)
Previously we were using a `Box<dyn FnOnce>` to support patching the
code when jumping to labels. We needed to do this because some of the
closures that were being used to patch needed to capture local variables
(on both X86 and ARM it was the type of condition for the conditional
jumps).
To get around that, we can instead use const generics since the
condition codes are always known at compile-time. This means that the
closures go from polymorphic to monomorphic, which means they can be
represented as an `fn` instead of a `Box<dyn FnOnce>`, which means they
can fall back to a plain function pointer. This simplifies the storage
of the `LabelRef` structs and should hopefully be a better default
going forward.
Diffstat (limited to '.cirrus.yml')
0 files changed, 0 insertions, 0 deletions