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

ruby-changes:58786

From: Koichi <ko1@a...>
Date: Thu, 14 Nov 2019 04:21:54 +0900 (JST)
Subject: [ruby-changes:58786] 179062dd80 (master): move rb_vm_lvar_exposed() correctly.

https://git.ruby-lang.org/ruby.git/commit/?id=179062dd80

From 179062dd808c0a48e16269a2c42b10235cbbacd8 Mon Sep 17 00:00:00 2001
From: Koichi Sasada <ko1@a...>
Date: Thu, 14 Nov 2019 04:18:41 +0900
Subject: move rb_vm_lvar_exposed() correctly.

rb_vm_lvar_exposed() is prepared for __builtin_inline!(), needed for
mini_builtin.c and builtin.c. However, it's only on builtin.c.
So move it to make it as a part of VM.

diff --git a/builtin.c b/builtin.c
index d0d998d..5ad7f23 100644
--- a/builtin.c
+++ b/builtin.c
@@ -41,11 +41,3 @@ Init_builtin(void) https://github.com/ruby/ruby/blob/trunk/builtin.c#L41
 {
     //
 }
-
-// inline
-VALUE
-rb_vm_lvar_exposed(rb_execution_context_t *ec, int index)
-{
-    const rb_control_frame_t *cfp = ec->cfp;
-    return cfp->ep[index];
-}
diff --git a/vm_insnhelper.c b/vm_insnhelper.c
index 205b4d9..e5a7c77 100644
--- a/vm_insnhelper.c
+++ b/vm_insnhelper.c
@@ -4995,3 +4995,12 @@ vm_invoke_builtin_delegate(rb_execution_context_t *ec, rb_control_frame_t *cfp, https://github.com/ruby/ruby/blob/trunk/vm_insnhelper.c#L4995
     // fprintf(stderr, "%s %s(%d):%p\n", __func__, bf->name, bf->argc, bf->func_ptr);
     return invoke_bf(ec, cfp, bf, argv);
 }
+
+// for __builtin_inline!()
+
+VALUE
+rb_vm_lvar_exposed(rb_execution_context_t *ec, int index)
+{
+    const rb_control_frame_t *cfp = ec->cfp;
+    return cfp->ep[index];
+}
-- 
cgit v0.10.2


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

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