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

ruby-changes:64329

From: Takashi <ko1@a...>
Date: Sat, 19 Dec 2020 17:28:44 +0900 (JST)
Subject: [ruby-changes:64329] 52b1716c78 (master): Fix vm_search_invokeblock

https://git.ruby-lang.org/ruby.git/commit/?id=52b1716c78

From 52b1716c78a7ad9daa317e3eb43f744744b9f736 Mon Sep 17 00:00:00 2001
From: Takashi Kokubun <takashikkbn@g...>
Date: Sat, 19 Dec 2020 00:27:42 -0800
Subject: Fix vm_search_invokeblock

call_ needs to be vm_invokeblock_i, and flags is also not empty.

diff --git a/vm_insnhelper.c b/vm_insnhelper.c
index b62ab17..73d90e6 100644
--- a/vm_insnhelper.c
+++ b/vm_insnhelper.c
@@ -4438,7 +4438,14 @@ vm_search_method_wrap(const struct rb_control_frame_struct *reg_cfp, struct rb_c https://github.com/ruby/ruby/blob/trunk/vm_insnhelper.c#L4438
 static const struct rb_callcache *
 vm_search_invokeblock(const struct rb_control_frame_struct *reg_cfp, struct rb_call_data *cd, VALUE recv)
 {
-    return rb_vm_empty_cc();
+    static const struct rb_callcache cc = {
+        .flags = T_IMEMO | (imemo_callcache << FL_USHIFT) | VM_CALLCACHE_UNMARKABLE,
+        .klass = 0,
+        .cme_  = 0,
+        .call_ = vm_invokeblock_i,
+        .aux_  = {0},
+    };
+    return &cc;
 }
 
 # define mexp_search_method vm_search_method_wrap
-- 
cgit v0.10.2


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

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