Class: YTLJit::VM::Node::MethodEndNode

Inherits:
BaseNode show all
Includes:
MethodEndCodeGen
Defined in:
lib/ytljit/vm.rb

Overview

End of method definition

Direct Known Subclasses

BlockEndNode, ClassEndNode

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 collapse

Attributes inherited from BaseNode

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

Instance Method Summary collapse

Methods included from MethodEndCodeGen

#gen_method_epilogue

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) ⇒ MethodEndNode

Returns a new instance of MethodEndNode.



811
812
813
814
# File 'lib/ytljit/vm.rb', line 811

def initialize(parent)
  super(parent)
  @modified_instance_var = nil
end

Instance Attribute Details

#modified_instance_varObject (readonly)

Returns the value of attribute modified_instance_var.



816
817
818
# File 'lib/ytljit/vm.rb', line 816

def modified_instance_var
  @modified_instance_var
end

Instance Method Details

#collect_candidate_type(context) ⇒ Object



824
825
826
827
828
# File 'lib/ytljit/vm.rb', line 824

def collect_candidate_type(context)
  same_type(self, @parent, context.to_key, context.to_key, context)
  same_type(@parent, self, context.to_key, context.to_key, context)
  context
end

#collect_info(context) ⇒ Object



818
819
820
821
822
# File 'lib/ytljit/vm.rb', line 818

def collect_info(context)
  context.modified_local_var.pop
  @modified_instance_var = context.modified_instance_var
  context
end

#compile(context) ⇒ Object



830
831
832
833
834
835
836
837
838
# File 'lib/ytljit/vm.rb', line 830

def compile(context)
  context = super(context)
  context = gen_method_epilogue(context)
  curas = context.assembler
  curas.with_retry do
    curas.ret
  end
  context
end