|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.sun.tools.javac.jvm.CRTable
public class CRTable
This class contains the CharacterRangeTable for some method and the hashtable for mapping trees or lists of trees to their ending positions.
This is NOT part of any API supported by Sun Microsystems. If you write code that depends on this, you do so at your own risk. This code and its internal interfaces are subject to change or deletion without notice.
| Nested Class Summary | |
|---|---|
(package private) static class |
CRTable.CRTEntry
This class contains a CharacterRangeTableEntry. |
(package private) class |
CRTable.SourceComputer
This class contains methods to compute source positions for trees. |
(package private) static class |
CRTable.SourceRange
This class contains source positions for some tree or list of trees. |
| Field Summary | |
|---|---|
private boolean |
crtDebug
|
private java.util.Map<JCTree,java.lang.Integer> |
endPositions
The hashtable for ending positions stored in the parser. |
private ListBuffer<CRTable.CRTEntry> |
entries
The list of CRTable entries. |
(package private) JCTree.JCMethodDecl |
methodTree
The tree of the method this table is intended for. |
private java.util.Map<java.lang.Object,CRTable.SourceRange> |
positions
The hashtable for source positions. |
| Fields inherited from interface com.sun.tools.javac.jvm.CRTFlags |
|---|
CRT_ASSIGNMENT, CRT_BLOCK, CRT_BRANCH_FALSE, CRT_BRANCH_TRUE, CRT_CREATE, CRT_FLOW_CONTROLLER, CRT_FLOW_TARGET, CRT_INVOKE, CRT_STATEMENT, CRT_VALID_FLAGS |
| Constructor Summary | |
|---|---|
CRTable(JCTree.JCMethodDecl tree,
java.util.Map<JCTree,java.lang.Integer> endPositions)
Constructor |
|
| Method Summary | |
|---|---|
private int |
encodePosition(int pos,
Position.LineMap lineMap,
Log log)
Source file positions in CRT are integers in the format: line-number << LINESHIFT + column-number |
private java.lang.String |
getTypes(int flags)
Return string describing flags enabled. |
int |
length()
Return the number of the entries. |
void |
put(java.lang.Object tree,
int flags,
int startPc,
int endPc)
Create a new CRTEntry and add it to the entries. |
int |
writeCRT(ByteBuffer databuf,
Position.LineMap lineMap,
Log log)
Compute source positions and write CRT to the databuf. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private final boolean crtDebug
private ListBuffer<CRTable.CRTEntry> entries
private java.util.Map<java.lang.Object,CRTable.SourceRange> positions
private java.util.Map<JCTree,java.lang.Integer> endPositions
JCTree.JCMethodDecl methodTree
| Constructor Detail |
|---|
public CRTable(JCTree.JCMethodDecl tree,
java.util.Map<JCTree,java.lang.Integer> endPositions)
| Method Detail |
|---|
public void put(java.lang.Object tree,
int flags,
int startPc,
int endPc)
tree - The tree or the list of trees for which
we are storing the code pointers.flags - The set of flags designating type of the entry.startPc - The starting code position.endPc - The ending code position.
public int writeCRT(ByteBuffer databuf,
Position.LineMap lineMap,
Log log)
databuf - The buffer to write bytecodes to.public int length()
private java.lang.String getTypes(int flags)
private int encodePosition(int pos,
Position.LineMap lineMap,
Log log)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||