org.jikesrvm.compilers.opt.inlining
Class InlineSequence

java.lang.Object
  extended by org.jikesrvm.compilers.opt.inlining.InlineSequence

public final class InlineSequence
extends Object

Represents an inlining sequence. Used to uniquely identify program locations.


Field Summary
 int bcIndex
          bytecode index (in caller) of call site
 InlineSequence caller
          Caller info.
(package private)  Instruction callSite
          We need more detailed information of call site than bcIndex.
 NormalMethod method
          Current method.
 
Constructor Summary
InlineSequence(NormalMethod method)
          Constructs a new top-level inline sequence operand.
InlineSequence(NormalMethod method, InlineSequence caller, Instruction callsite)
          Constructs a new inline sequence operand.
InlineSequence(NormalMethod method, InlineSequence caller, int bcIndex)
          Constructs a new inline sequence operand.
 
Method Summary
 boolean containsMethod(RVMMethod m)
          Does this inline sequence contain a given method?
 Enumeration<InlineSequence> enumerateFromRoot()
           
 boolean equals(Object obj)
           
 InlineSequence getCaller()
           
 Instruction getCallSite()
           
 int getInlineDepth()
          return the depth of inlining: (0 corresponds to no inlining)
 NormalMethod getMethod()
           
 NormalMethod getRootMethod()
          Return the root method of this inline sequence
 int hashCode()
           
 String toString()
          Returns the string representation of this inline sequence.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

method

public final NormalMethod method
Current method.


caller

public final InlineSequence caller
Caller info. null if none.


bcIndex

public int bcIndex
bytecode index (in caller) of call site


callSite

final Instruction callSite
We need more detailed information of call site than bcIndex.

Constructor Detail

InlineSequence

public InlineSequence(NormalMethod method)
Constructs a new top-level inline sequence operand.

Parameters:
method - current method

InlineSequence

InlineSequence(NormalMethod method,
               InlineSequence caller,
               int bcIndex)
Constructs a new inline sequence operand.

Parameters:
method - current method
caller - caller info
bcIndex - bytecode index of call site

InlineSequence

public InlineSequence(NormalMethod method,
                      InlineSequence caller,
                      Instruction callsite)
Constructs a new inline sequence operand.

Parameters:
method - current method
caller - caller info
callsite - the call site instruction of this callee
Method Detail

getMethod

public NormalMethod getMethod()
Returns:
contents of method

getCaller

public InlineSequence getCaller()
Returns:
contents of caller

getCallSite

public Instruction getCallSite()

toString

public String toString()
Returns the string representation of this inline sequence.

Overrides:
toString in class Object

getInlineDepth

public int getInlineDepth()
return the depth of inlining: (0 corresponds to no inlining)


getRootMethod

public NormalMethod getRootMethod()
Return the root method of this inline sequence


containsMethod

public boolean containsMethod(RVMMethod m)
Does this inline sequence contain a given method?


enumerateFromRoot

public Enumeration<InlineSequence> enumerateFromRoot()

hashCode

public int hashCode()
Overrides:
hashCode in class Object

equals

public boolean equals(Object obj)
Overrides:
equals in class Object