From 2c8d186c6e4fd03ea57466fa6dce6bad40d09401 Mon Sep 17 00:00:00 2001 From: Aaron Patterson Date: Fri, 11 Oct 2019 17:06:41 -0700 Subject: Introduce an "Inline IVAR cache" struct This commit introduces an "inline ivar cache" struct. The reason we need this is so compaction can differentiate from an ivar cache and a regular inline cache. Regular inline caches contain references to `VALUE` and ivar caches just contain references to the ivar index. With this new struct we can easily update references for inline caches (but not inline var caches as they just contain an int) --- iseq.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'iseq.c') diff --git a/iseq.c b/iseq.c index 427739859b..7fbb906525 100644 --- a/iseq.c +++ b/iseq.c @@ -1917,6 +1917,7 @@ rb_insn_operand_intern(const rb_iseq_t *iseq, break; case TS_IC: + case TS_IVC: case TS_ISE: ret = rb_sprintf("", (union iseq_inline_storage_entry *)op - iseq->body->is_entries); break; @@ -2741,6 +2742,7 @@ iseq_data_to_ary(const rb_iseq_t *iseq) } break; case TS_IC: + case TS_IVC: case TS_ISE: { union iseq_inline_storage_entry *is = (union iseq_inline_storage_entry *)*seq; -- cgit v1.2.3