diff options
author | Takashi Kokubun <[email protected]> | 2020-02-26 00:27:28 -0800 |
---|---|---|
committer | Takashi Kokubun <[email protected]> | 2020-02-26 00:27:29 -0800 |
commit | 69f377a3d62b29bc927da7fdae99bcb5e7d096fe (patch) | |
tree | 50b8df9107fcc48cff18d609b63fa3b305319322 /mjit.h | |
parent | daf7c48d888fb544590985db179e39aa53ae79a1 (diff) |
Internalize rb_mjit_unit definition again
Fixed a TODO in b9007b6c548f91e88fd3f2ffa23de740431fa969
Diffstat (limited to 'mjit.h')
-rw-r--r-- | mjit.h | 30 |
1 files changed, 1 insertions, 29 deletions
@@ -70,35 +70,6 @@ struct rb_mjit_compile_info { bool disable_inlining; }; -// The unit structure that holds metadata of ISeq for MJIT. -struct rb_mjit_unit { - // Unique order number of unit. - int id; - // Dlopen handle of the loaded object file. - void *handle; - rb_iseq_t *iseq; -#ifndef _MSC_VER - // This value is always set for `compact_all_jit_code`. Also used for lazy deletion. - char *o_file; - // true if it's inherited from parent Ruby process and lazy deletion should be skipped. - // `o_file = NULL` can't be used to skip lazy deletion because `o_file` could be used - // by child for `compact_all_jit_code`. - bool o_file_inherited_p; -#endif -#if defined(_WIN32) - // DLL cannot be removed while loaded on Windows. If this is set, it'll be lazily deleted. - char *so_file; -#endif - // Only used by unload_units. Flag to check this unit is currently on stack or not. - char used_code_p; - struct list_node unode; - // mjit_compile's optimization switches - struct rb_mjit_compile_info compile_info; - - // captured CC values, they should be marked with iseq. - const struct rb_callcache **cc_entries; // size: iseq->body->ci_size -}; - typedef VALUE (*mjit_func_t)(rb_execution_context_t *, rb_control_frame_t *); RUBY_SYMBOL_EXPORT_BEGIN @@ -122,6 +93,7 @@ extern struct mjit_cont *mjit_cont_new(rb_execution_context_t *ec); extern void mjit_cont_free(struct mjit_cont *cont); extern void mjit_add_class_serial(rb_serial_t class_serial); extern void mjit_remove_class_serial(rb_serial_t class_serial); +const struct rb_callcache ** mjit_iseq_cc_entries(const struct rb_iseq_constant_body *const body); // A threshold used to reject long iseqs from JITting as such iseqs // takes too much time to be compiled. |