aboutsummaryrefslogtreecommitdiffstats
path: root/mjit_worker.c
diff options
context:
space:
mode:
authorTakashi Kokubun <takashikkbn@gmail.com>2022-07-11 23:49:11 -0700
committerTakashi Kokubun <takashikkbn@gmail.com>2022-07-11 23:49:13 -0700
commitcbcc92f7888a7e2425edf57ee82d992c6cbb4f78 (patch)
tree6da453d037870872d5d6ffaf911cd805a1062c29 /mjit_worker.c
parent6e74c5c268c251c5fc772a842c6507f1f621b5e1 (diff)
downloadruby-cbcc92f7888a7e2425edf57ee82d992c6cbb4f78.tar.gz
MJIT: s/assert/VM_ASSERT/
include/ruby/assert.h sets NDEBUG by default. As MJIT CI uses -DVM_CHECK_MODE, using only VM_ASSERT might be more helpful.
Diffstat (limited to 'mjit_worker.c')
-rw-r--r--mjit_worker.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/mjit_worker.c b/mjit_worker.c
index 95c127759e..f164a0957e 100644
--- a/mjit_worker.c
+++ b/mjit_worker.c
@@ -1235,7 +1235,7 @@ unload_units(void)
// Detect units which are in use and can't be unloaded.
ccan_list_for_each(&active_units.head, unit, unode) {
- assert(unit->iseq != NULL && unit->handle != NULL);
+ VM_ASSERT(unit->iseq != NULL && unit->handle != NULL);
unit->used_code_p = false;
}
// All threads have a root_fiber which has a mjit_cont. Other normal fibers also
@@ -1267,7 +1267,7 @@ unload_units(void)
if (max_queue_calls > ISEQ_BODY(unit->iseq)->total_calls) {
verbose(2, "Unloading unit %d (calls=%lu, threshold=%lu)",
unit->id, ISEQ_BODY(unit->iseq)->total_calls, max_queue_calls);
- assert(unit->handle != NULL);
+ VM_ASSERT(unit->handle != NULL);
remove_from_list(unit, &active_units);
free_unit(unit);
unloaded_p = true;