|
87 | 87 | #include "vm_core.h"
|
88 | 88 | #include "vm_callinfo.h"
|
89 | 89 | #include "mjit.h"
|
| 90 | +#include "mjit_unit.h" |
90 | 91 | #include "gc.h"
|
91 | 92 | #include "ruby_assert.h"
|
92 | 93 | #include "ruby/debug.h"
|
@@ -149,29 +150,6 @@ typedef intptr_t pid_t;
|
149 | 150 | # define USE_JIT_COMPACTION 1
|
150 | 151 | #endif
|
151 | 152 |
|
152 |
| -// The unit structure that holds metadata of ISeq for MJIT. |
153 |
| -struct rb_mjit_unit { |
154 |
| - struct ccan_list_node unode; |
155 |
| - // Unique order number of unit. |
156 |
| - int id; |
157 |
| - // Dlopen handle of the loaded object file. |
158 |
| - void *handle; |
159 |
| - rb_iseq_t *iseq; |
160 |
| -#if defined(_WIN32) |
161 |
| - // DLL cannot be removed while loaded on Windows. If this is set, it'll be lazily deleted. |
162 |
| - char *so_file; |
163 |
| -#endif |
164 |
| - // Only used by unload_units. Flag to check this unit is currently on stack or not. |
165 |
| - bool used_code_p; |
166 |
| - // True if it's a unit for JIT compaction |
167 |
| - bool compact_p; |
168 |
| - // mjit_compile's optimization switches |
169 |
| - struct rb_mjit_compile_info compile_info; |
170 |
| - // captured CC values, they should be marked with iseq. |
171 |
| - const struct rb_callcache **cc_entries; |
172 |
| - unsigned int cc_entries_size; // ISEQ_BODY(iseq)->ci_size + ones of inlined iseqs |
173 |
| -}; |
174 |
| - |
175 | 153 | // Linked list of struct rb_mjit_unit.
|
176 | 154 | struct rb_mjit_unit_list {
|
177 | 155 | struct ccan_list_head head;
|
@@ -1138,13 +1116,6 @@ convert_unit_to_func(struct rb_mjit_unit *unit)
|
1138 | 1116 | }
|
1139 | 1117 | #endif
|
1140 | 1118 |
|
1141 |
| -// To see cc_entries using index returned by `mjit_capture_cc_entries` in mjit_compile.c |
1142 |
| -const struct rb_callcache ** |
1143 |
| -mjit_iseq_cc_entries(const struct rb_iseq_constant_body *const body) |
1144 |
| -{ |
1145 |
| - return body->jit_unit->cc_entries; |
1146 |
| -} |
1147 |
| - |
1148 | 1119 | // Capture cc entries of `captured_iseq` and append them to `compiled_iseq->jit_unit->cc_entries`.
|
1149 | 1120 | // This is needed when `captured_iseq` is inlined by `compiled_iseq` and GC needs to mark inlined cc.
|
1150 | 1121 | //
|
|
0 commit comments