Module: YTLJit::VM::TypeCodeGen::StringTypeBoxedCodeGen
- Includes:
- AbsArch, CommonCodeGen
- Defined in:
- lib/ytljit/vm_type_gen.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
Methods included from CommonCodeGen
#dump_context, #gen_alloca, #gen_call, #gen_save_thepr
Instance Method Details
#gen_copy(context) ⇒ Object
339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 |
# File 'lib/ytljit/vm_type_gen.rb', line 339 def gen_copy(context) asm = context.assembler val = context.ret_reg vnode = context.ret_node context.start_arg_reg addr = lambda { a = address_of("rb_str_dup") $symbol_table[a] = "rb_str_dup" a } rbstrdup = OpVarMemAddress.new(addr) asm.with_retry do asm.mov(FUNC_ARG[0], val) end context.set_reg_content(FUNC_ARG[0].dst_opecode, vnode) context = gen_save_thepr(context) context = gen_call(context, rbstrdup, 1, vnode) context.end_arg_reg context.ret_reg = RETR context end |