ruby-changes:73308
From: Kevin <ko1@a...>
Date: Tue, 30 Aug 2022 01:10:01 +0900 (JST)
Subject: [ruby-changes:73308] 932885244e (master): Better variable name, no must_use on ccall (https://github.com/Shopify/ruby/pull/424)
https://git.ruby-lang.org/ruby.git/commit/?id=932885244e From 932885244ecb62b22904b9d9842fb7f2be5b7d00 Mon Sep 17 00:00:00 2001 From: Kevin Newton <kddnewton@g...> Date: Thu, 18 Aug 2022 15:40:15 -0400 Subject: Better variable name, no must_use on ccall (https://github.com/Shopify/ruby/pull/424) --- yjit/src/backend/arm64/mod.rs | 4 ++-- yjit/src/backend/ir.rs | 1 - 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/yjit/src/backend/arm64/mod.rs b/yjit/src/backend/arm64/mod.rs index 60cdf2b9d1..3f1bbf99b0 100644 --- a/yjit/src/backend/arm64/mod.rs +++ b/yjit/src/backend/arm64/mod.rs @@ -234,7 +234,7 @@ impl Assembler https://github.com/ruby/ruby/blob/trunk/yjit/src/backend/arm64/mod.rs#L234 // such that only the Op::Load instruction needs to handle that // case. If the values aren't heap objects then we'll treat them as // if they were just unsigned integer. - let skip_load = matches!(insn, Insn::Load { .. }); + let is_load = matches!(insn, Insn::Load { .. }); let mut opnd_iter = insn.opnd_iter_mut(); while let Some(opnd) = opnd_iter.next() { @@ -242,7 +242,7 @@ impl Assembler https://github.com/ruby/ruby/blob/trunk/yjit/src/backend/arm64/mod.rs#L242 Opnd::Value(value) => { if value.special_const_p() { *opnd = Opnd::UImm(value.as_u64()); - } else if !skip_load { + } else if !is_load { *opnd = asm.load(*opnd); } }, diff --git a/yjit/src/backend/ir.rs b/yjit/src/backend/ir.rs index fe525cf31d..4a7bea8dac 100644 --- a/yjit/src/backend/ir.rs +++ b/yjit/src/backend/ir.rs @@ -1234,7 +1234,6 @@ impl Assembler { https://github.com/ruby/ruby/blob/trunk/yjit/src/backend/ir.rs#L1234 self.push_insn(Insn::Breakpoint); } - #[must_use] pub fn ccall(&mut self, fptr: *const u8, opnds: Vec<Opnd>) -> Opnd { let out = self.next_opnd_out(Opnd::match_num_bits(&opnds)); self.push_insn(Insn::CCall { target: Target::FunPtr(fptr), opnds, out }); -- cgit v1.2.1 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/