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



607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
# File 'lib/ytljit/vm_codegen.rb', line 607

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