diff options
author | Takashi Kokubun <takashikkbn@gmail.com> | 2022-07-14 21:53:41 -0700 |
---|---|---|
committer | Takashi Kokubun <takashikkbn@gmail.com> | 2022-07-14 22:54:20 -0700 |
commit | 6c2cad835a0d7d73a00a5048babb113c4afa388b (patch) | |
tree | 555fe5df5f4a4a371a67a5cc1b0e5cd5bdbef374 /mjit_unit.h | |
parent | ed8c21bbd5071b52d0d0612eadbdad8fe192e974 (diff) | |
download | ruby-6c2cad835a0d7d73a00a5048babb113c4afa388b.tar.gz |
MJIT: Share rb_mjit_unit through mjit_unit.h
mjit_compile.c should be able to access this more easily.
Diffstat (limited to 'mjit_unit.h')
-rw-r--r-- | mjit_unit.h | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/mjit_unit.h b/mjit_unit.h new file mode 100644 index 0000000000..2e23a8d5fc --- /dev/null +++ b/mjit_unit.h @@ -0,0 +1,29 @@ +#ifndef INTERNAL_MJIT_H +#define INTERNAL_MJIT_H + +#include "ccan/list/list.h" + +// The unit structure that holds metadata of ISeq for MJIT. +struct rb_mjit_unit { + struct ccan_list_node unode; + // Unique order number of unit. + int id; + // Dlopen handle of the loaded object file. + void *handle; + rb_iseq_t *iseq; +#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. + bool used_code_p; + // True if it's a unit for JIT compaction + bool compact_p; + // 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; + unsigned int cc_entries_size; // ISEQ_BODY(iseq)->ci_size + ones of inlined iseqs +}; + +#endif /* INTERNAL_MJIT_H */ |