Read {max_iv,variation}_count from prime classext
commit6a62a46c3cd8a0fe3623b5363ff21ead1e755169
authorJohn Hawthorn <[email protected]>
Fri, 23 May 2025 17:49:21 +0000 (23 10:49 -0700)
committerJohn Hawthorn <[email protected]>
Thu, 29 May 2025 20:02:07 +0000 (29 16:02 -0400)
treede2f13c708a66ac05db368a5a75c60b715d53450
parent5b3f1c4c51480cbdbd1ace92b1767f14f9fff280
Read {max_iv,variation}_count from prime classext

MAX_IV_COUNT is a hint which determines the size of variable width
allocation we should use for a given class. We don't need to scope this
by namespace, if we end up with larger builtin objects on some
namespaces that isn't a user-visible problem, just extra memory use.

Similarly variation_count is used to track if a given object has had too
many branches in shapes it has used, and to use too_complex when that
happens. That's also just a hint, so we can use the same value across
namespaces without it being visible to users.

Previously variation_count was being incremented (written to) on the
RCLASS_EXT_READABLE ext, which seems incorrect if we wanted it to be
different across namespaces
class.c
gc.c
internal/class.h
iseq.c
vm_insnhelper.c