From 5246f4027ec574e77809845e1b1f7822cc2a5cef Mon Sep 17 00:00:00 2001 From: Jemma Issroff Date: Tue, 8 Nov 2022 15:35:31 -0500 Subject: Transition shape when object's capacity changes This commit adds a `capacity` field to shapes, and adds shape transitions whenever an object's capacity changes. Objects which are allocated out of a bigger size pool will also make a transition from the root shape to the shape with the correct capacity for their size pool when they are allocated. This commit will allow us to remove numiv from objects completely, and will also mean we can guarantee that if two objects share shapes, their IVs are in the same positions (an embedded and extended object cannot share shapes). This will enable us to implement ivar sets in YJIT using object shapes. Co-Authored-By: Aaron Patterson --- inits.c | 1 + 1 file changed, 1 insertion(+) (limited to 'inits.c') diff --git a/inits.c b/inits.c index d1204c1324..3c2b11c851 100644 --- a/inits.c +++ b/inits.c @@ -20,6 +20,7 @@ static void Init_builtin_prelude(void); void rb_call_inits(void) { + CALL(default_shapes); CALL(Thread_Mutex); #if USE_TRANSIENT_HEAP CALL(TransientHeap); -- cgit v1.2.1