class SyntaxTree::YARV::SeaOfNodes::InsnNode

This object represents a node in the graph that holds a YARV instruction.

Attributes

inputs[R]
insn[R]
offset[R]
outputs[R]

Public Class Methods

new(insn, offset) click to toggle source
# File lib/syntax_tree/yarv/sea_of_nodes.rb, line 17
def initialize(insn, offset)
  @inputs = []
  @outputs = []

  @insn = insn
  @offset = offset
end

Public Instance Methods

id() click to toggle source
# File lib/syntax_tree/yarv/sea_of_nodes.rb, line 25
def id
  offset
end
label() click to toggle source
# File lib/syntax_tree/yarv/sea_of_nodes.rb, line 29
def label
  "%04d %s" % [offset, insn.disasm(Disassembler::Squished.new)]
end