summaryrefslogtreecommitdiff
path: root/lib/ruby_vm
diff options
context:
space:
mode:
authorTakashi Kokubun <takashikkbn@gmail.com>2023-02-09 22:02:10 -0800
committerTakashi Kokubun <takashikkbn@gmail.com>2023-03-05 22:41:35 -0800
commitb2447b644d10f05f4dac578fd1fd7ab8bb9a609e (patch)
tree43e97298dddb7a97d51e736c97a9d2126d4739e4 /lib/ruby_vm
parentb05dbe785efedc5e6bf31b59406bb006ab40efe4 (diff)
Use fewer comments on frame push
Diffstat (limited to 'lib/ruby_vm')
-rw-r--r--lib/ruby_vm/mjit/insn_compiler.rb7
1 files changed, 1 insertions, 6 deletions
diff --git a/lib/ruby_vm/mjit/insn_compiler.rb b/lib/ruby_vm/mjit/insn_compiler.rb
index 8c60676e49..9c2f0112fc 100644
--- a/lib/ruby_vm/mjit/insn_compiler.rb
+++ b/lib/ruby_vm/mjit/insn_compiler.rb
@@ -1213,22 +1213,17 @@ module RubyVM::MJIT
asm.comment('move CFP register to callee CFP')
asm.sub(CFP, C.rb_control_frame_t.size);
+ asm.comment('set up new frame')
# Not setting PC since JIT code will do that as needed
- asm.comment('set SP to callee CFP')
asm.mov([CFP, C.rb_control_frame_t.offsetof(:sp)], SP)
- asm.comment('set ISEQ to callee CFP')
asm.mov(:rax, iseq.to_i)
asm.mov([CFP, C.rb_control_frame_t.offsetof(:iseq)], :rax)
- asm.comment('set self to callee CFP')
self_index = -(1 + argc + ((flags & C.VM_CALL_ARGS_BLOCKARG == 0) ? 0 : 1) + local_size + 3)
asm.mov(:rax, [SP, C.VALUE.size * self_index])
asm.mov([CFP, C.rb_control_frame_t.offsetof(:self)], :rax)
- asm.comment('set EP to callee CFP')
asm.lea(:rax, [SP, C.VALUE.size * -1])
asm.mov([CFP, C.rb_control_frame_t.offsetof(:ep)], :rax)
- asm.comment('set block_code to callee CFP')
asm.mov([CFP, C.rb_control_frame_t.offsetof(:block_code)], 0)
- asm.comment('set BP to callee CFP')
asm.mov([CFP, C.rb_control_frame_t.offsetof(:__bp__)], SP) # TODO: get rid of this!!
# cfp->jit_return is used only for ISEQs