Class: CodeTools::Compiler::LocalReference

Inherits:
Object
  • Object
show all
Defined in:
lib/rubinius/code/compiler/locals.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(slot) ⇒ LocalReference

Returns a new instance of LocalReference.



83
84
85
# File 'lib/rubinius/code/compiler/locals.rb', line 83

def initialize(slot)
  @slot = slot
end

Instance Attribute Details

#slotObject (readonly)

Returns the value of attribute slot.



81
82
83
# File 'lib/rubinius/code/compiler/locals.rb', line 81

def slot
  @slot
end

Instance Method Details

#get_bytecode(g) ⇒ Object



87
88
89
# File 'lib/rubinius/code/compiler/locals.rb', line 87

def get_bytecode(g)
  g.push_local @slot
end

#set_bytecode(g) ⇒ Object



91
92
93
# File 'lib/rubinius/code/compiler/locals.rb', line 91

def set_bytecode(g)
  g.set_local @slot
end