aboutsummaryrefslogtreecommitdiffstats
path: root/debug_counter.h
diff options
context:
space:
mode:
authorKoichi Sasada <ko1@cookpad.com>2019-01-16 10:48:30 +0000
committerKoichi Sasada <ko1@atdot.net>2019-07-31 09:44:23 +0900
commitebd398ac5a4147a1e652d6943c39a29a62f12e66 (patch)
tree79dba6622c591db987f0a9c065fe37cd09a58e98 /debug_counter.h
parent4afd8975242917d319cfb20c7ed635b979ad48d5 (diff)
downloadruby-ebd398ac5a4147a1e652d6943c39a29a62f12e66.tar.gz
remove RHash::iter_lev.
iter_lev is used to detect the hash is iterating or not. Usually, iter_lev should be very small number (1 or 2) so `int` is overkill. This patch introduce iter_lev in flags (7 bits, FL13 to FL19) and if iter_lev exceeds this range, save it in hidden attribute. We can get 1 word in RHash. We can't modify frozen objects. Therefore I added new internal API `rb_ivar_set_internal()` which allows us to set an attribute even if the target object is frozen if the name is hidden ivar (the name without `@` prefix).
Diffstat (limited to 'debug_counter.h')
0 files changed, 0 insertions, 0 deletions