From 5d834bcf9fb9596fd15f9e657a94caa8716b3f10 Mon Sep 17 00:00:00 2001 From: Alan Wu Date: Fri, 12 Mar 2021 12:22:19 -0500 Subject: YJIT: lazy polymorphic getinstancevariable Lazily compile out a chain of checks for different known classes and whether `self` embeds its ivars or not. * Remove trailing whitespaces * Get proper addresss in Capstone disassembly * Lowercase address in Capstone disassembly Capstone uses lowercase for jump targets in generated listings. Let's match it. * Use the same successor in getivar guard chains Cuts down on duplication * Address reviews * Fix copypasta error * Add a comment --- vm_insnhelper.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'vm_insnhelper.c') diff --git a/vm_insnhelper.c b/vm_insnhelper.c index f743e07e03..16f46e50d3 100644 --- a/vm_insnhelper.c +++ b/vm_insnhelper.c @@ -1099,6 +1099,12 @@ iv_index_tbl_lookup(struct st_table *iv_index_tbl, ID id, struct rb_iv_index_tbl return found ? true : false; } +bool +rb_iv_index_tbl_lookup(struct st_table *iv_index_tbl, ID id, struct rb_iv_index_tbl_entry **ent) +{ + return iv_index_tbl_lookup(iv_index_tbl, id, ent); +} + ALWAYS_INLINE(static void fill_ivar_cache(const rb_iseq_t *iseq, IVC ic, const struct rb_callcache *cc, int is_attr, struct rb_iv_index_tbl_entry *ent)); static inline void -- cgit v1.2.3