Mercurial > hg > truffle
diff graal/com.oracle.graal.api.code/src/com/oracle/graal/api/code/DebugInfo.java @ 5552:69a8969dbf40
Reduce public fields in api.code project.
author | Thomas Wuerthinger <thomas.wuerthinger@oracle.com> |
---|---|
date | Sat, 09 Jun 2012 21:50:02 +0200 |
parents | b6617d13ea44 |
children | 4d7175cf3526 |
line wrap: on
line diff
--- a/graal/com.oracle.graal.api.code/src/com/oracle/graal/api/code/DebugInfo.java Sat Jun 09 20:40:54 2012 +0200 +++ b/graal/com.oracle.graal.api.code/src/com/oracle/graal/api/code/DebugInfo.java Sat Jun 09 21:50:02 2012 +0200 @@ -33,24 +33,9 @@ private static final long serialVersionUID = -6047206624915812516L; - /** - * The code position (including all inlined methods) of this debug info. - * If this is a {@link BytecodeFrame} instance, then it is also the deoptimization information for each inlined frame. - */ - public final BytecodePosition codePos; - - /** - * The reference map for the registers at this point. The reference map is <i>packed</i> in that - * for bit {@code k} in byte {@code n}, it refers to the register whose - * {@linkplain Register#number number} is {@code (k + n * 8)}. - */ - public final BitSet registerRefMap; - - /** - * The reference map for the stack frame at this point. A set bit at {@code k} in the map - * represents stack slot number {@code k}. - */ - public final BitSet frameRefMap; + private final BytecodePosition bytecodePosition; + private final BitSet registerRefMap; + private final BitSet frameRefMap; /** * Creates a new {@code CiDebugInfo} from the given values. @@ -60,7 +45,7 @@ * @param frameRefMap the reference map for {@code frame}, which may be {@code null} */ public DebugInfo(BytecodePosition codePos, BitSet registerRefMap, BitSet frameRefMap) { - this.codePos = codePos; + this.bytecodePosition = codePos; this.registerRefMap = registerRefMap; this.frameRefMap = frameRefMap; } @@ -69,21 +54,21 @@ * @return {@code true} if this debug information has a frame */ public boolean hasFrame() { - return codePos instanceof BytecodeFrame; + return getBytecodePosition() instanceof BytecodeFrame; } /** * @return {@code true} if this debug info has a reference map for the registers */ public boolean hasRegisterRefMap() { - return registerRefMap != null && registerRefMap.size() > 0; + return getRegisterRefMap() != null && getRegisterRefMap().size() > 0; } /** * @return {@code true} if this debug info has a reference map for the stack */ public boolean hasStackRefMap() { - return frameRefMap != null && frameRefMap.size() > 0; + return getFrameRefMap() != null && getFrameRefMap().size() > 0; } @@ -94,7 +79,7 @@ */ public BytecodeFrame frame() { if (hasFrame()) { - return (BytecodeFrame) codePos; + return (BytecodeFrame) getBytecodePosition(); } return null; } @@ -103,4 +88,29 @@ public String toString() { return CodeUtil.append(new StringBuilder(100), this, null).toString(); } + + /** + * @return The code position (including all inlined methods) of this debug info. + * If this is a {@link BytecodeFrame} instance, then it is also the deoptimization information for each inlined frame. + */ + public BytecodePosition getBytecodePosition() { + return bytecodePosition; + } + + /** + * @return The reference map for the registers at this point. The reference map is <i>packed</i> in that + * for bit {@code k} in byte {@code n}, it refers to the register whose + * {@linkplain Register#number number} is {@code (k + n * 8)}. + */ + public BitSet getRegisterRefMap() { + return registerRefMap; + } + + /** + * @return The reference map for the stack frame at this point. A set bit at {@code k} in the map + * represents stack slot number {@code k}. + */ + public BitSet getFrameRefMap() { + return frameRefMap; + } }