class YARP::Debug::ISeq

Attributes

parts[R]

Public Class Methods

new(parts) click to toggle source
# File yarp.rb, line 390
def initialize(parts)
  @parts = parts
end

Public Instance Methods

each_child() { |i_seq| ... } click to toggle source
# File yarp.rb, line 406
def each_child
  instructions.each do |instruction|
    # Only look at arrays. Other instructions are line numbers or
    # tracepoint events.
    next unless instruction.is_a?(Array)

    instruction.each do |opnd|
      # Only look at arrays. Other operands are literals.
      next unless opnd.is_a?(Array)

      # Only look at instruction sequences. Other operands are literals.
      next unless opnd[0] == "YARVInstructionSequence/SimpleDataFormat"

      yield ISeq.new(opnd)
    end
  end
end
instructions() click to toggle source
# File yarp.rb, line 402
def instructions
  parts[13]
end
local_table() click to toggle source
# File yarp.rb, line 398
def local_table
  parts[10]
end
type() click to toggle source
# File yarp.rb, line 394
def type
  parts[0]
end