From eac5ae22e26e741b465527ab65017fda8890b6bf Mon Sep 17 00:00:00 2001 From: Alan Wu Date: Tue, 31 Jan 2023 12:28:09 -0500 Subject: [PATCH] YJIT: Group unimplemented method types together Grouping these together helps with finding all of the unimplemented method types. It was interleaved with some other match arm long and short previously. --- yjit/src/codegen.rs | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/yjit/src/codegen.rs b/yjit/src/codegen.rs index 27ef30e410..7fd94f746f 100644 --- a/yjit/src/codegen.rs +++ b/yjit/src/codegen.rs @@ -5977,23 +5977,11 @@ fn gen_send_general( } return gen_send_bmethod(jit, ctx, asm, ocb, ci, cme, block, flags, argc); } - VM_METHOD_TYPE_ZSUPER => { - gen_counter_incr!(asm, send_zsuper_method); - return CantCompile; - } VM_METHOD_TYPE_ALIAS => { // Retrieve the aliased method and re-enter the switch cme = unsafe { rb_aliased_callable_method_entry(cme) }; continue; } - VM_METHOD_TYPE_UNDEF => { - gen_counter_incr!(asm, send_undef_method); - return CantCompile; - } - VM_METHOD_TYPE_NOTIMPLEMENTED => { - gen_counter_incr!(asm, send_not_implemented_method); - return CantCompile; - } // Send family of methods, e.g. call/apply VM_METHOD_TYPE_OPTIMIZED => { if flags & VM_CALL_ARGS_BLOCKARG != 0 { @@ -6212,6 +6200,18 @@ fn gen_send_general( } } } + VM_METHOD_TYPE_ZSUPER => { + gen_counter_incr!(asm, send_zsuper_method); + return CantCompile; + } + VM_METHOD_TYPE_UNDEF => { + gen_counter_incr!(asm, send_undef_method); + return CantCompile; + } + VM_METHOD_TYPE_NOTIMPLEMENTED => { + gen_counter_incr!(asm, send_not_implemented_method); + return CantCompile; + } VM_METHOD_TYPE_MISSING => { gen_counter_incr!(asm, send_missing_method); return CantCompile;