diff options
author | Takashi Kokubun <takashikkbn@gmail.com> | 2020-10-22 21:59:13 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-10-22 21:59:13 -0700 |
commit | 40bad72f31248c48048249b1d7536e87b4994664 (patch) | |
tree | 359862095e287cf21540c3e5040216cd6159f9f0 /mjit.c | |
parent | 7cf34cfaa3db4b6eb63dba61108956468140564f (diff) |
Assert in_gc >= 0 instead of guarding it (#3687)
Notes
Notes:
Merged-By: k0kubun <takashikkbn@gmail.com>
Diffstat (limited to 'mjit.c')
-rw-r--r-- | mjit.c | 4 |
1 files changed, 1 insertions, 3 deletions
@@ -109,9 +109,7 @@ mjit_gc_exit_hook(void) return; CRITICAL_SECTION_START(4, "mjit_gc_exit_hook"); in_gc--; - if (in_gc < 0) { // Don't allow underflow - in_gc = 0; - } + RUBY_ASSERT_ALWAYS(in_gc >= 0); if (!in_gc) { verbose(4, "Sending wakeup signal to workers after GC"); rb_native_cond_broadcast(&mjit_gc_wakeup); |