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

ruby-changes:52037

From: k0kubun <ko1@a...>
Date: Thu, 9 Aug 2018 20:31:45 +0900 (JST)
Subject: [ruby-changes:52037] k0kubun:r64253 (trunk): process.c: fix outdated mjit_pause declaration

k0kubun	2018-08-09 20:31:41 +0900 (Thu, 09 Aug 2018)

  New Revision: 64253

  https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=64253

  Log:
    process.c: fix outdated mjit_pause declaration
    
    by sharing it with vm.c in internal.h.
    
    vm.c: ditto
    internal.h: ditto
    mjit.h: share more.
    
    mjit.c: make sure the third arguemnt is not used

  Modified files:
    trunk/internal.h
    trunk/mjit.c
    trunk/mjit.h
    trunk/process.c
    trunk/vm.c
Index: internal.h
===================================================================
--- internal.h	(revision 64252)
+++ internal.h	(revision 64253)
@@ -1399,6 +1399,11 @@ VALUE rb_math_sin(VALUE); https://github.com/ruby/ruby/blob/trunk/internal.h#L1399
 VALUE rb_math_sinh(VALUE);
 VALUE rb_math_sqrt(VALUE);
 
+/* mjit.c */
+extern int mjit_enabled;
+VALUE mjit_pause(int argc, VALUE *argv, VALUE recv);
+VALUE mjit_resume(void);
+
 /* newline.c */
 void Init_newline(void);
 
Index: vm.c
===================================================================
--- vm.c	(revision 64252)
+++ vm.c	(revision 64253)
@@ -2770,9 +2770,6 @@ mjit_enabled_p(void) https://github.com/ruby/ruby/blob/trunk/vm.c#L2770
     return mjit_enabled ? Qtrue : Qfalse;
 }
 
-extern VALUE mjit_pause(int argc, VALUE *argv, VALUE recv);
-extern VALUE mjit_resume(void);
-
 extern VALUE *rb_gc_stack_start;
 extern size_t rb_gc_stack_maxsize;
 #ifdef __ia64
Index: process.c
===================================================================
--- process.c	(revision 64252)
+++ process.c	(revision 64253)
@@ -148,10 +148,6 @@ static void check_uid_switch(void); https://github.com/ruby/ruby/blob/trunk/process.c#L148
 static void check_gid_switch(void);
 static int exec_async_signal_safe(const struct rb_execarg *, char *, size_t);
 
-/* mjit.c */
-extern int mjit_enabled;
-VALUE mjit_pause(void);
-
 #if 1
 #define p_uid_from_name p_uid_from_name
 #define p_gid_from_name p_gid_from_name
@@ -2887,7 +2883,7 @@ rb_f_exec(int argc, const VALUE *argv) https://github.com/ruby/ruby/blob/trunk/process.c#L2883
 
     execarg_obj = rb_execarg_new(argc, argv, TRUE, FALSE);
     eargp = rb_execarg_get(execarg_obj);
-    if (mjit_enabled) mjit_pause(); /* do not leak children */
+    if (mjit_enabled) mjit_pause(0, NULL, Qnil); /* do not leak children */
     before_exec(); /* stop timer thread before redirects */
     rb_execarg_parent_start(execarg_obj);
     fail_str = eargp->use_shell ? eargp->invoke.sh.shell_script : eargp->invoke.cmd.command_name;
Index: mjit.c
===================================================================
--- mjit.c	(revision 64252)
+++ mjit.c	(revision 64253)
@@ -1782,7 +1782,7 @@ stop_worker(void) https://github.com/ruby/ruby/blob/trunk/mjit.c#L1782
 
 /* Stop JIT-compiling methods but compiled code is kept available. */
 VALUE
-mjit_pause(int argc, VALUE *argv, VALUE recv)
+mjit_pause(int argc, VALUE *argv, RB_UNUSED_VAR(VALUE self))
 {
     VALUE options = Qnil;
     VALUE wait = Qtrue;
Index: mjit.h
===================================================================
--- mjit.h	(revision 64252)
+++ mjit.h	(revision 64253)
@@ -54,7 +54,6 @@ struct mjit_options { https://github.com/ruby/ruby/blob/trunk/mjit.h#L54
 
 typedef VALUE (*mjit_func_t)(rb_execution_context_t *, rb_control_frame_t *);
 
-extern int mjit_enabled;
 RUBY_SYMBOL_EXPORT_BEGIN
 RUBY_EXTERN struct mjit_options mjit_opts;
 RUBY_EXTERN int mjit_call_p;

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

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