Module: YTLJit::VM::YARVTranslatorTypeInferenceMixin
Instance Method Summary collapse
- #initialize(parent) ⇒ Object
- #visit_getinstancevariable(code, ins, context) ⇒ Object
- #visit_putself(code, ins, context) ⇒ Object
- #visit_setinstancevariable(code, ins, context) ⇒ Object
Methods included from Node
Instance Method Details
#initialize(parent) ⇒ Object
77 78 79 |
# File 'lib/ytljit/vm_typeinf.rb', line 77 def initialize(parent) super(parent) end |
#visit_getinstancevariable(code, ins, context) ⇒ Object
87 88 89 90 91 |
# File 'lib/ytljit/vm_typeinf.rb', line 87 def visit_getinstancevariable(code, ins, context) curnode = context.current_node node = TIInstanceVarRefNode.new(curnode, ins[1]) context.expstack.push node end |
#visit_putself(code, ins, context) ⇒ Object
81 82 83 84 85 |
# File 'lib/ytljit/vm_typeinf.rb', line 81 def visit_putself(code, ins, context) curnode = context.current_node nnode = TISelfRefNode.new(curnode) context.expstack.push nnode end |
#visit_setinstancevariable(code, ins, context) ⇒ Object
93 94 95 96 97 98 99 |
# File 'lib/ytljit/vm_typeinf.rb', line 93 def visit_setinstancevariable(code, ins, context) val = context.expstack.pop curnode = context.current_node node = TiInstanceVarAssignNode.new(curnode, ins[1], val) curnode.body = node context.current_node = node end |