Class: TypeProf::Core::ConstReadBox
- Defined in:
- lib/typeprof/core/graph/box.rb
Instance Attribute Summary collapse
-
#const_read ⇒ Object
readonly
Returns the value of attribute const_read.
-
#node ⇒ Object
readonly
Returns the value of attribute node.
-
#ret ⇒ Object
readonly
Returns the value of attribute ret.
Attributes inherited from Box
Instance Method Summary collapse
-
#initialize(node, genv, const_read) ⇒ ConstReadBox
constructor
A new instance of ConstReadBox.
- #run0(genv, changes) ⇒ Object
Methods inherited from Box
#destroy, #diagnostics, #on_type_added, #on_type_removed, #reuse, #run, #to_s
Constructor Details
#initialize(node, genv, const_read) ⇒ ConstReadBox
Returns a new instance of ConstReadBox.
60 61 62 63 64 65 66 |
# File 'lib/typeprof/core/graph/box.rb', line 60 def initialize(node, genv, const_read) super(node) @const_read = const_read const_read.followers << self @ret = Vertex.new(node) genv.add_run(self) end |
Instance Attribute Details
#const_read ⇒ Object (readonly)
Returns the value of attribute const_read.
68 69 70 |
# File 'lib/typeprof/core/graph/box.rb', line 68 def const_read @const_read end |
#node ⇒ Object (readonly)
Returns the value of attribute node.
68 69 70 |
# File 'lib/typeprof/core/graph/box.rb', line 68 def node @node end |
#ret ⇒ Object (readonly)
Returns the value of attribute ret.
68 69 70 |
# File 'lib/typeprof/core/graph/box.rb', line 68 def ret @ret end |
Instance Method Details
#run0(genv, changes) ⇒ Object
70 71 72 73 74 75 76 |
# File 'lib/typeprof/core/graph/box.rb', line 70 def run0(genv, changes) cdef = @const_read.cdef if cdef changes.add_depended_value_entity(cdef) changes.add_edge(genv, cdef.vtx, @ret) end end |