From 40a9964b893fee5680b455d0e905155be3360685 Mon Sep 17 00:00:00 2001 From: Jemma Issroff Date: Tue, 6 Dec 2022 14:52:11 -0500 Subject: Set max_iv_count (used for object shapes) based on inline caches With this change, we're storing the iv name on an inline cache on setinstancevariable instructions. This allows us to check the inline cache to count instance variables set in initialize and give us an estimate of iv capacity for an object. For the purpose of estimating the number of instance variables required for an object, we're assuming that all initialize methods will call `super`. This change allows us to estimate the number of instance variables required without disassembling instruction sequences. Co-Authored-By: Aaron Patterson --- vm_core.h | 1 + 1 file changed, 1 insertion(+) (limited to 'vm_core.h') diff --git a/vm_core.h b/vm_core.h index a996c5b835..65f2741219 100644 --- a/vm_core.h +++ b/vm_core.h @@ -275,6 +275,7 @@ struct iseq_inline_constant_cache { struct iseq_inline_iv_cache_entry { uintptr_t value; // attr_index in lower bits, dest_shape_id in upper bits + ID iv_set_name; }; struct iseq_inline_cvar_cache_entry { -- cgit v1.2.1