Mercurial > hg > truffle
diff graal/com.oracle.graal.api.code/src/com/oracle/graal/api/code/RegisterAttributes.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 | 5e3d1a68664e |
line wrap: on
line diff
--- a/graal/com.oracle.graal.api.code/src/com/oracle/graal/api/code/RegisterAttributes.java Sat Jun 09 20:40:54 2012 +0200 +++ b/graal/com.oracle.graal.api.code/src/com/oracle/graal/api/code/RegisterAttributes.java Sat Jun 09 21:50:02 2012 +0200 @@ -30,32 +30,14 @@ * a compilation will determine which registers are callee saved. */ public class RegisterAttributes { - - /** - * Denotes a register whose value preservation (if required) across a call is the responsibility of the caller. - */ - public final boolean isCallerSave; - - /** - * Denotes a register whose value preservation (if required) across a call is the responsibility of the callee. - */ - public final boolean isCalleeSave; - - /** - * Denotes a register that is available for use by a register allocator. - */ - public final boolean isAllocatable; - - /** - * Denotes a register guaranteed to be non-zero if read in compiled Java code. - * For example, a register dedicated to holding the current thread. - */ - public boolean isNonZero; + private final boolean callerSave; + private final boolean calleeSave; + private final boolean allocatable; public RegisterAttributes(boolean isCallerSave, boolean isCalleeSave, boolean isAllocatable) { - this.isCallerSave = isCallerSave; - this.isCalleeSave = isCalleeSave; - this.isAllocatable = isAllocatable; + this.callerSave = isCallerSave; + this.calleeSave = isCalleeSave; + this.allocatable = isAllocatable; } public static final RegisterAttributes NONE = new RegisterAttributes(false, false, false); @@ -92,4 +74,25 @@ } return map; } + + /** + * @return Denotes a register that is available for use by a register allocator. + */ + public boolean isAllocatable() { + return allocatable; + } + + /** + * @return Denotes a register whose value preservation (if required) across a call is the responsibility of the callee. + */ + public boolean isCalleeSave() { + return calleeSave; + } + + /** + * @return Denotes a register whose value preservation (if required) across a call is the responsibility of the caller. + */ + public boolean isCallerSave() { + return callerSave; + } }