Module: YTLJit::VM::YARVTranslatorCRubyObjectMixin

Includes:
Node
Included in:
YARVTranslatorCRubyObject
Defined in:
lib/ytljit/vm_cruby_obj.rb

Instance Method Summary collapse

Methods included from Node

#compile_compare_nonnum

Instance Method Details

#visit_getinstancevariable(code, ins, context) ⇒ Object



150
151
152
153
154
155
156
157
# File 'lib/ytljit/vm_cruby_obj.rb', line 150

def visit_getinstancevariable(code, ins, context)
  context.macro_method = false
  curnode = context.current_node
  mnode = context.current_method_node
  node = CRubyInstanceVarRefNode.new(curnode, ins[1], mnode)
  node.debug_info = context.debug_info
  context.expstack.push node
end

#visit_setinstancevariable(code, ins, context) ⇒ Object



159
160
161
162
163
164
165
166
167
168
# File 'lib/ytljit/vm_cruby_obj.rb', line 159

def visit_setinstancevariable(code, ins, context)
  context.macro_method = false
  val = context.expstack.pop
  curnode = context.current_node
  mnode = context.current_method_node
  node = CRubyInstanceVarAssignNode.new(curnode, ins[1], mnode, val)
  node.debug_info = context.debug_info
  curnode.body = node
  context.current_node = node
end