Class: TypeProf::Core::InstanceTypeBox
- Defined in:
- lib/typeprof/core/graph/box.rb
Instance Attribute Summary collapse
-
#ret ⇒ Object
readonly
Returns the value of attribute ret.
Attributes inherited from Box
Instance Method Summary collapse
-
#initialize(node, genv, singleton_ty_vtx) ⇒ InstanceTypeBox
constructor
A new instance of InstanceTypeBox.
- #run0(genv, changes) ⇒ Object
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
#ret ⇒ Object (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 |