Class: TypeProf::Core::MethodAliasBox
- Defined in:
- lib/typeprof/core/graph/box.rb
Instance Attribute Summary collapse
-
#cpath ⇒ Object
readonly
Returns the value of attribute cpath.
-
#new_mid ⇒ Object
readonly
Returns the value of attribute new_mid.
-
#node ⇒ Object
Returns the value of attribute node.
-
#old_mid ⇒ Object
readonly
Returns the value of attribute old_mid.
-
#ret ⇒ Object
readonly
Returns the value of attribute ret.
-
#singleton ⇒ Object
readonly
Returns the value of attribute singleton.
Attributes inherited from Box
Instance Method Summary collapse
- #destroy(genv) ⇒ Object
-
#initialize(node, genv, cpath, singleton, new_mid, old_mid) ⇒ MethodAliasBox
constructor
A new instance of MethodAliasBox.
- #run0(genv, changes) ⇒ Object
Methods inherited from Box
#add_symbol_proc_call_box, #destroy_symbol_proc_call_boxes, #on_type_added, #on_type_removed, #reuse, #run, #to_s
Constructor Details
#initialize(node, genv, cpath, singleton, new_mid, old_mid) ⇒ MethodAliasBox
Returns a new instance of MethodAliasBox.
1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 |
# File 'lib/typeprof/core/graph/box.rb', line 1045 def initialize(node, genv, cpath, singleton, new_mid, old_mid) super(node) @cpath = cpath @singleton = singleton @new_mid = new_mid @old_mid = old_mid @ret = Source.new(genv.nil_type) me = genv.resolve_method(@cpath, @singleton, @new_mid) me.add_alias(self, @old_mid) me.add_run_all_method_call_boxes(genv) if me.decls.empty? genv.add_run(self) end |
Instance Attribute Details
#cpath ⇒ Object (readonly)
Returns the value of attribute cpath.
1061 1062 1063 |
# File 'lib/typeprof/core/graph/box.rb', line 1061 def cpath @cpath end |
#new_mid ⇒ Object (readonly)
Returns the value of attribute new_mid.
1061 1062 1063 |
# File 'lib/typeprof/core/graph/box.rb', line 1061 def new_mid @new_mid end |
#node ⇒ Object
Returns the value of attribute node.
1059 1060 1061 |
# File 'lib/typeprof/core/graph/box.rb', line 1059 def node @node end |
#old_mid ⇒ Object (readonly)
Returns the value of attribute old_mid.
1061 1062 1063 |
# File 'lib/typeprof/core/graph/box.rb', line 1061 def old_mid @old_mid end |
#ret ⇒ Object (readonly)
Returns the value of attribute ret.
1061 1062 1063 |
# File 'lib/typeprof/core/graph/box.rb', line 1061 def ret @ret end |
#singleton ⇒ Object (readonly)
Returns the value of attribute singleton.
1061 1062 1063 |
# File 'lib/typeprof/core/graph/box.rb', line 1061 def singleton @singleton end |
Instance Method Details
#destroy(genv) ⇒ Object
1063 1064 1065 1066 1067 1068 1069 |
# File 'lib/typeprof/core/graph/box.rb', line 1063 def destroy(genv) me = genv.resolve_method(@cpath, @singleton, @new_mid) me.remove_alias(self) me.add_run_all_method_call_boxes(genv) if me.decls.empty? genv.add_run(self) super(genv) end |
#run0(genv, changes) ⇒ Object
1071 1072 1073 |
# File 'lib/typeprof/core/graph/box.rb', line 1071 def run0(genv, changes) # TODO: what to do? end |