mirror of
https://github.com/ruby/ruby.git
synced 2025-08-26 06:25:31 +02:00
Implement initial opt_lt
This commit is contained in:
parent
21696ad81e
commit
a8dec34961
9 changed files with 143 additions and 34 deletions
|
@ -32,10 +32,10 @@ module RubyVM::MJIT
|
|||
incr_insn_exit(jit.pc)
|
||||
|
||||
# Fix pc/sp offsets for the interpreter
|
||||
save_pc_and_sp(jit, ctx, asm)
|
||||
save_pc_and_sp(jit, ctx.dup, asm) # dup to avoid sp_offset update
|
||||
|
||||
# Restore callee-saved registers
|
||||
asm.comment('exit to interpreter')
|
||||
asm.comment("exit to interpreter on #{pc_to_insn(jit.pc).name}")
|
||||
asm.pop(SP)
|
||||
asm.pop(EC)
|
||||
asm.pop(CFP)
|
||||
|
@ -65,6 +65,10 @@ module RubyVM::MJIT
|
|||
|
||||
private
|
||||
|
||||
def pc_to_insn(pc)
|
||||
Compiler.decode_insn(C.VALUE.new(pc).*)
|
||||
end
|
||||
|
||||
# @param pc [Integer]
|
||||
def incr_insn_exit(pc)
|
||||
if C.mjit_opts.stats
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue