diff options
author | Takashi Kokubun <takashikkbn@gmail.com> | 2023-03-04 22:22:56 -0800 |
---|---|---|
committer | Takashi Kokubun <takashikkbn@gmail.com> | 2023-03-05 23:28:59 -0800 |
commit | 26cb5d416f9f966fb7856e936d7081d7c091558f (patch) | |
tree | 402fdb386c90667b0457233bac897253a9df8292 /lib | |
parent | bd0d0d3b387b4ed87dde8a13a62c83eb9aafdb3a (diff) |
Implement alias
Notes
Notes:
Merged: https://github.com/ruby/ruby/pull/7448
Diffstat (limited to 'lib')
-rw-r--r-- | lib/ruby_vm/mjit/insn_compiler.rb | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/lib/ruby_vm/mjit/insn_compiler.rb b/lib/ruby_vm/mjit/insn_compiler.rb index a37c1c1b1c..0c53430dfe 100644 --- a/lib/ruby_vm/mjit/insn_compiler.rb +++ b/lib/ruby_vm/mjit/insn_compiler.rb @@ -3149,8 +3149,7 @@ module RubyVM::MJIT asm.incr_counter(:send_bmethod) return CantCompile when C.VM_METHOD_TYPE_ALIAS - asm.incr_counter(:send_alias) - return CantCompile + jit_call_alias(jit, ctx, asm, argc, flags, cme, comptime_recv, recv_opnd, block_handler, known_recv_class, send_shift:) when C.VM_METHOD_TYPE_OPTIMIZED jit_call_optimized(jit, ctx, asm, cme, flags, argc, block_handler, known_recv_class, send_shift:) when C.VM_METHOD_TYPE_UNDEF @@ -3362,6 +3361,12 @@ module RubyVM::MJIT jit_getivar(jit, ctx, asm, comptime_recv, ivar_id, recv_opnd) end + # vm_call_alias + def jit_call_alias(jit, ctx, asm, argc, flags, cme, comptime_recv, recv_opnd, block_handler, known_recv_class, send_shift:) + cme = C.rb_aliased_callable_method_entry(cme) + jit_call_method_each_type(jit, ctx, asm, argc, flags, cme, comptime_recv, recv_opnd, block_handler, known_recv_class, send_shift:) + end + # vm_call_optimized # @param jit [RubyVM::MJIT::JITState] # @param ctx [RubyVM::MJIT::Context] |