Module: YTLJit::VM::YARVTranslatorTypeInferenceMixin

Includes:
Node
Included in:
YARVTranslatorTypeInference
Defined in:
lib/ytljit/vm_typeinf.rb

Instance Method Summary collapse

Methods included from Node

#compile_compare_nonnum

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