Class: SyntaxTree::YARV::DataFlowGraph::LocalArgument

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

Overview

This represents an object that goes on the stack that is passed between instructions within a basic block.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(length) ⇒ LocalArgument

Returns a new instance of LocalArgument.



53
54
55
# File 'lib/syntax_tree/yarv/data_flow_graph.rb', line 53

def initialize(length)
  @length = length
end

Instance Attribute Details

#lengthObject (readonly)

Returns the value of attribute length.



51
52
53
# File 'lib/syntax_tree/yarv/data_flow_graph.rb', line 51

def length
  @length
end

#nameObject (readonly)

Returns the value of attribute name.



51
52
53
# File 'lib/syntax_tree/yarv/data_flow_graph.rb', line 51

def name
  @name
end

Instance Method Details

#local?Boolean

Returns:

  • (Boolean)


57
58
59
# File 'lib/syntax_tree/yarv/data_flow_graph.rb', line 57

def local?
  true
end

#to_strObject



61
62
63
# File 'lib/syntax_tree/yarv/data_flow_graph.rb', line 61

def to_str
  length.to_s
end