class SyntaxTree::YARV::InstructionSequence::Label
This represents the destination of instructions that jump. Initially it does not track its position so that when we perform optimizations the indices don’t get messed up.
Attributes
name[R]
node[RW]
When
we’re serializing the instruction sequence, we need to be able to look up the label from the branch instructions and then access the subsequent node. So we’ll store the reference here.
Public Class Methods
new(name = nil)
click to toggle source
# File lib/syntax_tree/yarv/instruction_sequence.rb, line 115 def initialize(name = nil) @name = name end
Public Instance Methods
inspect()
click to toggle source
# File lib/syntax_tree/yarv/instruction_sequence.rb, line 123 def inspect name.inspect end
patch!(name)
click to toggle source
# File lib/syntax_tree/yarv/instruction_sequence.rb, line 119 def patch!(name) @name = name end