Skip to content

Commit 09bc3ab

Browse files
committed
MJIT: Deal with a TODO with assertion
1 parent 6fd5d2d commit 09bc3ab

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

mjit.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1145,6 +1145,7 @@ check_unit_queue(void)
11451145
// Dequeue a unit
11461146
struct rb_mjit_unit *unit = get_from_list(&unit_queue);
11471147
if (unit == NULL) return;
1148+
VM_ASSERT(!unit->compact_p);
11481149

11491150
// Run the MJIT compiler synchronously
11501151
current_cc_ms = real_ms_time();
@@ -1164,7 +1165,7 @@ check_unit_queue(void)
11641165
current_cc_pid = start_c_compile_unit(unit);
11651166
if (current_cc_pid == -1) { // JIT failure
11661167
current_cc_pid = 0;
1167-
current_cc_unit->iseq->body->jit_func = (jit_func_t)MJIT_FUNC_FAILED; // TODO: consider unit->compact_p
1168+
current_cc_unit->iseq->body->jit_func = (jit_func_t)MJIT_FUNC_FAILED;
11681169
current_cc_unit = NULL;
11691170
}
11701171
}

0 commit comments

Comments
 (0)