# HG changeset patch # User Christian Wimmer # Date 1326404658 28800 # Node ID 9a3a0cdb6e34ddee3554bd434e71d9a760f0c550 # Parent f8f262212aa40cb5bea50e5f96cdbc590257d030 Remove asAddress from FrameMap, I don't like it there. diff -r f8f262212aa4 -r 9a3a0cdb6e34 graal/com.oracle.max.graal.compiler/src/com/oracle/max/graal/compiler/asm/TargetMethodAssembler.java --- 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; } } diff -r f8f262212aa4 -r 9a3a0cdb6e34 graal/com.oracle.max.graal.compiler/src/com/oracle/max/graal/compiler/lir/FrameMap.java --- 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; - } }