From de9a1e4a9654ea305f11ce8602ee32f394e44338 Mon Sep 17 00:00:00 2001 From: John Hawthorn Date: Thu, 25 Nov 2021 11:56:58 -0800 Subject: YJIT: Implement new struct accessors (#5161) * YJIT: Implement optimized_method_struct_aref * YJIT: Implement struct_aref without method call Struct member reads can be compiled directly into a memory read (with either one or two levels of indirection). * YJIT: Implement optimized struct aset * YJIT: Update tests for struct access * YJIT: Add counters for remaining optimized methods * Check for INT32_MAX overflow It only takes a struct with 0x7fffffff/8+1 members. Also add some cheap compile time checks. * Add tests for non-embedded struct aref/aset Co-authored-by: Alan Wu --- yjit.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'yjit.c') diff --git a/yjit.c b/yjit.c index cef7492e34..33517ca36d 100644 --- a/yjit.c +++ b/yjit.c @@ -69,6 +69,9 @@ YJIT_DECLARE_COUNTERS( send_zsuper_method, send_undef_method, send_optimized_method, + send_optimized_method_send, + send_optimized_method_call, + send_optimized_method_block_call, send_missing_method, send_bmethod, send_refined_method, -- cgit v1.2.3