diff options
Diffstat (limited to 'mjit_compile.c')
-rw-r--r-- | mjit_compile.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/mjit_compile.c b/mjit_compile.c index f082d1ce72..7cf3a47267 100644 --- a/mjit_compile.c +++ b/mjit_compile.c @@ -34,6 +34,8 @@ struct compile_status { /* If TRUE, JIT-ed code will use local variables to store pushed values instead of using VM's stack and moving stack pointer. */ int local_stack_p; + /* Safely-accessible is_entries copied from main thread. */ + union iseq_inline_storage_entry *is_entries; }; /* Storage to keep data which is consistent in each conditional branch. @@ -195,7 +197,7 @@ compile_cancel_handler(FILE *f, const struct rb_iseq_constant_body *body, struct /* Compile ISeq to C code in F. It returns 1 if it succeeds to compile. */ int -mjit_compile(FILE *f, const struct rb_iseq_constant_body *body, const char *funcname) +mjit_compile(FILE *f, const struct rb_iseq_constant_body *body, const char *funcname, union iseq_inline_storage_entry *is_entries) { struct compile_status status; status.success = TRUE; @@ -204,6 +206,7 @@ mjit_compile(FILE *f, const struct rb_iseq_constant_body *body, const char *func if (status.stack_size_for_pos == NULL) return FALSE; memset(status.stack_size_for_pos, NOT_COMPILED_STACK_SIZE, sizeof(int) * body->iseq_size); + status.is_entries = is_entries; /* For performance, we verify stack size only on compilation time (mjit_compile.inc.erb) without --jit-debug */ if (!mjit_opts.debug) { |