Class: YTLJit::VM::Node::SelfRefNode

Inherits:
LocalVarRefNode show all
Defined in:
lib/ytljit/vm.rb

Direct Known Subclasses

TISelfRefNode

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 Attribute Summary

Attributes inherited from LocalVarRefCommonNode

#current_frame_info, #frame_info

Attributes inherited from BaseNode

#code_space, #element_node_list, #id, #parent, #ti_observee, #ti_observer, #type

Instance Method Summary collapse

Methods inherited from LocalVarRefNode

#collect_info

Methods included from NodeUtil

#search_class_top, #search_end, #search_frame_info, #search_top

Methods included from LocalVarNodeCodeGen

#gen_pursue_parent_function

Methods inherited from BaseNode

#add_element_node, #collect_info, #decide_type, #decide_type_core, #decide_type_once, #gen_type_inference_proc, #get_constant_value, #inference_type, #merge_type, #same_type, #ti_add_observer, #ti_changed, #ti_del_link, #ti_reset, #ti_update

Methods included from TypeListWithSignature

#add_type, #set_type_list, #type_list, #type_list_initvar

Methods included from Inspect

#inspect_by_graph

Constructor Details

#initialize(parent) ⇒ SelfRefNode

Returns a new instance of SelfRefNode.



2197
2198
2199
2200
# File 'lib/ytljit/vm.rb', line 2197

def initialize(parent)
  super(parent, 2, 0)
  @classtop = search_class_top
end

Instance Method Details

#collect_candidate_type(context) ⇒ Object



2209
2210
2211
2212
2213
# File 'lib/ytljit/vm.rb', line 2209

def collect_candidate_type(context)
  @type = RubyType::BaseType.from_ruby_class(@classtop.klass_object)
  add_type(context.to_signature, @type)
  context
end

#compile(context) ⇒ Object



2215
2216
2217
2218
# File 'lib/ytljit/vm.rb', line 2215

def compile(context)
#          context = super(context)
  compile_main(context)
end

#compile_main(context) ⇒ Object



2202
2203
2204
2205
2206
2207
# File 'lib/ytljit/vm.rb', line 2202

def compile_main(context)
  offarg = @current_frame_info.offset_arg(@offset, BPR)
  context.ret_node = self
  context.ret_reg = offarg
  context
end