org.jikesrvm.compilers.opt.regalloc
Class LinearScan.BasicInterval

java.lang.Object
  extended by org.jikesrvm.compilers.opt.regalloc.LinearScan.BasicInterval
Direct Known Subclasses:
LinearScan.MappedBasicInterval
Enclosing class:
LinearScan

static class LinearScan.BasicInterval
extends Object

Implements a basic live interval (no holes), which is a pair

   begin    - the starting point of the interval
   end      - the ending point of the interval
 

Begin and end are numbers given to each instruction by a numbering pass.


Field Summary
private  int begin
          DFN of the beginning instruction of this interval
private  int end
          DFN of the last instruction of this interval
 
Constructor Summary
LinearScan.BasicInterval(int begin, int end)
          Default constructor.
 
Method Summary
(package private)  boolean contains(int dfn)
          Does this interval contain a dfn?
(package private)  boolean endsAfter(int dfn)
          Does this interval end after dfn
(package private)  boolean endsAfter(LinearScan.BasicInterval i)
          Does this interval end after another?
(package private)  boolean endsBefore(int dfn)
          Does this interval end before dfn
 boolean equals(Object o)
          Redefine equals
(package private)  int getBegin()
           
(package private)  int getEnd()
           
(package private)  boolean intersects(LinearScan.BasicInterval i)
          Does this interval intersect with another?
(package private)  boolean sameRange(LinearScan.BasicInterval i)
          Does this interval represent the same range as another?
(package private)  void setEnd(int newEnd)
          Extend a live interval to a new endpoint
(package private)  boolean startsAfter(int dfn)
          Does this interval start after dfn?
(package private)  boolean startsBefore(int dfn)
          Does this interval start before dfn?
(package private)  boolean startsBefore(LinearScan.BasicInterval i)
          Does this interval start before another?
 String toString()
          Return a String representation
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

begin

private final int begin
DFN of the beginning instruction of this interval


end

private int end
DFN of the last instruction of this interval

Constructor Detail

LinearScan.BasicInterval

LinearScan.BasicInterval(int begin,
                         int end)
Default constructor.

Method Detail

getBegin

final int getBegin()
Returns:
the DFN signifying the beginning of this basic interval

getEnd

final int getEnd()
Returns:
the DFN signifying the end of this basic interval

setEnd

final void setEnd(int newEnd)
Extend a live interval to a new endpoint


startsAfter

final boolean startsAfter(int dfn)
Does this interval start after dfn?

Parameters:
dfn - the depth first numbering to compare to

startsBefore

final boolean startsBefore(int dfn)
Does this interval start before dfn?

Parameters:
dfn - the depth first numbering to compare to

contains

final boolean contains(int dfn)
Does this interval contain a dfn?

Parameters:
dfn - the depth first numbering to compare to

startsBefore

final boolean startsBefore(LinearScan.BasicInterval i)
Does this interval start before another?

Parameters:
i - the interval to compare with

endsAfter

final boolean endsAfter(LinearScan.BasicInterval i)
Does this interval end after another?

Parameters:
i - the interval to compare with

sameRange

final boolean sameRange(LinearScan.BasicInterval i)
Does this interval represent the same range as another?

Parameters:
i - the interval to compare with

equals

public boolean equals(Object o)
Redefine equals

Overrides:
equals in class Object

endsBefore

final boolean endsBefore(int dfn)
Does this interval end before dfn

Parameters:
dfn - the depth first numbering to compare to

endsAfter

final boolean endsAfter(int dfn)
Does this interval end after dfn

Parameters:
dfn - the depth first numbering to compare to

intersects

final boolean intersects(LinearScan.BasicInterval i)
Does this interval intersect with another?


toString

public String toString()
Return a String representation

Overrides:
toString in class Object