Class: SyntaxTree::YARV::VM::Frame

Inherits:
Object
  • Object
show all
Defined in:
lib/syntax_tree/yarv/vm.rb

Direct Known Subclasses

BlockFrame, ClassFrame, MethodFrame, RescueFrame, TopFrame

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(iseq, parent, stack_index, _self, nesting) ⇒ Frame

Returns a new instance of Frame.



29
30
31
32
33
34
35
36
37
38
39
# File 'lib/syntax_tree/yarv/vm.rb', line 29

def initialize(iseq, parent, stack_index, _self, nesting)
  @iseq = iseq
  @parent = parent
  @stack_index = stack_index
  @_self = _self
  @nesting = nesting

  @svars = {}
  @line = iseq.line
  @pc = 0
end

Instance Attribute Details

#_selfObject (readonly)

Returns the value of attribute _self.



26
27
28
# File 'lib/syntax_tree/yarv/vm.rb', line 26

def _self
  @_self
end

#iseqObject (readonly)

Returns the value of attribute iseq.



26
27
28
# File 'lib/syntax_tree/yarv/vm.rb', line 26

def iseq
  @iseq
end

#lineObject

Returns the value of attribute line.



27
28
29
# File 'lib/syntax_tree/yarv/vm.rb', line 27

def line
  @line
end

#nestingObject (readonly)

Returns the value of attribute nesting.



26
27
28
# File 'lib/syntax_tree/yarv/vm.rb', line 26

def nesting
  @nesting
end

#parentObject (readonly)

Returns the value of attribute parent.



26
27
28
# File 'lib/syntax_tree/yarv/vm.rb', line 26

def parent
  @parent
end

#pcObject

Returns the value of attribute pc.



27
28
29
# File 'lib/syntax_tree/yarv/vm.rb', line 27

def pc
  @pc
end

#stack_indexObject (readonly)

Returns the value of attribute stack_index.



26
27
28
# File 'lib/syntax_tree/yarv/vm.rb', line 26

def stack_index
  @stack_index
end

#svarsObject (readonly)

Returns the value of attribute svars.



26
27
28
# File 'lib/syntax_tree/yarv/vm.rb', line 26

def svars
  @svars
end