Assert in_gc >= 0 instead of guarding it (#3687)
This commit is contained in:
parent
7cf34cfaa3
commit
40bad72f31
Notes:
git
2020-10-23 13:59:41 +09:00
Merged-By: k0kubun <takashikkbn@gmail.com>
4
mjit.c
4
mjit.c
@ -109,9 +109,7 @@ mjit_gc_exit_hook(void)
|
|||||||
return;
|
return;
|
||||||
CRITICAL_SECTION_START(4, "mjit_gc_exit_hook");
|
CRITICAL_SECTION_START(4, "mjit_gc_exit_hook");
|
||||||
in_gc--;
|
in_gc--;
|
||||||
if (in_gc < 0) { // Don't allow underflow
|
RUBY_ASSERT_ALWAYS(in_gc >= 0);
|
||||||
in_gc = 0;
|
|
||||||
}
|
|
||||||
if (!in_gc) {
|
if (!in_gc) {
|
||||||
verbose(4, "Sending wakeup signal to workers after GC");
|
verbose(4, "Sending wakeup signal to workers after GC");
|
||||||
rb_native_cond_broadcast(&mjit_gc_wakeup);
|
rb_native_cond_broadcast(&mjit_gc_wakeup);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user