mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
add disabling MJIT features option.
* configure.ac: introduce new configure option `--enable-mjit` and `--disable-mjit`. Default is "enable". `--disable-mjit` disables all of MJIT features so that `ruby --jit` can't enable MJIT. This option affect a macro `USE_MJIT`. This change remove `--enable/disable-install-mjit-header` option. * Makefile.in: introduce the `ENABLE_MJIT` variable. * common.mk: use `ENABLE_MJIT` option. * internal.h: respect `USE_MJIT`. Same as other *.c, *.h. * test/ruby/test_jit.rb: check `ENABLE_MJIT` key of rbconfg.rb. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65204 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
d79f72521e
commit
b710785f1a
16 changed files with 86 additions and 11 deletions
18
mjit.h
18
mjit.h
|
|
@ -11,6 +11,8 @@
|
|||
|
||||
#include "ruby.h"
|
||||
|
||||
#if USE_MJIT
|
||||
|
||||
/* Special address values of a function generated from the
|
||||
corresponding iseq by MJIT: */
|
||||
enum rb_mjit_iseq_func {
|
||||
|
|
@ -125,4 +127,20 @@ mjit_exec(rb_execution_context_t *ec)
|
|||
return func(ec, ec->cfp);
|
||||
}
|
||||
|
||||
void mjit_child_after_fork(void);
|
||||
|
||||
#else /* USE_MJIT */
|
||||
static inline struct mjit_cont *mjit_cont_new(rb_execution_context_t *ec){return NULL;}
|
||||
static inline void mjit_cont_free(struct mjit_cont *cont){}
|
||||
static inline void mjit_finish(void){}
|
||||
static inline void mjit_gc_start_hook(void){}
|
||||
static inline void mjit_gc_finish_hook(void){}
|
||||
static inline void mjit_free_iseq(const rb_iseq_t *iseq){}
|
||||
static inline void mjit_mark(void){}
|
||||
static inline void mjit_add_class_serial(rb_serial_t class_serial){}
|
||||
static inline void mjit_remove_class_serial(rb_serial_t class_serial){}
|
||||
static inline VALUE mjit_exec(rb_execution_context_t *ec) { return Qundef; /* unreachable */ }
|
||||
static inline void mjit_child_after_fork(void){}
|
||||
|
||||
#endif /* USE_MJIT */
|
||||
#endif /* RUBY_MJIT_H */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue