Class: TypeProf::Core::GVarReadBox

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

Instance Attribute Summary collapse

Attributes inherited from Box

#changes, #destroyed

Instance Method Summary collapse

Methods inherited from Box

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

Constructor Details

#initialize(node, genv, name) ⇒ GVarReadBox

Returns a new instance of GVarReadBox.



855
856
857
858
859
860
# File 'lib/typeprof/core/graph/box.rb', line 855

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

Instance Attribute Details

#const_readObject (readonly)

Returns the value of attribute const_read.



862
863
864
# File 'lib/typeprof/core/graph/box.rb', line 862

def const_read
  @const_read
end

#nodeObject (readonly)

Returns the value of attribute node.



862
863
864
# File 'lib/typeprof/core/graph/box.rb', line 862

def node
  @node
end

#retObject (readonly)

Returns the value of attribute ret.



862
863
864
# File 'lib/typeprof/core/graph/box.rb', line 862

def ret
  @ret
end

Instance Method Details

#run0(genv, changes) ⇒ Object



864
865
866
# File 'lib/typeprof/core/graph/box.rb', line 864

def run0(genv, changes)
  changes.add_edge(genv, @vtx, @ret)
end