Class: TypeProf::Core::InstanceTypeBox

Inherits:
Box
  • Object
show all
Defined in:
lib/typeprof/core/graph/box.rb

Instance Attribute Summary collapse

Attributes inherited from Box

#changes, #destroyed, #node

Instance Method Summary collapse

Methods inherited from Box

#destroy, #on_type_added, #on_type_removed, #reuse, #run, #to_s

Constructor Details

#initialize(node, genv, singleton_ty_vtx) ⇒ InstanceTypeBox



1090
1091
1092
1093
1094
1095
# File 'lib/typeprof/core/graph/box.rb', line 1090

def initialize(node, genv, singleton_ty_vtx)
  super(node)
  @singleton_ty_vtx = singleton_ty_vtx
  @ret = Vertex.new(node)
  genv.add_run(self)
end

Instance Attribute Details

#retObject (readonly)

Returns the value of attribute ret.



1097
1098
1099
# File 'lib/typeprof/core/graph/box.rb', line 1097

def ret
  @ret
end

Instance Method Details

#run0(genv, changes) ⇒ Object



1099
1100
1101
1102
1103
1104
1105
1106
# File 'lib/typeprof/core/graph/box.rb', line 1099

def run0(genv, changes)
  instance_tys = []
  @singleton_ty_vtx.each_type do |ty|
    instance_tys << ty.get_instance_type(genv)
  end
  source_vtx = Source.new(*instance_tys)
  changes.add_edge(genv, source_vtx, @ret)
end