From a48d1d799185e6abfc8cf306eed7a7a24d42911c Mon Sep 17 00:00:00 2001 From: k0kubun Date: Sat, 11 Aug 2018 09:37:14 +0000 Subject: 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 --- mjit.c | 31 ++----------------------------- 1 file changed, 2 insertions(+), 29 deletions(-) (limited to 'mjit.c') 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 -#include -#else -#include -#include -#include -#endif -#include -#ifdef HAVE_FCNTL_H -#include -#endif -#ifdef HAVE_SYS_PARAM_H -# include -#endif - -#include "dln.h" -#include "mjit_internal.h" extern int rb_thread_create_mjit_thread(void (*worker_func)(void)); -- cgit v1.2.3