Class: YTLJit::VM::Node::InstanceVarRefNode

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

Direct Known Subclasses

TIInstanceVarRefNode

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

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 BaseNode

#code_space, #element_node_list, #id, #parent, #type

Instance Method Summary collapse

Methods included from NodeUtil

#search_class_top, #search_end, #search_frame_info, #search_top

Methods inherited from BaseNode

#add_element_node, #add_type, #decide_type, #decide_type_core, #decide_type_once, #gen_type_inference_proc, #inference_type, #merge_type, #same_type, #set_type_list, #ti_add_observer, #ti_changed, #ti_update, #type_list

Methods included from Inspect

#inspect_by_graph

Constructor Details

#initialize(parent, name) ⇒ InstanceVarRefNode

Returns a new instance of InstanceVarRefNode.



1594
1595
1596
1597
# File 'lib/ytljit/vm.rb', line 1594

def initialize(parent, name)
  super
  @var_type_info = nil
end

Instance Method Details

#collect_candidate_type(context) ⇒ Object



1610
1611
1612
1613
1614
1615
1616
# File 'lib/ytljit/vm.rb', line 1610

def collect_candidate_type(context)
  @var_type_info.each do |src|
    same_type(self, src, 
              context.to_key, context.to_key, context)
  end
  context
end

#collect_info(context) ⇒ Object



1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
# File 'lib/ytljit/vm.rb', line 1599

def collect_info(context)
  vti = context.modified_instance_var[@name]
  if vti then
    @var_type_info = vti.dup
  else
    @var_type_info = nil
  end

  context
end

#compile(context) ⇒ Object



1622
1623
1624
1625
# File 'lib/ytljit/vm.rb', line 1622

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

#compile_main(context) ⇒ Object



1618
1619
1620
# File 'lib/ytljit/vm.rb', line 1618

def compile_main(context)
  context
end