class CodeTools::AST::InstanceVariableAccess

Public Instance Methods

bytecode(g) click to toggle source
# File lib/rubinius/code/ast/variables.rb, line 423
def bytecode(g)
  pos(g)

  g.push_ivar @name
end
defined(g) click to toggle source
# File lib/rubinius/code/ast/variables.rb, line 436
def defined(g)
  f = g.new_label
  done = g.new_label

  variable_defined(g, f)
  g.push_literal "instance-variable"
  g.goto done

  f.set!
  g.push_tagged_nil 0

  done.set!
end
to_sexp() click to toggle source
# File lib/rubinius/code/ast/variables.rb, line 450
def to_sexp
  [:ivar, @name]
end
variable_defined(g, f) click to toggle source
# File lib/rubinius/code/ast/variables.rb, line 429
def variable_defined(g, f)
  g.push_self
  g.push_literal @name
  g.send :__instance_variable_defined_p__, 1
  g.goto_if_false f
end