зеркало из https://github.com/github/ruby.git
Do not reset non-increment-only counters
to prevernt underflow. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67545 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
Родитель
5ce28c0642
Коммит
f7035dd3ff
|
@ -47,7 +47,16 @@ VALUE
|
|||
rb_debug_counter_reset(void)
|
||||
{
|
||||
for (int i = 0; i < RB_DEBUG_COUNTER_MAX; i++) {
|
||||
rb_debug_counter[i] = 0;
|
||||
switch (i) {
|
||||
case RB_DEBUG_COUNTER_mjit_length_unit_queue:
|
||||
case RB_DEBUG_COUNTER_mjit_length_active_units:
|
||||
case RB_DEBUG_COUNTER_mjit_length_compact_units:
|
||||
// These counters may be decreased and should not be reset.
|
||||
break;
|
||||
default:
|
||||
rb_debug_counter[i] = 0;
|
||||
break;
|
||||
}
|
||||
}
|
||||
return Qnil;
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче