harpoon.IR.Bytecode
Class InMerge

java.lang.Object
  extended by harpoon.IR.Bytecode.Instr
      extended by harpoon.IR.Bytecode.InMerge
All Implemented Interfaces:
HCodeElement, CFGraphable<Instr,harpoon.IR.Bytecode.InstrEdge>, Graph.Node<Instr,harpoon.IR.Bytecode.InstrEdge>, Comparable<Instr>

public class InMerge
extends Instr

InMerge is used to represent a node where multiple control flows merge. These are typically branch targets. An InMerge will have exactly one successor, and multiple predecessors.

Version:
$Id: InMerge.java,v 1.6 2002/04/10 03:04:37 cananian Exp $
Author:
C. Scott Ananian <cananian@alumni.princeton.edu>
See Also:
Instr

Field Summary
 
Fields inherited from class harpoon.IR.Bytecode.Instr
arrayFactory
 
Constructor Summary
InMerge(String sourcefile, int linenumber, int arity)
          Creates a new InMerge.
 
Method Summary
 int arity()
          Return the number of predecessors of this node.
 byte getOpcode()
          Return the java bytecode of this instruction.
 String toString()
          Return human-readable representation.
 
Methods inherited from class harpoon.IR.Bytecode.Instr
compareTo, edgeC, edges, equals, getID, getLineNumber, getSourceFile, hashCode, isPred, isSucc, newEdge, next, next, pred, predC, prev, prev, succ, succC
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

InMerge

public InMerge(String sourcefile,
               int linenumber,
               int arity)
Creates a new InMerge.

Parameters:
arity - the number of predecessors this node will have.
Method Detail

arity

public int arity()
Return the number of predecessors of this node. Exactly equivalent to prev().length but slightly more efficient.


getOpcode

public byte getOpcode()
Return the java bytecode of this instruction. This function is required by the superclass, but not relevant to this function. It returns Op.NOP.

Specified by:
getOpcode in class Instr

toString

public String toString()
Return human-readable representation.

Overrides:
toString in class Object