summaryrefslogtreecommitdiff
path: root/vm.c
diff options
context:
space:
mode:
authork0kubun <k0kubun@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-08-09 11:39:07 +0000
committerk0kubun <k0kubun@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-08-09 11:39:07 +0000
commit2e003f6c873e073448e64ca4a644ce4e92a10182 (patch)
tree2d435c02f3f16846770619eda5f5eaedb1742290 /vm.c
parent212a77ed46d73af3600756247f7c30d6c270eff1 (diff)
process.c: don't wait JIT queue flush on rb_f_exec
This wasn't intended in r64253. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64254 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'vm.c')
-rw-r--r--vm.c19
1 files changed, 18 insertions, 1 deletions
diff --git a/vm.c b/vm.c
index 89be8a0..77f0276 100644
--- a/vm.c
+++ b/vm.c
@@ -2770,6 +2770,23 @@ mjit_enabled_p(void)
return mjit_enabled ? Qtrue : Qfalse;
}
+static VALUE
+mjit_pause_m(int argc, VALUE *argv, RB_UNUSED_VAR(VALUE self))
+{
+ VALUE options = Qnil;
+ VALUE wait = Qtrue;
+ rb_scan_args(argc, argv, "0:", &options);
+
+ if (!NIL_P(options)) {
+ static ID keyword_ids[1];
+ if (!keyword_ids[0])
+ keyword_ids[0] = rb_intern("wait");
+ rb_get_kwargs(options, keyword_ids, 0, 1, &wait);
+ }
+
+ return mjit_pause(RTEST(wait));
+}
+
extern VALUE *rb_gc_stack_start;
extern size_t rb_gc_stack_maxsize;
#ifdef __ia64
@@ -2858,7 +2875,7 @@ Init_VM(void)
/* RubyVM::MJIT */
mjit = rb_define_module_under(rb_cRubyVM, "MJIT");
rb_define_singleton_method(mjit, "enabled?", mjit_enabled_p, 0);
- rb_define_singleton_method(mjit, "pause", mjit_pause, -1);
+ rb_define_singleton_method(mjit, "pause", mjit_pause_m, -1);
rb_define_singleton_method(mjit, "resume", mjit_resume, 0);
/*