summaryrefslogtreecommitdiff
path: root/mjit_compile.c
diff options
context:
space:
mode:
authork0kubun <k0kubun@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-08-11 07:57:58 +0000
committerk0kubun <k0kubun@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-08-11 07:57:58 +0000
commitddcb40f5952965561ca19d97495ebeb977590060 (patch)
tree3c46754c18a7be81b62a440b0700dacfe01fc9bc /mjit_compile.c
parentc9a30858fcac984f7c49084584f7b18deac32383 (diff)
mjit_worker.c: carve out worker-related code
The motivation of this change is to make sure rb_funcall or GC-related functions are not called on worker-related code. Currently such functions are used in some places and I believe it's partly because it's hard to identify which part is called on MJIT worker thread. Now, mjit.c is safe to use them but we know we need to safely deal with mjit_compile.c, mjit_worker.c and mjit_internal.h. mjit_compile.c: update the comment about it git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64285 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'mjit_compile.c')
-rw-r--r--mjit_compile.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/mjit_compile.c b/mjit_compile.c
index 63a24837fe..63d0757877 100644
--- a/mjit_compile.c
+++ b/mjit_compile.c
@@ -6,6 +6,10 @@
**********************************************************************/
+/* NOTE: All functions in this file are executed on MJIT worker. So don't
+ call Ruby methods (C functions that may call rb_funcall) or trigger
+ GC (using xmalloc, ZALLOC, etc.) in this file. */
+
#include "internal.h"
#include "vm_core.h"
#include "vm_exec.h"