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
Instance Method Details
#initialize(parent) ⇒ Object
69 70 71 |
# File 'lib/ytljit/vm_typeinf.rb', line 69 def initialize(parent) super(parent) end |
#visit_getinstancevariable(code, ins, context) ⇒ Object
79 80 81 82 83 |
# File 'lib/ytljit/vm_typeinf.rb', line 79 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
73 74 75 76 77 |
# File 'lib/ytljit/vm_typeinf.rb', line 73 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
85 86 87 88 89 90 91 |
# File 'lib/ytljit/vm_typeinf.rb', line 85 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 |