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

ruby-changes:59914

From: Koichi <ko1@a...>
Date: Mon, 3 Feb 2020 16:59:18 +0900 (JST)
Subject: [ruby-changes:59914] a635c93fde (master): support MJIT with debug option.

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

From a635c93fdebeda6347b8654af1a191e214ad7ccf Mon Sep 17 00:00:00 2001
From: Koichi Sasada <ko1@a...>
Date: Mon, 3 Feb 2020 16:57:41 +0900
Subject: support MJIT with debug option.

VM_CHECK_MODE > 0 with optflags=-O0 can not run JIT tests because
of link problems. This patch fix them.

diff --git a/vm_insnhelper.c b/vm_insnhelper.c
index d69340b..d2b8a63 100644
--- a/vm_insnhelper.c
+++ b/vm_insnhelper.c
@@ -217,7 +217,8 @@ vm_check_frame(VALUE type, https://github.com/ruby/ruby/blob/trunk/vm_insnhelper.c#L217
 static VALUE vm_stack_canary; /* Initialized later */
 static bool vm_stack_canary_was_born = false;
 
-static void
+#ifndef MJIT_HEADER
+MJIT_FUNC_EXPORTED void
 vm_check_canary(const rb_execution_context_t *ec, VALUE *sp)
 {
     const struct rb_control_frame_struct *reg_cfp = ec->cfp;
@@ -264,6 +265,8 @@ vm_check_canary(const rb_execution_context_t *ec, VALUE *sp) https://github.com/ruby/ruby/blob/trunk/vm_insnhelper.c#L265
         name, stri, pos, strd);
     rb_bug("see above.");
 }
+#endif
+
 #else
 #define vm_check_canary(ec, sp)
 #define vm_check_frame(a, b, c, d)
@@ -4818,7 +4821,8 @@ Init_vm_stack_canary(void) https://github.com/ruby/ruby/blob/trunk/vm_insnhelper.c#L4821
     VM_ASSERT(n == 0);
 }
 
-static void
+#ifndef MJIT_HEADER
+MJIT_FUNC_EXPORTED void
 vm_canary_is_found_dead(enum ruby_vminsn_type i, VALUE c)
 {
     /* Because a method has already been called, why not call
@@ -4829,6 +4833,7 @@ vm_canary_is_found_dead(enum ruby_vminsn_type i, VALUE c) https://github.com/ruby/ruby/blob/trunk/vm_insnhelper.c#L4833
 
     rb_bug("dead canary found at %s: %s", insn, str);
 }
+#endif
 
 #else
 void Init_vm_stack_canary(void) { /* nothing to do */ }
-- 
cgit v0.10.2


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

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