summaryrefslogtreecommitdiff
path: root/mjit.c
diff options
context:
space:
mode:
authork0kubun <k0kubun@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-08-11 09:37:14 +0000
committerk0kubun <k0kubun@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-08-11 09:37:14 +0000
commita48d1d799185e6abfc8cf306eed7a7a24d42911c (patch)
tree38f48cf07112152cdbb955d3f0bae218aeb132ad /mjit.c
parent6306aa9222ec1b67c5c94811bd2aff5e43ba779e (diff)
mjit.c: include mjit_worker.c
instead of linking functions with mjit_worker.o. In the r64285's structure, we needed to publish some variables with mjit_ prefix. But ideally those variables should be completely private in mjit.o (or old mjit_worker.o), and it was hard. So I chose an approach similar to vm*.c for mjit.c and mjit_worker.c. I believe mjit_compile.c is still nice to be separated. After this commit, I'll remove the mjit_ prefix again... git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64289 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'mjit.c')
-rw-r--r--mjit.c31
1 files changed, 2 insertions, 29 deletions
diff --git a/mjit.c b/mjit.c
index 36ada7ce16..b5c3674079 100644
--- a/mjit.c
+++ b/mjit.c
@@ -9,38 +9,11 @@
/* Functions in this file are never executed on MJIT worker thread.
So you can safely use Ruby methods and GC in this file. */
-#ifdef __sun
-#define __EXTENSIONS__ 1
-#endif
+/* To share variables privately, include mjit_worker.c instead of linking. */
+#include "mjit_worker.c"
-#include "internal.h"
-#include "vm_core.h"
-#include "mjit.h"
-#include "gc.h"
#include "constant.h"
#include "id_table.h"
-#include "ruby_assert.h"
-#include "ruby/thread.h"
-#include "ruby/util.h"
-
-#ifdef _WIN32
-#include <winsock2.h>
-#include <windows.h>
-#else
-#include <sys/wait.h>
-#include <sys/time.h>
-#include <dlfcn.h>
-#endif
-#include <errno.h>
-#ifdef HAVE_FCNTL_H
-#include <fcntl.h>
-#endif
-#ifdef HAVE_SYS_PARAM_H
-# include <sys/param.h>
-#endif
-
-#include "dln.h"
-#include "mjit_internal.h"
extern int rb_thread_create_mjit_thread(void (*worker_func)(void));