aboutsummaryrefslogtreecommitdiffstats
path: root/vm_insnhelper.c
diff options
context:
space:
mode:
authorKoichi Sasada <ko1@atdot.net>2020-02-03 16:57:41 +0900
committerKoichi Sasada <ko1@atdot.net>2020-02-03 16:57:41 +0900
commita635c93fdebeda6347b8654af1a191e214ad7ccf (patch)
tree879bfe80af350b894ffdebd6cb532567c096650c /vm_insnhelper.c
parentdb69c5098781087c954e5fc0aaf3079a66f6d6d5 (diff)
downloadruby-a635c93fdebeda6347b8654af1a191e214ad7ccf.tar.gz
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.
Diffstat (limited to 'vm_insnhelper.c')
-rw-r--r--vm_insnhelper.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/vm_insnhelper.c b/vm_insnhelper.c
index d69340b071..d2b8a63676 100644
--- a/vm_insnhelper.c
+++ b/vm_insnhelper.c
@@ -217,7 +217,8 @@ vm_check_frame(VALUE type,
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)
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)
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)
rb_bug("dead canary found at %s: %s", insn, str);
}
+#endif
#else
void Init_vm_stack_canary(void) { /* nothing to do */ }