final class BasicBlock extends Object
Modifier and Type | Field and Description |
---|---|
private int |
blockNumber
ID number (index into block array)
|
private int |
end
ending byte in byte code array
|
(package private) static int |
EXITBLOCK |
(package private) static byte |
INJSR |
(package private) static byte |
JSRENTRY |
(package private) static byte |
JSREXIT |
(package private) static byte |
METHODENTRY |
(package private) static int |
NOTBLOCK |
private short |
pred1 |
private short |
pred2 |
private int |
predcount
number of preceding basic blocks
|
private short[] |
restPredecessors
list of rest preceding basic blocks
|
private int |
start
starting byte in byte code array
|
(package private) static int |
STARTBBNUMBER |
(package private) static int |
STARTPREDSIZE |
private byte |
state
additional state info for jsr handling, and other flags
|
(package private) static byte |
TRYBLOCK |
(package private) static byte |
TRYHANDLERSTART |
(package private) static byte |
TRYSTART |
Constructor and Description |
---|
BasicBlock(int startval,
int bn)
This should be called only from the factory.
|
BasicBlock(int startval,
int endval,
int blockNumber)
This should be used when building the EXIT block EXIT is likely to have
several predecessors.
|
Modifier and Type | Method and Description |
---|---|
(package private) void |
addPredecessor(BasicBlock predbb) |
(package private) void |
addUniquePredecessor(BasicBlock predbb)
This method first checks if a block is already on the predecessor list.
|
(package private) int |
getBlockNumber() |
(package private) int |
getEnd() |
(package private) int[] |
getPredecessors() |
(package private) int |
getStart() |
(package private) byte |
getState() |
(package private) boolean |
isInJSR() |
(package private) boolean |
isJSREntry() |
(package private) boolean |
isJSRExit() |
(package private) boolean |
isMethodEntry() |
(package private) boolean |
isTryBlock() |
(package private) boolean |
isTryHandlerStart() |
(package private) boolean |
isTryStart() |
(package private) void |
setEnd(int endval) |
(package private) void |
setStart(int startval) |
(package private) void |
setState(byte stateval) |
(package private) static void |
transferPredecessors(BasicBlock fromBB,
BasicBlock toBB) |
static final int NOTBLOCK
static final int EXITBLOCK
static final int STARTPREDSIZE
static final int STARTBBNUMBER
static final byte JSRENTRY
static final byte JSREXIT
static final byte METHODENTRY
static final byte TRYSTART
static final byte TRYBLOCK
static final byte INJSR
static final byte TRYHANDLERSTART
private final int blockNumber
private int start
private int end
private int predcount
private short pred1
private short pred2
private short[] restPredecessors
private byte state
BasicBlock(int startval, int bn)
startval
- byte index where block startsbn
- the block's numberBasicBlock(int startval, int endval, int blockNumber)
startval
- byte index where block startsendval
- byte index where block startsblockNumber
- the block's numberstatic void transferPredecessors(BasicBlock fromBB, BasicBlock toBB)
void setStart(int startval)
void setEnd(int endval)
void setState(byte stateval)
int getStart()
int getEnd()
int getBlockNumber()
byte getState()
boolean isJSRExit()
boolean isJSREntry()
boolean isInJSR()
boolean isMethodEntry()
boolean isTryStart()
boolean isTryBlock()
boolean isTryHandlerStart()
void addPredecessor(BasicBlock predbb)
void addUniquePredecessor(BasicBlock predbb)
predbb
- block to add as predecessorint[] getPredecessors()