Class: CodeTools::Compiler::NestedLocalVariable

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(depth, slot) ⇒ NestedLocalVariable

Returns a new instance of NestedLocalVariable.



54
55
56
57
# File 'lib/rubinius/code/compiler/locals.rb', line 54

def initialize(depth, slot)
  @depth = depth
  @slot = slot
end

Instance Attribute Details

#depthObject (readonly)

Returns the value of attribute depth.



52
53
54
# File 'lib/rubinius/code/compiler/locals.rb', line 52

def depth
  @depth
end

#slotObject (readonly)

Returns the value of attribute slot.



52
53
54
# File 'lib/rubinius/code/compiler/locals.rb', line 52

def slot
  @slot
end

Instance Method Details

#referenceObject Also known as: nested_reference



59
60
61
# File 'lib/rubinius/code/compiler/locals.rb', line 59

def reference
  NestedLocalReference.new @slot, @depth
end