Move FL_SINGLETON to FL_USER1

This frees FL_USER0 on both T_MODULE and T_CLASS.

Note: prior to this, FL_SINGLETON was never set on T_MODULE,
so checking for `FL_SINGLETON` without first checking that
`FL_TYPE` was `T_CLASS` was valid. That's no longer the case.
This commit is contained in:
Jean Boussier 2024-03-06 11:04:22 -05:00 committed by Peter Zhu
parent b88973165a
commit b4a69351ec
23 changed files with 76 additions and 56 deletions

View file

@ -533,7 +533,7 @@ hash_each(VALUE key, VALUE value, VALUE v)
static void
w_extended(VALUE klass, struct dump_arg *arg, int check)
{
if (check && FL_TEST(klass, FL_SINGLETON)) {
if (check && RCLASS_SINGLETON_P(klass)) {
VALUE origin = RCLASS_ORIGIN(klass);
if (SINGLETON_DUMP_UNABLE_P(klass) ||
(origin != klass && SINGLETON_DUMP_UNABLE_P(origin))) {