Module: YTLJit::VM::Node::LocalVarNodeCodeGen

Includes:
AbsArch
Included in:
LocalVarRefCommonNode
Defined in:
lib/ytljit/vm_codegen.rb

Constant Summary

Constants included from AbsArch

AbsArch::AL, AbsArch::BL, AbsArch::CL, AbsArch::DL, AbsArch::FUNC_ARG, AbsArch::FUNC_ARG_YTL, AbsArch::FUNC_FLOAT_ARG, AbsArch::FUNC_FLOAT_ARG_YTL, AbsArch::INDIRECT_BPR, AbsArch::INDIRECT_RETR, AbsArch::INDIRECT_SPR, AbsArch::INDIRECT_TMPR, AbsArch::INDIRECT_TMPR2, AbsArch::INDIRECT_TMPR3

Constants included from SSE

SSE::XMM0, SSE::XMM1, SSE::XMM2, SSE::XMM3, SSE::XMM4, SSE::XMM5, SSE::XMM6, SSE::XMM7

Instance Method Summary collapse

Instance Method Details

#gen_pursue_parent_function(context, depth) ⇒ Object



481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
# File 'lib/ytljit/vm_codegen.rb', line 481

def gen_pursue_parent_function(context, depth)
  asm = context.assembler
  if depth != 0 then
    context.start_using_reg(TMPR2)
    cframe = frame_info
    asm.with_retry do
      asm.mov(TMPR2, BPR)
      depth.times do 
        asm.mov(TMPR2, cframe.offset_arg(0, TMPR2))
        cframe = cframe.previous_frame
      end
    end
    context.set_reg_content(TMPR2, cframe)
    context.ret_reg = TMPR2
  else
    context.ret_reg = BPR
  end
  context
end