[前][次][番号順一覧][スレッド一覧]

ruby-changes:72283

From: John <ko1@a...>
Date: Wed, 22 Jun 2022 10:34:11 +0900 (JST)
Subject: [ruby-changes:72283] 0c1f64396f (master): Skip protected ancestry guard for FCALLs in YJIT

https://git.ruby-lang.org/ruby.git/commit/?id=0c1f64396f

From 0c1f64396fe351bb47e7ce46354da3eb98d41d40 Mon Sep 17 00:00:00 2001
From: John Hawthorn <john@h...>
Date: Wed, 15 Jun 2022 21:58:16 -0700
Subject: Skip protected ancestry guard for FCALLs in YJIT

---
 yjit/src/codegen.rs | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/yjit/src/codegen.rs b/yjit/src/codegen.rs
index 75249658fb..ef94d58397 100644
--- a/yjit/src/codegen.rs
+++ b/yjit/src/codegen.rs
@@ -4825,7 +4825,12 @@ fn gen_send_general( https://github.com/ruby/ruby/blob/trunk/yjit/src/codegen.rs#L4825
             }
         }
         METHOD_VISI_PROTECTED => {
-            jit_protected_callee_ancestry_guard(jit, cb, ocb, cme, side_exit);
+            // If the method call is an FCALL, it is always valid
+            if flags & VM_CALL_FCALL == 0 {
+                // otherwise we need an ancestry check to ensure the receiver is vaild to be called
+                // as protected
+                jit_protected_callee_ancestry_guard(jit, cb, ocb, cme, side_exit);
+            }
         }
         _ => {
             panic!("cmes should always have a visibility!");
-- 
cgit v1.2.1


--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]