mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
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:
parent
5ce28c0642
commit
f7035dd3ff
1 changed files with 10 additions and 1 deletions
|
@ -47,7 +47,16 @@ VALUE
|
||||||
rb_debug_counter_reset(void)
|
rb_debug_counter_reset(void)
|
||||||
{
|
{
|
||||||
for (int i = 0; i < RB_DEBUG_COUNTER_MAX; i++) {
|
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;
|
return Qnil;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue