Mercurial > hg > truffle
changeset 13313:6dd9a1455e64
renamed PlaceholderOp to NoOp
author | Doug Simon <doug.simon@oracle.com> |
---|---|
date | Fri, 13 Dec 2013 13:19:46 +0100 |
parents | 323d99404728 |
children | 4c3e527bf857 |
files | graal/com.oracle.graal.hotspot.amd64/src/com/oracle/graal/hotspot/amd64/AMD64HotSpotLIRGenerator.java graal/com.oracle.graal.lir/src/com/oracle/graal/lir/StandardOp.java |
diffstat | 2 files changed, 12 insertions(+), 8 deletions(-) [+] |
line wrap: on
line diff
--- a/graal/com.oracle.graal.hotspot.amd64/src/com/oracle/graal/hotspot/amd64/AMD64HotSpotLIRGenerator.java Fri Dec 13 13:18:01 2013 +0100 +++ b/graal/com.oracle.graal.hotspot.amd64/src/com/oracle/graal/hotspot/amd64/AMD64HotSpotLIRGenerator.java Fri Dec 13 13:19:46 2013 +0100 @@ -48,7 +48,7 @@ import com.oracle.graal.hotspot.nodes.*; import com.oracle.graal.hotspot.stubs.*; import com.oracle.graal.lir.*; -import com.oracle.graal.lir.StandardOp.PlaceholderOp; +import com.oracle.graal.lir.StandardOp.NoOp; import com.oracle.graal.lir.StandardOp.SaveRegistersOp; import com.oracle.graal.lir.amd64.*; import com.oracle.graal.lir.amd64.AMD64ControlFlow.CondMoveOp; @@ -93,14 +93,14 @@ */ class SaveRbp { - final PlaceholderOp placeholder; + final NoOp placeholder; /** * The slot reserved for saving RBP. */ final StackSlot reservedSlot; - public SaveRbp(PlaceholderOp placeholder) { + public SaveRbp(NoOp placeholder) { this.placeholder = placeholder; this.reservedSlot = frameMap.allocateSpillSlot(Kind.Long); assert reservedSlot.getRawOffset() == -16 : reservedSlot.getRawOffset(); @@ -172,7 +172,7 @@ emitIncomingValues(params); - saveRbp = new SaveRbp(new PlaceholderOp(currentBlock, lir.lir(currentBlock).size())); + saveRbp = new SaveRbp(new NoOp(currentBlock, lir.lir(currentBlock).size())); append(saveRbp.placeholder); for (LocalNode local : graph.getNodes(LocalNode.class)) { @@ -433,6 +433,7 @@ @Override public void beforeRegisterAllocation() { + super.beforeRegisterAllocation(); boolean hasDebugInfo = lir.hasDebugInfo(); AllocatableValue savedRbp = saveRbp.finalize(hasDebugInfo); if (hasDebugInfo) {
--- a/graal/com.oracle.graal.lir/src/com/oracle/graal/lir/StandardOp.java Fri Dec 13 13:18:01 2013 +0100 +++ b/graal/com.oracle.graal.lir/src/com/oracle/graal/lir/StandardOp.java Fri Dec 13 13:19:46 2013 +0100 @@ -174,9 +174,10 @@ } /** - * Placeholder for a LIR instruction that will be subsequently replaced. + * A LIR operation that does nothing. If the operation records its position, it can be + * subsequently {@linkplain #replace(LIR, LIRInstruction) replaced}. */ - public static class PlaceholderOp extends LIRInstruction { + public static class NoOp extends LIRInstruction { /** * The block in which this instruction is located. @@ -188,7 +189,7 @@ */ final int index; - public PlaceholderOp(Block block, int index) { + public NoOp(Block block, int index) { this.block = block; this.index = index; } @@ -199,7 +200,9 @@ @Override public void emitCode(CompilationResultBuilder crb) { - throw new GraalInternalError(this + " should have been replaced"); + if (block != null) { + throw new GraalInternalError(this + " should have been replaced"); + } } } }