diff options
Diffstat (limited to 'vm_core.h')
-rw-r--r-- | vm_core.h | 62 |
1 files changed, 35 insertions, 27 deletions
@@ -46,6 +46,19 @@ #define VMDEBUG 3 #endif +#include "ruby/config.h" + +#include <stddef.h> +#include <signal.h> + +#ifdef HAVE_STDARG_PROTOTYPES +#include <stdarg.h> +#define va_init_list(a,b) va_start((a),(b)) +#else +#include <varargs.h> +#define va_init_list(a,b) va_start((a)) +#endif + #include "ruby_assert.h" #if VM_CHECK_MODE > 0 @@ -57,27 +70,21 @@ #define VM_UNREACHABLE(func) UNREACHABLE #endif -#define RUBY_VM_THREAD_MODEL 2 - -/* - * implementation selector of get_insn_info algorithm - * 0: linear search - * 1: binary search - * 2: succinct bitvector - */ -#ifndef VM_INSN_INFO_TABLE_IMPL -# define VM_INSN_INFO_TABLE_IMPL 2 -#endif - -#include "ruby/ruby.h" -#include "ruby/st.h" +#include <setjmp.h> -#include "node.h" -#include "vm_opts.h" #include "id.h" +#include "internal.h" +#include "internal/array.h" +#include "internal/serial.h" +#include "internal/stdbool.h" +#include "ccan/list/list.h" +#include "internal/vm.h" #include "method.h" +#include "node.h" +#include "ruby/ruby.h" +#include "ruby/st.h" #include "ruby_atomic.h" -#include "ccan/list/list.h" +#include "vm_opts.h" #include "ruby/thread_native.h" #if defined(_WIN32) @@ -86,8 +93,17 @@ #include "thread_pthread.h" #endif -#include <setjmp.h> -#include <signal.h> +#define RUBY_VM_THREAD_MODEL 2 + +/* + * implementation selector of get_insn_info algorithm + * 0: linear search + * 1: binary search + * 2: succinct bitvector + */ +#ifndef VM_INSN_INFO_TABLE_IMPL +# define VM_INSN_INFO_TABLE_IMPL 2 +#endif #if defined(NSIG_MAX) /* POSIX issue 8 */ # undef NSIG @@ -123,14 +139,6 @@ /* define to 0 to test old code path */ #define WAITPID_USE_SIGCHLD (RUBY_SIGCHLD || SIGCHLD_LOSSY) -#ifdef HAVE_STDARG_PROTOTYPES -#include <stdarg.h> -#define va_init_list(a,b) va_start((a),(b)) -#else -#include <varargs.h> -#define va_init_list(a,b) va_start((a)) -#endif - #if defined(SIGSEGV) && defined(HAVE_SIGALTSTACK) && defined(SA_SIGINFO) && !defined(__NetBSD__) # define USE_SIGALTSTACK void *rb_register_sigaltstack(void); |