class CodeTools::AST::LocalVariableAccess

Public Class Methods

new(line, name) click to toggle source
# File lib/rubinius/code/ast/variables.rb, line 471
def initialize(line, name)
  @line = line
  @name = name
  @variable = nil
end

Public Instance Methods

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

  unless @variable
    g.state.scope.assign_local_reference self
  end
  @variable.get_bytecode(g)
end
defined(g) click to toggle source
# File lib/rubinius/code/ast/variables.rb, line 486
def defined(g)
  g.push_literal "local-variable"
end
to_sexp() click to toggle source
# File lib/rubinius/code/ast/variables.rb, line 494
def to_sexp
  [:lvar, @name]
end
value_defined(g, f) click to toggle source
# File lib/rubinius/code/ast/variables.rb, line 490
def value_defined(g, f)
  bytecode(g)
end