summaryrefslogtreecommitdiff
path: root/lib/ruby_vm/rjit/compiler.rb
diff options
context:
space:
mode:
authorTakashi Kokubun <[email protected]>2023-03-09 21:55:14 -0800
committerTakashi Kokubun <[email protected]>2023-03-09 21:55:14 -0800
commit35fd79ac3713478c8114a498d3536c05ad832063 ()
treef324c6c2f763cb7be824f3d058672f8dc4401ad6 /lib/ruby_vm/rjit/compiler.rb
parent5e27d82dd0d25b5df907203112955eeb0d764b02 (diff)
RJIT: Lazily compile global ocb
-rw-r--r--lib/ruby_vm/rjit/compiler.rb14
1 files changed, 8 insertions, 6 deletions
@@ -47,11 +47,6 @@ module RubyVM::RJIT
@exit_compiler = ExitCompiler.new
@insn_compiler = InsnCompiler.new(@cb, @ocb, @exit_compiler)
Invariants.initialize(@cb, @ocb, self, @exit_compiler)
-
- @leave_exit = Assembler.new.then do |asm|
- @exit_compiler.compile_leave_exit(asm)
- @ocb.write(asm)
- end
end
# Compile an ISEQ from its entry point.
@@ -208,7 +203,7 @@ module RubyVM::RJIT
asm.mov(SP, [CFP, C.rb_control_frame_t.offsetof(:sp)]) # rbx = cfp->sp
# Setup cfp->jit_return
- asm.mov(:rax, @leave_exit)
asm.mov([CFP, C.rb_control_frame_t.offsetof(:jit_return)], :rax)
end
@@ -265,6 +260,13 @@ module RubyVM::RJIT
set_block(iseq, block)
end
def incr_counter(name)
if C.rjit_opts.stats
C.rb_rjit_counters[name][0] += 1