Mercurial > hg > truffle
changeset 4277:9a3a0cdb6e34
Remove asAddress from FrameMap, I don't like it there.
author | Christian Wimmer <Christian.Wimmer@Oracle.com> |
---|---|
date | Thu, 12 Jan 2012 13:44:18 -0800 |
parents | f8f262212aa4 |
children | b49981617b10 |
files | graal/com.oracle.max.graal.compiler/src/com/oracle/max/graal/compiler/asm/TargetMethodAssembler.java graal/com.oracle.max.graal.compiler/src/com/oracle/max/graal/compiler/lir/FrameMap.java |
diffstat | 2 files changed, 13 insertions(+), 9 deletions(-) [+] |
line wrap: on
line diff
--- a/graal/com.oracle.max.graal.compiler/src/com/oracle/max/graal/compiler/asm/TargetMethodAssembler.java Thu Jan 12 16:08:41 2012 +0100 +++ b/graal/com.oracle.max.graal.compiler/src/com/oracle/max/graal/compiler/asm/TargetMethodAssembler.java Thu Jan 12 13:44:18 2012 -0800 @@ -234,7 +234,19 @@ return recordDataReferenceInCode((CiConstant) value, alignment); } + /** + * Returns the address of a long constant that is embedded as a data references into the code. + */ + public CiAddress asLongConstRef(CiValue value) { + assert value.kind == CiKind.Long && isConstant(value); + return recordDataReferenceInCode((CiConstant) value, 8); + } + public CiAddress asAddress(CiValue value) { - return frameMap.asAddress(value); + if (isStackSlot(value)) { + CiStackSlot slot = (CiStackSlot) value; + return new CiAddress(slot.kind, frameMap.registerConfig.getFrameRegister().asValue(), frameMap.offsetForStackSlot(slot)); + } + return (CiAddress) value; } }
--- a/graal/com.oracle.max.graal.compiler/src/com/oracle/max/graal/compiler/lir/FrameMap.java Thu Jan 12 16:08:41 2012 +0100 +++ b/graal/com.oracle.max.graal.compiler/src/com/oracle/max/graal/compiler/lir/FrameMap.java Thu Jan 12 13:44:18 2012 -0800 @@ -339,12 +339,4 @@ } } } - - public CiAddress asAddress(CiValue value) { - if (isStackSlot(value)) { - CiStackSlot slot = (CiStackSlot) value; - return new CiAddress(slot.kind, registerConfig.getFrameRegister().asValue(), offsetForStackSlot(slot)); - } - return (CiAddress) value; - } }