# HG changeset patch # User Thomas Wuerthinger # Date 1339191860 -7200 # Node ID bc647d8b0080a7758f5b8232496969e940ee4e09 # Parent e18ba36bfebce24e9c7f01422ff9ada01d0740b4 Renaming RiValue => Value. diff -r e18ba36bfebc -r bc647d8b0080 graal/com.oracle.graal.alloc/src/com/oracle/graal/alloc/simple/AssignRegisters.java --- a/graal/com.oracle.graal.alloc/src/com/oracle/graal/alloc/simple/AssignRegisters.java Fri Jun 08 23:41:02 2012 +0200 +++ b/graal/com.oracle.graal.alloc/src/com/oracle/graal/alloc/simple/AssignRegisters.java Fri Jun 08 23:44:20 2012 +0200 @@ -45,9 +45,9 @@ private CiBitMap curFrameRefMap; public void execute() { - ValueProcedure useProc = new ValueProcedure() { @Override public RiValue doValue(RiValue value) { return use(value); } }; - ValueProcedure defProc = new ValueProcedure() { @Override public RiValue doValue(RiValue value) { return def(value); } }; - ValueProcedure setReferenceProc = new ValueProcedure() { @Override public RiValue doValue(RiValue value) { return setReference(value); } }; + ValueProcedure useProc = new ValueProcedure() { @Override public Value doValue(Value value) { return use(value); } }; + ValueProcedure defProc = new ValueProcedure() { @Override public Value doValue(Value value) { return def(value); } }; + ValueProcedure setReferenceProc = new ValueProcedure() { @Override public Value doValue(Value value) { return setReference(value); } }; Debug.log("==== start assign registers ===="); for (int i = lir.linearScanOrder().size() - 1; i >= 0; i--) { @@ -90,10 +90,10 @@ Debug.log("==== end assign registers ===="); } - private RiValue use(RiValue value) { + private Value use(Value value) { Debug.log(" use %s", value); if (isLocation(value)) { - RiValue location = asLocation(value).location; + Value location = asLocation(value).location; frameMap.setReference(location, curRegisterRefMap, curFrameRefMap); return location; } else { @@ -102,10 +102,10 @@ } } - private RiValue def(RiValue value) { + private Value def(Value value) { Debug.log(" def %s", value); if (isLocation(value)) { - RiValue location = asLocation(value).location; + Value location = asLocation(value).location; frameMap.clearReference(location, curRegisterRefMap, curFrameRefMap); return location; } else { @@ -114,7 +114,7 @@ } } - private RiValue setReference(RiValue value) { + private Value setReference(Value value) { Debug.log(" setReference %s", value); frameMap.setReference(asLocation(value).location, curRegisterRefMap, curFrameRefMap); return value; diff -r e18ba36bfebc -r bc647d8b0080 graal/com.oracle.graal.alloc/src/com/oracle/graal/alloc/simple/DataFlowAnalysis.java --- a/graal/com.oracle.graal.alloc/src/com/oracle/graal/alloc/simple/DataFlowAnalysis.java Fri Jun 08 23:41:02 2012 +0200 +++ b/graal/com.oracle.graal.alloc/src/com/oracle/graal/alloc/simple/DataFlowAnalysis.java Fri Jun 08 23:44:20 2012 +0200 @@ -57,7 +57,7 @@ return lir.numVariables(); } - private boolean isAllocatableRegister(RiValue value) { + private boolean isAllocatableRegister(Value value) { return isRegister(value) && registerConfig.getAttributesMap()[asRegister(value).number].isAllocatable; } @@ -93,14 +93,14 @@ Object entry = killedValues(op.id() + (end ? 1 : 0)); if (entry == null) { // Nothing to do - } else if (entry instanceof RiValue) { - RiValue newValue = proc.doValue((RiValue) entry, null, null); + } else if (entry instanceof Value) { + Value newValue = proc.doValue((Value) entry, null, null); assert newValue == entry : "procedure does not allow to change values"; } else { - RiValue[] values = (RiValue[]) entry; + Value[] values = (Value[]) entry; for (int i = 0; i < values.length; i++) { if (values[i] != null) { - RiValue newValue = proc.doValue(values[i], null, null); + Value newValue = proc.doValue(values[i], null, null); assert newValue == values[i] : "procedure does not allow to change values"; } } @@ -115,7 +115,7 @@ * Numbers all instructions in all blocks. The numbering follows the {@linkplain ComputeLinearScanOrder linear scan order}. */ private void numberInstructions() { - ValueProcedure defProc = new ValueProcedure() { @Override public RiValue doValue(RiValue value) { return setDef(value); } }; + ValueProcedure defProc = new ValueProcedure() { @Override public Value doValue(Value value) { return setDef(value); } }; int numInstructions = 0; for (Block block : blocks()) { @@ -140,7 +140,7 @@ assert curOpId == numInstructions << 1; } - private RiValue setDef(RiValue value) { + private Value setDef(Value value) { if (isVariable(value)) { assert definitions[asVariable(value).index] == 0 : "Variable defined twice"; definitions[asVariable(value).index] = curOpId; @@ -154,10 +154,10 @@ private int curOpId; private void backwardDataFlow() { - ValueProcedure inputProc = new ValueProcedure() { @Override public RiValue doValue(RiValue value) { return use(value, curOpId); } }; - ValueProcedure aliveProc = new ValueProcedure() { @Override public RiValue doValue(RiValue value) { return use(value, curOpId + 1); } }; - ValueProcedure tempProc = new ValueProcedure() { @Override public RiValue doValue(RiValue value) { return def(value, true); } }; - ValueProcedure outputProc = new ValueProcedure() { @Override public RiValue doValue(RiValue value) { return def(value, false); } }; + ValueProcedure inputProc = new ValueProcedure() { @Override public Value doValue(Value value) { return use(value, curOpId); } }; + ValueProcedure aliveProc = new ValueProcedure() { @Override public Value doValue(Value value) { return use(value, curOpId + 1); } }; + ValueProcedure tempProc = new ValueProcedure() { @Override public Value doValue(Value value) { return def(value, true); } }; + ValueProcedure outputProc = new ValueProcedure() { @Override public Value doValue(Value value) { return def(value, false); } }; blockLiveIn = new BitSet[blocks().size()]; registerLive = new BitSet(); @@ -211,7 +211,7 @@ Debug.log("==== end backward data flow analysis ===="); } - private RiValue use(RiValue value, int killOpId) { + private Value use(Value value, int killOpId) { Debug.log(" use %s", value); if (isVariable(value)) { int variableIdx = asVariable(value).index; @@ -233,7 +233,7 @@ return value; } - private RiValue def(RiValue value, boolean isTemp) { + private Value def(Value value, boolean isTemp) { Debug.log(" def %s", value); if (isVariable(value)) { int variableIdx = asVariable(value).index; @@ -261,7 +261,7 @@ return value; } - private void kill(RiValue value, int opId) { + private void kill(Value value, int opId) { if (opId < 0) { return; } @@ -284,10 +284,10 @@ Object entry = killedValues(opId); if (entry == null) { setKilledValues(opId, value); - } else if (entry instanceof RiValue) { - setKilledValues(opId, new RiValue[] {(RiValue) entry, value}); + } else if (entry instanceof Value) { + setKilledValues(opId, new Value[] {(Value) entry, value}); } else { - RiValue[] killed = (RiValue[]) entry; + Value[] killed = (Value[]) entry; for (int i = 0; i < killed.length; i++) { if (killed[i] == null) { killed[i] = value; diff -r e18ba36bfebc -r bc647d8b0080 graal/com.oracle.graal.alloc/src/com/oracle/graal/alloc/simple/LinearScanAllocator.java --- a/graal/com.oracle.graal.alloc/src/com/oracle/graal/alloc/simple/LinearScanAllocator.java Fri Jun 08 23:41:02 2012 +0200 +++ b/graal/com.oracle.graal.alloc/src/com/oracle/graal/alloc/simple/LinearScanAllocator.java Fri Jun 08 23:44:20 2012 +0200 @@ -59,7 +59,7 @@ } @Override - protected RiValue scratchRegister(Variable spilled) { + protected Value scratchRegister(Variable spilled) { GraalInternalError.shouldNotReachHere("needs working implementation"); EnumMap categorizedRegs = frameMap.registerConfig.getCategorizedAllocatableRegisters(); @@ -105,7 +105,7 @@ return frameMap.target.arch.registers.length; } - private boolean isAllocatableRegister(RiValue value) { + private boolean isAllocatableRegister(Value value) { return isRegister(value) && frameMap.registerConfig.getAttributesMap()[asRegister(value).number].isAllocatable; } @@ -140,8 +140,8 @@ private MoveResolver moveResolver; private LocationMap curLocations; - private RiValue[] curInRegisterState; - private RiValue[] curOutRegisterState; + private Value[] curInRegisterState; + private Value[] curOutRegisterState; private BitSet curLiveIn; private LIRInstruction curOp; @@ -180,19 +180,19 @@ } private void allocate() { - ValueProcedure recordUseProc = new ValueProcedure() { @Override public RiValue doValue(RiValue value, OperandMode mode, EnumSet flags) { return recordUse(value); } }; - ValueProcedure killNonLiveProc = new ValueProcedure() { @Override public RiValue doValue(RiValue value) { return killNonLive(value); } }; - ValueProcedure unblockProc = new ValueProcedure() { @Override public RiValue doValue(RiValue value) { return unblock(value); } }; - ValueProcedure killProc = new ValueProcedure() { @Override public RiValue doValue(RiValue value) { return kill(value); } }; - ValueProcedure blockProc = new ValueProcedure() { @Override public RiValue doValue(RiValue value) { return block(value); } }; - ValueProcedure useProc = new ValueProcedure() { @Override public RiValue doValue(RiValue value, OperandMode mode, EnumSet flags) { return use(value, mode, flags); } }; - ValueProcedure defProc = new ValueProcedure() { @Override public RiValue doValue(RiValue value, OperandMode mode, EnumSet flags) { return def(value, mode, flags); } }; + ValueProcedure recordUseProc = new ValueProcedure() { @Override public Value doValue(Value value, OperandMode mode, EnumSet flags) { return recordUse(value); } }; + ValueProcedure killNonLiveProc = new ValueProcedure() { @Override public Value doValue(Value value) { return killNonLive(value); } }; + ValueProcedure unblockProc = new ValueProcedure() { @Override public Value doValue(Value value) { return unblock(value); } }; + ValueProcedure killProc = new ValueProcedure() { @Override public Value doValue(Value value) { return kill(value); } }; + ValueProcedure blockProc = new ValueProcedure() { @Override public Value doValue(Value value) { return block(value); } }; + ValueProcedure useProc = new ValueProcedure() { @Override public Value doValue(Value value, OperandMode mode, EnumSet flags) { return use(value, mode, flags); } }; + ValueProcedure defProc = new ValueProcedure() { @Override public Value doValue(Value value, OperandMode mode, EnumSet flags) { return def(value, mode, flags); } }; Debug.log("==== start linear scan allocation ===="); canonicalSpillLocations = new LocationMap(lir.numVariables()); hintRegisterLocations = new LocationMap(lir.numVariables()); - curInRegisterState = new RiValue[maxRegisterNum()]; - curOutRegisterState = new RiValue[maxRegisterNum()]; + curInRegisterState = new Value[maxRegisterNum()]; + curOutRegisterState = new Value[maxRegisterNum()]; for (Block block : lir.linearScanOrder()) { Debug.log("start block %s %s", block, block.getLoop()); @@ -272,7 +272,7 @@ Debug.log("==== end linear scan allocation ===="); } - private RiValue killNonLive(RiValue value) { + private Value killNonLive(Value value) { assert isLocation(value); if (!curLiveIn.get(asLocation(value).variable.index)) { return null; @@ -285,7 +285,7 @@ return value; } - private RiValue unblock(RiValue value) { + private Value unblock(Value value) { if (isAllocatableRegister(value)) { Debug.log(" unblock register %s", value); int regNum = asRegister(value).number; @@ -295,7 +295,7 @@ return value; } - private RiValue kill(RiValue value) { + private Value kill(Value value) { if (isVariable(value)) { Location location = curLocations.get(asVariable(value)); Debug.log(" kill location %s", location); @@ -311,7 +311,7 @@ } - private RiValue block(RiValue value) { + private Value block(Value value) { if (isAllocatableRegister(value)) { Debug.log(" block %s", value); int regNum = asRegister(value).number; @@ -324,14 +324,14 @@ private void spillCallerSaveRegisters() { Debug.log(" spill caller save registers in curInRegisterState %s", Arrays.toString(curInRegisterState)); for (CiRegister reg : frameMap.registerConfig.getCallerSaveRegisters()) { - RiValue in = curInRegisterState[reg.number]; + Value in = curInRegisterState[reg.number]; if (in != null && isLocation(in)) { spill(asLocation(in)); } } } - private RiValue recordUse(RiValue value) { + private Value recordUse(Value value) { if (isVariable(value)) { assert lastUseFor(asVariable(value)) <= curOp.id(); setLastUseFor(asVariable(value), curOp.id()); @@ -340,7 +340,7 @@ return value; } - private RiValue use(RiValue value, OperandMode mode, EnumSet flags) { + private Value use(Value value, OperandMode mode, EnumSet flags) { assert mode == OperandMode.Input || mode == OperandMode.Alive; if (isVariable(value)) { // State values are not recorded beforehand because it does not matter if they are spilled. Still, it is necessary to record them as used now. @@ -375,7 +375,7 @@ private static final EnumSet SPILL_FLAGS = EnumSet.of(OperandFlag.Register, OperandFlag.Stack); - private RiValue def(RiValue value, OperandMode mode, EnumSet flags) { + private Value def(Value value, OperandMode mode, EnumSet flags) { assert mode == OperandMode.Temp || mode == OperandMode.Output; if (isVariable(value)) { Debug.log(" def %s %s", mode, value); @@ -390,8 +390,8 @@ private void fixupEvicted() { for (int i = 0; i < curInRegisterState.length; i++) { - RiValue in = curInRegisterState[i]; - RiValue out = curOutRegisterState[i]; + Value in = curInRegisterState[i]; + Value out = curOutRegisterState[i]; if (in != null && in != out && isLocation(in) && curLocations.get(asLocation(in).variable) == in) { Debug.log(" %s was evicted by %s, need to allocate new location", in, out); @@ -408,13 +408,13 @@ private void phiRegisterHints(Block block) { Debug.log(" phi register hints for %s", block); - RiValue[] phiDefinitions = ((StandardOp.PhiLabelOp) block.lir.get(0)).getPhiDefinitions(); + Value[] phiDefinitions = ((StandardOp.PhiLabelOp) block.lir.get(0)).getPhiDefinitions(); for (Block pred : block.getPredecessors()) { - RiValue[] phiInputs = ((StandardOp.PhiJumpOp) pred.lir.get(pred.lir.size() - 1)).getPhiInputs(); + Value[] phiInputs = ((StandardOp.PhiJumpOp) pred.lir.get(pred.lir.size() - 1)).getPhiInputs(); for (int i = 0; i < phiDefinitions.length; i++) { - RiValue phiDefinition = phiDefinitions[i]; - RiValue phiInput = phiInputs[i]; + Value phiDefinition = phiDefinitions[i]; + Value phiInput = phiInputs[i]; if (isVariable(phiDefinition)) { Location hintResult = processRegisterHint(asVariable(phiDefinition), OperandMode.Output, phiInput); @@ -426,7 +426,7 @@ } } - private Location processRegisterHint(Variable variable, OperandMode mode, RiValue registerHint) { + private Location processRegisterHint(Variable variable, OperandMode mode, Value registerHint) { if (registerHint == null) { return null; } @@ -445,9 +445,9 @@ private Location allocateRegister(final Variable variable, final OperandMode mode, EnumSet flags) { if (flags.contains(OperandFlag.RegisterHint)) { - RiValue hintResult = curOp.forEachRegisterHint(variable, mode, new ValueProcedure() { + Value hintResult = curOp.forEachRegisterHint(variable, mode, new ValueProcedure() { @Override - public RiValue doValue(RiValue registerHint) { + public Value doValue(Value registerHint) { return processRegisterHint(variable, mode, registerHint); } }); @@ -456,7 +456,7 @@ } } - RiValue hintResult = processRegisterHint(variable, mode, hintRegisterLocations.get(variable)); + Value hintResult = processRegisterHint(variable, mode, hintRegisterLocations.get(variable)); if (hintResult != null) { return asLocation(hintResult); } @@ -518,8 +518,8 @@ } private Location spillCandidate(CiRegister reg) { - RiValue in = curInRegisterState[reg.number]; - RiValue out = curOutRegisterState[reg.number]; + Value in = curInRegisterState[reg.number]; + Value out = curOutRegisterState[reg.number]; if (in == out && in != null && isLocation(in) && lastUseFor(asLocation(in).variable) < curOp.id()) { return asLocation(in); } @@ -579,7 +579,7 @@ final BitSet liveState = new BitSet(); curLocations.forEachLocation(new ValueProcedure() { @Override - public RiValue doValue(RiValue value) { + public Value doValue(Value value) { liveState.set(asLocation(value).variable.index); for (Block pred : block.getPredecessors()) { @@ -603,7 +603,7 @@ sb.append(" current lcoations: "); curLocations.forEachLocation(new ValueProcedure() { @Override - public RiValue doValue(RiValue value) { + public Value doValue(Value value) { sb.append(value).append(" "); return value; } diff -r e18ba36bfebc -r bc647d8b0080 graal/com.oracle.graal.alloc/src/com/oracle/graal/alloc/simple/ResolveDataFlow.java --- a/graal/com.oracle.graal.alloc/src/com/oracle/graal/alloc/simple/ResolveDataFlow.java Fri Jun 08 23:41:02 2012 +0200 +++ b/graal/com.oracle.graal.alloc/src/com/oracle/graal/alloc/simple/ResolveDataFlow.java Fri Jun 08 23:44:20 2012 +0200 @@ -49,7 +49,7 @@ private LocationMap curFromLocations; public void execute() { - ValueProcedure locMappingProc = new ValueProcedure() { @Override public RiValue doValue(RiValue value) { return locMapping(value); } }; + ValueProcedure locMappingProc = new ValueProcedure() { @Override public Value doValue(Value value) { return locMapping(value); } }; Debug.log("==== start resolve data flow ===="); for (Block toBlock : lir.linearScanOrder()) { @@ -87,7 +87,7 @@ Debug.log("==== end resolve data flow ===="); } - private RiValue locMapping(RiValue value) { + private Value locMapping(Value value) { Location to = asLocation(value); Location from = curFromLocations.get(to.variable); if (value != from && from != null) { @@ -96,7 +96,7 @@ return value; } - private void phiMapping(RiValue[] inputs, RiValue[] outputs) { + private void phiMapping(Value[] inputs, Value[] outputs) { assert inputs.length == outputs.length; for (int i = 0; i < inputs.length; i++) { if (inputs[i] != outputs[i]) { diff -r e18ba36bfebc -r bc647d8b0080 graal/com.oracle.graal.alloc/src/com/oracle/graal/alloc/simple/SpillAllAllocator.java --- a/graal/com.oracle.graal.alloc/src/com/oracle/graal/alloc/simple/SpillAllAllocator.java Fri Jun 08 23:41:02 2012 +0200 +++ b/graal/com.oracle.graal.alloc/src/com/oracle/graal/alloc/simple/SpillAllAllocator.java Fri Jun 08 23:44:20 2012 +0200 @@ -56,7 +56,7 @@ } @Override - protected RiValue scratchRegister(Variable spilled) { + protected Value scratchRegister(Variable spilled) { EnumMap categorizedRegs = frameMap.registerConfig.getCategorizedAllocatableRegisters(); CiRegister[] availableRegs = categorizedRegs.get(spilled.flag); for (CiRegister reg : availableRegs) { @@ -101,7 +101,7 @@ return frameMap.target.arch.registers.length; } - private boolean isAllocatableRegister(RiValue value) { + private boolean isAllocatableRegister(Value value) { return isRegister(value) && frameMap.registerConfig.getAttributesMap()[asRegister(value).number].isAllocatable; } @@ -148,14 +148,14 @@ } private void allocate() { - ValueProcedure killNonLiveProc = new ValueProcedure() { @Override public RiValue doValue(RiValue value) { return killNonLive(value); } }; - ValueProcedure killBeginProc = new ValueProcedure() { @Override public RiValue doValue(RiValue value) { return kill(value, false); } }; - ValueProcedure killEndProc = new ValueProcedure() { @Override public RiValue doValue(RiValue value) { return kill(value, true); } }; - ValueProcedure killLocationProc = new ValueProcedure() { @Override public RiValue doValue(RiValue value) { return killLocation(value); } }; - ValueProcedure blockProc = new ValueProcedure() { @Override public RiValue doValue(RiValue value) { return block(value); } }; - ValueProcedure loadProc = new ValueProcedure() { @Override public RiValue doValue(RiValue value, OperandMode mode, EnumSet flags) { return load(value, mode, flags); } }; - ValueProcedure spillProc = new ValueProcedure() { @Override public RiValue doValue(RiValue value, OperandMode mode, EnumSet flags) { return spill(value, mode, flags); } }; - ValueProcedure useSlotProc = new ValueProcedure() { @Override public RiValue doValue(RiValue value) { return useSlot(value); } }; + ValueProcedure killNonLiveProc = new ValueProcedure() { @Override public Value doValue(Value value) { return killNonLive(value); } }; + ValueProcedure killBeginProc = new ValueProcedure() { @Override public Value doValue(Value value) { return kill(value, false); } }; + ValueProcedure killEndProc = new ValueProcedure() { @Override public Value doValue(Value value) { return kill(value, true); } }; + ValueProcedure killLocationProc = new ValueProcedure() { @Override public Value doValue(Value value) { return killLocation(value); } }; + ValueProcedure blockProc = new ValueProcedure() { @Override public Value doValue(Value value) { return block(value); } }; + ValueProcedure loadProc = new ValueProcedure() { @Override public Value doValue(Value value, OperandMode mode, EnumSet flags) { return load(value, mode, flags); } }; + ValueProcedure spillProc = new ValueProcedure() { @Override public Value doValue(Value value, OperandMode mode, EnumSet flags) { return spill(value, mode, flags); } }; + ValueProcedure useSlotProc = new ValueProcedure() { @Override public Value doValue(Value value) { return useSlot(value); } }; Debug.log("==== start spill all allocation ===="); curInRegisterState = new Object[maxRegisterNum()]; @@ -223,7 +223,7 @@ Debug.log("==== end spill all allocation ===="); } - private RiValue killNonLive(RiValue value) { + private Value killNonLive(Value value) { assert isLocation(value); if (!curLiveIn.get(asLocation(value).variable.index)) { return null; @@ -231,7 +231,7 @@ return value; } - private RiValue kill(RiValue value, boolean end) { + private Value kill(Value value, boolean end) { if (isVariable(value)) { Debug.log(" kill variable %s", value); @@ -267,7 +267,7 @@ return value; } - private RiValue killLocation(RiValue value) { + private Value killLocation(Value value) { Debug.log(" kill location %s", value); assert isAllocatableRegister(asLocation(value).location); @@ -278,7 +278,7 @@ return null; } - private RiValue block(RiValue value) { + private Value block(Value value) { if (isAllocatableRegister(value)) { Debug.log(" block %s", value); int regNum = asRegister(value).number; @@ -289,7 +289,7 @@ return value; } - private RiValue load(RiValue value, OperandMode mode, EnumSet flags) { + private Value load(Value value, OperandMode mode, EnumSet flags) { assert mode == OperandMode.Input || mode == OperandMode.Alive; if (flags.contains(OperandFlag.Stack)) { return useSlot(value); @@ -313,7 +313,7 @@ } } - private RiValue spill(RiValue value, OperandMode mode, EnumSet flags) { + private Value spill(Value value, OperandMode mode, EnumSet flags) { assert mode == OperandMode.Temp || mode == OperandMode.Output; if (flags.contains(OperandFlag.Stack)) { return defSlot(value); @@ -334,7 +334,7 @@ } } - private RiValue useSlot(RiValue value) { + private Value useSlot(Value value) { if (isVariable(value)) { Debug.log(" useSlot %s", value); Location stackLoc = curStackLocations.get(asVariable(value)); @@ -346,7 +346,7 @@ } } - private RiValue defSlot(RiValue value) { + private Value defSlot(Value value) { if (isVariable(value)) { Debug.log(" assignSlot %s", value); Location stackLoc = new Location(asVariable(value), frameMap.allocateSpillSlot(value.kind)); @@ -361,9 +361,9 @@ private Location allocateRegister(final Variable variable, final Object[] inRegisterState, final Object[] outRegisterState, OperandMode mode, EnumSet flags) { if (flags.contains(OperandFlag.RegisterHint)) { - RiValue result = curInstruction.forEachRegisterHint(variable, mode, new ValueProcedure() { + Value result = curInstruction.forEachRegisterHint(variable, mode, new ValueProcedure() { @Override - public RiValue doValue(RiValue registerHint) { + public Value doValue(Value registerHint) { Debug.log(" registerHint %s", registerHint); CiRegister hint = null; if (isRegister(registerHint)) { @@ -417,7 +417,7 @@ final BitSet liveState = new BitSet(); curStackLocations.forEachLocation(new ValueProcedure() { @Override - public RiValue doValue(RiValue value) { + public Value doValue(Value value) { liveState.set(asLocation(value).variable.index); for (Block pred : block.getPredecessors()) { @@ -455,7 +455,7 @@ sb.append(" curVariableLocations: "); curStackLocations.forEachLocation(new ValueProcedure() { @Override - public RiValue doValue(RiValue value) { + public Value doValue(Value value) { sb.append(value).append(" "); return value; } diff -r e18ba36bfebc -r bc647d8b0080 graal/com.oracle.graal.alloc/src/com/oracle/graal/alloc/util/IntervalPrinter.java --- a/graal/com.oracle.graal.alloc/src/com/oracle/graal/alloc/util/IntervalPrinter.java Fri Jun 08 23:41:02 2012 +0200 +++ b/graal/com.oracle.graal.alloc/src/com/oracle/graal/alloc/util/IntervalPrinter.java Fri Jun 08 23:44:20 2012 +0200 @@ -111,7 +111,7 @@ this.intervals = new HashMap<>(); } - private boolean isAllocatableRegister(RiValue value) { + private boolean isAllocatableRegister(Value value) { return isRegister(value) && registerConfig.getAttributesMap()[asRegister(value).number].isAllocatable; } @@ -119,7 +119,7 @@ private String curUseKind; public Interval[] execute() { - ValueProcedure varProc = new ValueProcedure() { @Override public RiValue doValue(RiValue value) { return var(value); } }; + ValueProcedure varProc = new ValueProcedure() { @Override public Value doValue(Value value) { return var(value); } }; for (Block block : lir.linearScanOrder()) { for (LIRInstruction op : block.lir) { @@ -127,8 +127,8 @@ } } - ValueProcedure useProc = new ValueProcedure() { @Override public RiValue doValue(RiValue value, OperandMode mode, EnumSet flags) { return use(value, mode, flags); } }; - ValueProcedure defProc = new ValueProcedure() { @Override public RiValue doValue(RiValue value, OperandMode mode, EnumSet flags) { return def(value, flags); } }; + ValueProcedure useProc = new ValueProcedure() { @Override public Value doValue(Value value, OperandMode mode, EnumSet flags) { return use(value, mode, flags); } }; + ValueProcedure defProc = new ValueProcedure() { @Override public Value doValue(Value value, OperandMode mode, EnumSet flags) { return def(value, flags); } }; intervals.put("call", new Interval(-2, "call", "", "call", "hasCall")); intervals.put("st", new Interval(-1, "st", "", "st", "hasState")); @@ -190,7 +190,7 @@ return intervalsArray; } - public RiValue var(RiValue value) { + public Value var(Value value) { if (isLocation(value)) { variables[asLocation(value).variable.index] = asLocation(value).variable; } else if (isVariable(value)) { @@ -199,7 +199,7 @@ return value; } - private Interval findInterval(RiValue value) { + private Interval findInterval(Value value) { Interval interval; if (isLocation(value)) { Interval parent = findInterval(asLocation(value).variable); @@ -235,7 +235,7 @@ } } - private RiValue use(RiValue value, OperandMode mode, EnumSet flags) { + private Value use(Value value, OperandMode mode, EnumSet flags) { Interval interval = findInterval(value); if (interval != null) { if (interval.uses.size() == 0 || interval.uses.get(interval.uses.size() - 1).pos != curOpId) { @@ -248,7 +248,7 @@ return value; } - private RiValue def(RiValue value, EnumSet flags) { + private Value def(Value value, EnumSet flags) { Interval interval = findInterval(value); if (interval != null) { interval.uses.add(new UsePosition(curOpId, useKind(flags))); @@ -262,7 +262,7 @@ return value; } - private RiValue out(RiValue value) { + private Value out(Value value) { Interval interval = findInterval(value); if (interval != null) { interval.lastTo = curOpId; diff -r e18ba36bfebc -r bc647d8b0080 graal/com.oracle.graal.alloc/src/com/oracle/graal/alloc/util/Location.java --- a/graal/com.oracle.graal.alloc/src/com/oracle/graal/alloc/util/Location.java Fri Jun 08 23:41:02 2012 +0200 +++ b/graal/com.oracle.graal.alloc/src/com/oracle/graal/alloc/util/Location.java Fri Jun 08 23:44:20 2012 +0200 @@ -25,13 +25,13 @@ import com.oracle.graal.api.meta.*; import com.oracle.graal.lir.*; -public class Location extends RiValue { +public class Location extends Value { private static final long serialVersionUID = -1786677729152726126L; public final Variable variable; - public final RiValue location; + public final Value location; - public Location(Variable variable, RiValue location) { + public Location(Variable variable, Value location) { super(variable.kind); this.variable = variable; this.location = location; diff -r e18ba36bfebc -r bc647d8b0080 graal/com.oracle.graal.alloc/src/com/oracle/graal/alloc/util/LocationMap.java --- a/graal/com.oracle.graal.alloc/src/com/oracle/graal/alloc/util/LocationMap.java Fri Jun 08 23:41:02 2012 +0200 +++ b/graal/com.oracle.graal.alloc/src/com/oracle/graal/alloc/util/LocationMap.java Fri Jun 08 23:44:20 2012 +0200 @@ -57,7 +57,7 @@ public void forEachLocation(ValueProcedure proc) { for (int i = 0; i < locations.length; i++) { if (locations[i] != null) { - RiValue newValue = proc.doValue(locations[i], null, null); + Value newValue = proc.doValue(locations[i], null, null); assert newValue == null || asLocation(newValue).variable == locations[i].variable; locations[i] = (Location) newValue; } diff -r e18ba36bfebc -r bc647d8b0080 graal/com.oracle.graal.alloc/src/com/oracle/graal/alloc/util/LocationUtil.java --- a/graal/com.oracle.graal.alloc/src/com/oracle/graal/alloc/util/LocationUtil.java Fri Jun 08 23:41:02 2012 +0200 +++ b/graal/com.oracle.graal.alloc/src/com/oracle/graal/alloc/util/LocationUtil.java Fri Jun 08 23:44:20 2012 +0200 @@ -27,12 +27,12 @@ public class LocationUtil extends ValueUtil { - public static boolean isLocation(RiValue value) { + public static boolean isLocation(Value value) { assert value != null; return value instanceof Location; } - public static Location asLocation(RiValue value) { + public static Location asLocation(Value value) { assert value != null; return (Location) value; } diff -r e18ba36bfebc -r bc647d8b0080 graal/com.oracle.graal.alloc/src/com/oracle/graal/alloc/util/MoveResolver.java --- a/graal/com.oracle.graal.alloc/src/com/oracle/graal/alloc/util/MoveResolver.java Fri Jun 08 23:41:02 2012 +0200 +++ b/graal/com.oracle.graal.alloc/src/com/oracle/graal/alloc/util/MoveResolver.java Fri Jun 08 23:44:20 2012 +0200 @@ -35,8 +35,8 @@ private final LIR lir; private final FrameMap frameMap; private final int[] registersBlocked; - private final Map valuesBlocked; - private final List mappingFrom; + private final Map valuesBlocked; + private final List mappingFrom; private final List mappingTo; private final LIRInsertionBuffer insertionBuffer; private int insertPos; @@ -69,7 +69,7 @@ assert checkValid(); } - public void add(RiValue from, Location to) { + public void add(Value from, Location to) { assert checkValid(); assert isLocation(from) || isConstant(from); assert from != to; @@ -119,14 +119,14 @@ // Block all registers and stack slots that are used as inputs of a move. // When a register is blocked, no move to this register is emitted. // This is necessary for detecting cycles in moves. - for (RiValue from : mappingFrom) { + for (Value from : mappingFrom) { block(from); } while (mappingFrom.size() > 0) { boolean processed = false; for (int i = mappingFrom.size() - 1; i >= 0; i--) { - RiValue from = mappingFrom.get(i); + Value from = mappingFrom.get(i); Location to = mappingTo.get(i); if (safeToProcessMove(from, to)) { @@ -152,19 +152,19 @@ int exchangeOther = -1; for (int i = mappingFrom.size() - 1; i >= 0; i--) { - RiValue from = mappingFrom.get(i); + Value from = mappingFrom.get(i); Location to = mappingTo.get(i); assert !safeToProcessMove(from, to) : "would not be in this code otherwise"; if (isConstant(from)) { continue; } - RiValue fromLoc = asLocation(from).location; + Value fromLoc = asLocation(from).location; // Check if we can insert an exchange to save us from spilling. if (isRegister(fromLoc) && isRegister(to) && asRegister(fromLoc) != asRegister(to) && blockedCount(to) == 1) { for (int j = mappingFrom.size() - 1; j >= 0; j--) { - RiValue possibleOther = mappingFrom.get(j); + Value possibleOther = mappingFrom.get(j); if (isLocation(possibleOther)) { if (asLocation(possibleOther).location == to.location) { assert exchangeCandidate == -1 : "must not find twice because of blocked check above"; @@ -219,9 +219,9 @@ } } - private void block(RiValue value) { + private void block(Value value) { if (isLocation(value)) { - RiValue location = asLocation(value).location; + Value location = asLocation(value).location; if (isRegister(location)) { registersBlocked[asRegister(location).number]++; } else { @@ -231,10 +231,10 @@ } } - private void unblock(RiValue value) { + private void unblock(Value value) { if (isLocation(value)) { assert blockedCount(asLocation(value)) > 0; - RiValue location = asLocation(value).location; + Value location = asLocation(value).location; if (isRegister(location)) { registersBlocked[asRegister(location).number]--; } else { @@ -247,7 +247,7 @@ } private int blockedCount(Location value) { - RiValue location = asLocation(value).location; + Value location = asLocation(value).location; if (isRegister(location)) { return registersBlocked[asRegister(location).number]; } else { @@ -256,7 +256,7 @@ } } - private boolean safeToProcessMove(RiValue from, Location to) { + private boolean safeToProcessMove(Value from, Location to) { int count = blockedCount(to); return count == 0 || (count == 1 && isLocation(from) && asLocation(from).location == to.location); } @@ -268,17 +268,17 @@ throw GraalInternalError.unimplemented(); } - private void insertMove(RiValue src, Location dst) { + private void insertMove(Value src, Location dst) { if (isStackSlot(dst.location) && isLocation(src) && isStackSlot(asLocation(src).location)) { // Move between two stack slots. We need a temporary registers. If the allocator can give // us a free register, we need two moves: src->scratch, scratch->dst // If the allocator cannot give us a free register (it returns a Location in this case), // we need to spill the scratch register first, so we need four moves in total. - RiValue scratch = scratchRegister(dst.variable); + Value scratch = scratchRegister(dst.variable); Location scratchSaved = null; - RiValue scratchRegister = scratch; + Value scratchRegister = scratch; if (isLocation(scratch)) { scratchSaved = new Location(asLocation(scratch).variable, frameMap.allocateSpillSlot(scratch.kind)); insertMove(scratch, scratchSaved); @@ -305,7 +305,7 @@ * {@link CiRegisterValue}, the register can be overwritten without precautions. If the * returned value is a {@link Location}, it needs to be spilled and rescued itself. */ - protected abstract RiValue scratchRegister(Variable spilled); + protected abstract Value scratchRegister(Variable spilled); private boolean checkEmpty() { assert insertPos == -1; @@ -326,7 +326,7 @@ assert insertionBuffer.initialized() && insertPos != -1; for (int i = 0; i < mappingTo.size(); i++) { - RiValue from = mappingFrom.get(i); + Value from = mappingFrom.get(i); Location to = mappingTo.get(i); assert from.kind.stackKind() == to.kind; diff -r e18ba36bfebc -r bc647d8b0080 graal/com.oracle.graal.alloc/src/com/oracle/graal/alloc/util/RegisterVerifier.java --- a/graal/com.oracle.graal.alloc/src/com/oracle/graal/alloc/util/RegisterVerifier.java Fri Jun 08 23:41:02 2012 +0200 +++ b/graal/com.oracle.graal.alloc/src/com/oracle/graal/alloc/util/RegisterVerifier.java Fri Jun 08 23:44:20 2012 +0200 @@ -48,7 +48,7 @@ * value that is currently contained in there ({@link Location} for operands that were variables; {@link CiRegisterValue} or * {@link CiStackSlot} for operands that used fixed registers or stack slots). */ - private final Map[] blockStates; + private final Map[] blockStates; private void addToWorkList(Block block) { if (!workList.contains(block)) { @@ -56,15 +56,15 @@ } } - private Map stateFor(Block block) { + private Map stateFor(Block block) { return blockStates[block.getId()]; } - private void setStateFor(Block block, Map savedState) { + private void setStateFor(Block block, Map savedState) { blockStates[block.getId()] = savedState; } - private static Map copy(Map inputState) { + private static Map copy(Map inputState) { return new HashMap<>(inputState); } @@ -81,12 +81,12 @@ this.blockStates = new Map[lir.linearScanOrder().size()]; } - private Map curInputState; + private Map curInputState; private void verify(Block startBlock) { - ValueProcedure useProc = new ValueProcedure() { @Override public RiValue doValue(RiValue value, OperandMode mode, EnumSet flags) { return use(value, flags); } }; - ValueProcedure tempProc = new ValueProcedure() { @Override public RiValue doValue(RiValue value) { return temp(value); } }; - ValueProcedure outputProc = new ValueProcedure() { @Override public RiValue doValue(RiValue value) { return output(value); } }; + ValueProcedure useProc = new ValueProcedure() { @Override public Value doValue(Value value, OperandMode mode, EnumSet flags) { return use(value, flags); } }; + ValueProcedure tempProc = new ValueProcedure() { @Override public Value doValue(Value value) { return temp(value); } }; + ValueProcedure outputProc = new ValueProcedure() { @Override public Value doValue(Value value) { return output(value); } }; curInputState = new HashMap<>(); setStateFor(startBlock, curInputState); @@ -124,7 +124,7 @@ } private void processSuccessor(Block succ) { - Map savedState = stateFor(succ); + Map savedState = stateFor(succ); if (savedState == null) { // Block was not processed before, so set initial inputState. Debug.log(" successor %s: initial visit", succ); @@ -135,11 +135,11 @@ // This block was already processed before. // Check if new inputState is consistent with savedState. Debug.log(" successor %s: state present", succ); - Iterator> iter = savedState.entrySet().iterator(); + Iterator> iter = savedState.entrySet().iterator(); while (iter.hasNext()) { - Map.Entry entry = iter.next(); - RiValue savedValue = entry.getValue(); - RiValue inputValue = curInputState.get(entry.getKey()); + Map.Entry entry = iter.next(); + Value savedValue = entry.getValue(); + Value inputValue = curInputState.get(entry.getKey()); if (savedValue != inputValue) { // Current inputState and previous savedState assume a different value in this register. @@ -170,7 +170,7 @@ * include the kind of the value because we do not want to distinguish between the same register with * different kinds. */ - private Object key(RiValue value) { + private Object key(Value value) { if (isLocation(value)) { return key(asLocation(value).location); } else if (isRegister(value)) { @@ -182,13 +182,13 @@ } } - private boolean isIgnoredRegister(RiValue value) { + private boolean isIgnoredRegister(Value value) { return isRegister(value) && !frameMap.registerConfig.getAttributesMap()[asRegister(value).number].isAllocatable; } - private RiValue use(RiValue value, EnumSet flags) { - if (!isConstant(value) && value != RiValue.IllegalValue && !isIgnoredRegister(value)) { - RiValue actual = curInputState.get(key(value)); + private Value use(Value value, EnumSet flags) { + if (!isConstant(value) && value != Value.IllegalValue && !isIgnoredRegister(value)) { + Value actual = curInputState.get(key(value)); if (actual == null && flags.contains(OperandFlag.Uninitialized)) { // OK, since uninitialized values are allowed explicitly. } else if (value != actual) { @@ -200,16 +200,16 @@ return value; } - private RiValue temp(RiValue value) { - if (!isConstant(value) && value != RiValue.IllegalValue && !isIgnoredRegister(value)) { + private Value temp(Value value) { + if (!isConstant(value) && value != Value.IllegalValue && !isIgnoredRegister(value)) { Debug.log(" temp %s -> remove key %s", value, key(value)); curInputState.remove(key(value)); } return value; } - private RiValue output(RiValue value) { - if (value != RiValue.IllegalValue && !isIgnoredRegister(value)) { + private Value output(Value value) { + if (value != Value.IllegalValue && !isIgnoredRegister(value)) { Debug.log(" output %s -> set key %s", value, key(value)); curInputState.put(key(value), value); } diff -r e18ba36bfebc -r bc647d8b0080 graal/com.oracle.graal.api.code/src/com/oracle/graal/api/code/CiAddress.java --- a/graal/com.oracle.graal.api.code/src/com/oracle/graal/api/code/CiAddress.java Fri Jun 08 23:41:02 2012 +0200 +++ b/graal/com.oracle.graal.api.code/src/com/oracle/graal/api/code/CiAddress.java Fri Jun 08 23:44:20 2012 +0200 @@ -31,25 +31,25 @@ * a displacement and a scale. Note that the base and index registers may be a variable that will get a register assigned * later by the register allocator. */ -public final class CiAddress extends RiValue { +public final class CiAddress extends Value { private static final long serialVersionUID = -1003772042519945089L; /** * A sentinel value used as a place holder in an instruction stream for an address that will be patched. */ - public static final CiAddress Placeholder = new CiAddress(RiKind.Illegal, RiValue.IllegalValue); + public static final CiAddress Placeholder = new CiAddress(RiKind.Illegal, Value.IllegalValue); /** * Base register that defines the start of the address computation. - * If not present, is denoted by {@link RiValue#IllegalValue}. + * If not present, is denoted by {@link Value#IllegalValue}. */ - public RiValue base; + public Value base; /** * Index register, the value of which (possibly scaled by {@link #scale}) is added to {@link #base}. - * If not present, is denoted by {@link RiValue#IllegalValue}. + * If not present, is denoted by {@link Value#IllegalValue}. */ - public RiValue index; + public Value index; /** * Scaling factor for indexing, dependent on target operand size. @@ -66,7 +66,7 @@ * @param kind the kind of the value being addressed * @param base the base register */ - public CiAddress(RiKind kind, RiValue base) { + public CiAddress(RiKind kind, Value base) { this(kind, base, IllegalValue, Scale.Times1, 0); } @@ -76,7 +76,7 @@ * @param base the base register * @param displacement the displacement */ - public CiAddress(RiKind kind, RiValue base, int displacement) { + public CiAddress(RiKind kind, Value base, int displacement) { this(kind, base, IllegalValue, Scale.Times1, displacement); } @@ -89,7 +89,7 @@ * @param scale the scaling factor * @param displacement the displacement */ - public CiAddress(RiKind kind, RiValue base, RiValue index, Scale scale, int displacement) { + public CiAddress(RiKind kind, Value base, Value index, Scale scale, int displacement) { super(kind); this.base = base; this.index = index; diff -r e18ba36bfebc -r bc647d8b0080 graal/com.oracle.graal.api.code/src/com/oracle/graal/api/code/CiCallingConvention.java --- a/graal/com.oracle.graal.api.code/src/com/oracle/graal/api/code/CiCallingConvention.java Fri Jun 08 23:41:02 2012 +0200 +++ b/graal/com.oracle.graal.api.code/src/com/oracle/graal/api/code/CiCallingConvention.java Fri Jun 08 23:44:20 2012 +0200 @@ -78,9 +78,9 @@ /** * The locations in which the arguments are placed. This array ordered by argument index. */ - public final RiValue[] locations; + public final Value[] locations; - public CiCallingConvention(RiValue[] locations, int stackSize) { + public CiCallingConvention(Value[] locations, int stackSize) { this.locations = locations; this.stackSize = stackSize; assert verify(); @@ -90,7 +90,7 @@ public String toString() { StringBuilder result = new StringBuilder(); result.append("CallingConvention["); - for (RiValue op : locations) { + for (Value op : locations) { result.append(op.toString()).append(" "); } result.append("]"); @@ -99,7 +99,7 @@ private boolean verify() { for (int i = 0; i < locations.length; i++) { - RiValue location = locations[i]; + Value location = locations[i]; assert isStackSlot(location) || isRegister(location); } return true; diff -r e18ba36bfebc -r bc647d8b0080 graal/com.oracle.graal.api.code/src/com/oracle/graal/api/code/CiFrame.java --- a/graal/com.oracle.graal.api.code/src/com/oracle/graal/api/code/CiFrame.java Fri Jun 08 23:41:02 2012 +0200 +++ b/graal/com.oracle.graal.api.code/src/com/oracle/graal/api/code/CiFrame.java Fri Jun 08 23:44:20 2012 +0200 @@ -28,7 +28,7 @@ /** * Represents the Java bytecode frame state(s) at a given position - * including {@link RiValue locations} where to find the local variables, + * including {@link Value locations} where to find the local variables, * operand stack values and locked objects of the bytecode frame(s). */ public class CiFrame extends CiCodePos implements Serializable { @@ -48,7 +48,7 @@ * Note that the number of locals and the number of stack slots may be smaller than the * maximum number of locals and stack slots as specified in the compiled method. */ - public final RiValue[] values; + public final Value[] values; /** * The number of locals in the values array. @@ -87,7 +87,7 @@ * @param numStack the depth of the stack * @param numLocks the number of locked objects */ - public CiFrame(CiFrame caller, RiResolvedMethod method, int bci, boolean rethrowException, boolean duringCall, RiValue[] values, int numLocals, int numStack, int numLocks, long leafGraphId) { + public CiFrame(CiFrame caller, RiResolvedMethod method, int bci, boolean rethrowException, boolean duringCall, Value[] values, int numLocals, int numStack, int numLocks, long leafGraphId) { super(caller, method, bci); assert values != null; this.rethrowException = rethrowException; @@ -105,7 +105,7 @@ * @param i the local variable index * @return the value that can be used to reconstruct the local's current value */ - public RiValue getLocalValue(int i) { + public Value getLocalValue(int i) { return values[i]; } @@ -114,7 +114,7 @@ * @param i the stack index * @return the value that can be used to reconstruct the stack slot's current value */ - public RiValue getStackValue(int i) { + public Value getStackValue(int i) { return values[i + numLocals]; } @@ -123,7 +123,7 @@ * @param i the lock index * @return the value that can be used to reconstruct the lock's current value */ - public RiValue getLockValue(int i) { + public Value getLockValue(int i) { return values[i + numLocals + numStack]; } diff -r e18ba36bfebc -r bc647d8b0080 graal/com.oracle.graal.api.code/src/com/oracle/graal/api/code/CiMonitorValue.java --- a/graal/com.oracle.graal.api.code/src/com/oracle/graal/api/code/CiMonitorValue.java Fri Jun 08 23:41:02 2012 +0200 +++ b/graal/com.oracle.graal.api.code/src/com/oracle/graal/api/code/CiMonitorValue.java Fri Jun 08 23:44:20 2012 +0200 @@ -24,14 +24,14 @@ import com.oracle.graal.api.meta.*; -public final class CiMonitorValue extends RiValue { +public final class CiMonitorValue extends Value { private static final long serialVersionUID = 8241681800464483691L; - public RiValue owner; - public final RiValue lockData; + public Value owner; + public final Value lockData; public final boolean eliminated; - public CiMonitorValue(RiValue owner, RiValue lockData, boolean eliminated) { + public CiMonitorValue(Value owner, Value lockData, boolean eliminated) { super(RiKind.Illegal); this.owner = owner; this.lockData = lockData; diff -r e18ba36bfebc -r bc647d8b0080 graal/com.oracle.graal.api.code/src/com/oracle/graal/api/code/CiRegisterConfigImpl.java --- a/graal/com.oracle.graal.api.code/src/com/oracle/graal/api/code/CiRegisterConfigImpl.java Fri Jun 08 23:41:02 2012 +0200 +++ b/graal/com.oracle.graal.api.code/src/com/oracle/graal/api/code/CiRegisterConfigImpl.java Fri Jun 08 23:44:20 2012 +0200 @@ -189,7 +189,7 @@ * any stack slots to parameters. */ public CiCallingConvention getCallingConvention(Type type, RiKind[] parameters, CiTarget target, boolean stackOnly) { - RiValue[] locations = new RiValue[parameters.length]; + Value[] locations = new Value[parameters.length]; int currentGeneral = 0; int currentXMM = 0; diff -r e18ba36bfebc -r bc647d8b0080 graal/com.oracle.graal.api.code/src/com/oracle/graal/api/code/CiRegisterValue.java --- a/graal/com.oracle.graal.api.code/src/com/oracle/graal/api/code/CiRegisterValue.java Fri Jun 08 23:41:02 2012 +0200 +++ b/graal/com.oracle.graal.api.code/src/com/oracle/graal/api/code/CiRegisterValue.java Fri Jun 08 23:44:20 2012 +0200 @@ -29,7 +29,7 @@ * CiRegisterValue} for each ({@link CiRegister}, {@link RiKind}) pair. Use {@link CiRegister#asValue(RiKind)} to * retrieve the canonical {@link CiRegisterValue} instance for a given (register,kind) pair. */ -public final class CiRegisterValue extends RiValue { +public final class CiRegisterValue extends Value { private static final long serialVersionUID = 7999341472196897163L; /** diff -r e18ba36bfebc -r bc647d8b0080 graal/com.oracle.graal.api.code/src/com/oracle/graal/api/code/CiStackSlot.java --- a/graal/com.oracle.graal.api.code/src/com/oracle/graal/api/code/CiStackSlot.java Fri Jun 08 23:41:02 2012 +0200 +++ b/graal/com.oracle.graal.api.code/src/com/oracle/graal/api/code/CiStackSlot.java Fri Jun 08 23:44:20 2012 +0200 @@ -30,7 +30,7 @@ * Represents a compiler spill slot or an outgoing stack-based argument in a method's frame * or an incoming stack-based argument in a method's {@linkplain #inCallerFrame() caller's frame}. */ -public final class CiStackSlot extends RiValue { +public final class CiStackSlot extends Value { private static final long serialVersionUID = -7725071921307318433L; private final int offset; diff -r e18ba36bfebc -r bc647d8b0080 graal/com.oracle.graal.api.code/src/com/oracle/graal/api/code/CiValueUtil.java --- a/graal/com.oracle.graal.api.code/src/com/oracle/graal/api/code/CiValueUtil.java Fri Jun 08 23:41:02 2012 +0200 +++ b/graal/com.oracle.graal.api.code/src/com/oracle/graal/api/code/CiValueUtil.java Fri Jun 08 23:44:20 2012 +0200 @@ -25,106 +25,106 @@ import com.oracle.graal.api.meta.*; public class CiValueUtil { - public static boolean isIllegal(RiValue value) { + public static boolean isIllegal(Value value) { assert value != null; - return value == RiValue.IllegalValue; + return value == Value.IllegalValue; } - public static boolean isLegal(RiValue value) { + public static boolean isLegal(Value value) { return !isIllegal(value); } - public static boolean isVirtualObject(RiValue value) { + public static boolean isVirtualObject(Value value) { assert value != null; return value instanceof CiVirtualObject; } - public static CiVirtualObject asVirtualObject(RiValue value) { + public static CiVirtualObject asVirtualObject(Value value) { assert value != null; return (CiVirtualObject) value; } - public static boolean isConstant(RiValue value) { + public static boolean isConstant(Value value) { assert value != null; return value instanceof Constant; } - public static Constant asConstant(RiValue value) { + public static Constant asConstant(Value value) { assert value != null; return (Constant) value; } - public static boolean isStackSlot(RiValue value) { + public static boolean isStackSlot(Value value) { assert value != null; return value instanceof CiStackSlot; } - public static CiStackSlot asStackSlot(RiValue value) { + public static CiStackSlot asStackSlot(Value value) { assert value != null; return (CiStackSlot) value; } - public static boolean isAddress(RiValue value) { + public static boolean isAddress(Value value) { assert value != null; return value instanceof CiAddress; } - public static CiAddress asAddress(RiValue value) { + public static CiAddress asAddress(Value value) { assert value != null; return (CiAddress) value; } - public static boolean isRegister(RiValue value) { + public static boolean isRegister(Value value) { assert value != null; return value instanceof CiRegisterValue; } - public static CiRegister asRegister(RiValue value) { + public static CiRegister asRegister(Value value) { assert value != null; return ((CiRegisterValue) value).reg; } - public static CiRegister asIntReg(RiValue value) { + public static CiRegister asIntReg(Value value) { assert value.kind == RiKind.Int || value.kind == RiKind.Jsr; return asRegister(value); } - public static CiRegister asLongReg(RiValue value) { + public static CiRegister asLongReg(Value value) { assert value.kind == RiKind.Long : value.kind; return asRegister(value); } - public static CiRegister asObjectReg(RiValue value) { + public static CiRegister asObjectReg(Value value) { assert value.kind == RiKind.Object; return asRegister(value); } - public static CiRegister asFloatReg(RiValue value) { + public static CiRegister asFloatReg(Value value) { assert value.kind == RiKind.Float; return asRegister(value); } - public static CiRegister asDoubleReg(RiValue value) { + public static CiRegister asDoubleReg(Value value) { assert value.kind == RiKind.Double; return asRegister(value); } - public static boolean sameRegister(RiValue v1, RiValue v2) { + public static boolean sameRegister(Value v1, Value v2) { return isRegister(v1) && isRegister(v2) && asRegister(v1) == asRegister(v2); } - public static boolean sameRegister(RiValue v1, RiValue v2, RiValue v3) { + public static boolean sameRegister(Value v1, Value v2, Value v3) { return sameRegister(v1, v2) && sameRegister(v1, v3); } - public static boolean differentRegisters(RiValue v1, RiValue v2) { + public static boolean differentRegisters(Value v1, Value v2) { return !isRegister(v1) || !isRegister(v2) || asRegister(v1) != asRegister(v2); } - public static boolean differentRegisters(RiValue v1, RiValue v2, RiValue v3) { + public static boolean differentRegisters(Value v1, Value v2, Value v3) { return differentRegisters(v1, v2) && differentRegisters(v1, v3) && differentRegisters(v2, v3); } } diff -r e18ba36bfebc -r bc647d8b0080 graal/com.oracle.graal.api.code/src/com/oracle/graal/api/code/CiVirtualObject.java --- a/graal/com.oracle.graal.api.code/src/com/oracle/graal/api/code/CiVirtualObject.java Fri Jun 08 23:41:02 2012 +0200 +++ b/graal/com.oracle.graal.api.code/src/com/oracle/graal/api/code/CiVirtualObject.java Fri Jun 08 23:44:20 2012 +0200 @@ -28,11 +28,11 @@ * An instance of this class represents an object whose allocation was removed by escape analysis. The information stored in the {@link CiVirtualObject} is used during * deoptimization to recreate the object. */ -public final class CiVirtualObject extends RiValue { +public final class CiVirtualObject extends Value { private static final long serialVersionUID = -2907197776426346021L; private final RiType type; - private RiValue[] values; + private Value[] values; private final int id; /** @@ -43,11 +43,11 @@ * @param id a unique id that identifies the object within the debug information for one position in the compiled code. * @return a new CiVirtualObject instance. */ - public static CiVirtualObject get(RiType type, RiValue[] values, int id) { + public static CiVirtualObject get(RiType type, Value[] values, int id) { return new CiVirtualObject(type, values, id); } - private CiVirtualObject(RiType type, RiValue[] values, int id) { + private CiVirtualObject(RiType type, Value[] values, int id) { super(RiKind.Object); this.type = type; this.values = values; @@ -69,7 +69,7 @@ /** * @return an array containing all the values to be stored into the object when it is recreated. */ - public RiValue[] values() { + public Value[] values() { return values; } @@ -84,7 +84,7 @@ * Overwrites the current set of values with a new one. * @param values an array containing all the values to be stored into the object when it is recreated. */ - public void setValues(RiValue[] values) { + public void setValues(Value[] values) { this.values = values; } @@ -124,39 +124,39 @@ this.runtime = runtime; } - public CiVirtualObject constantProxy(RiKind kind, RiValue objectValue, RiValue primitiveValue) { + public CiVirtualObject constantProxy(RiKind kind, Value objectValue, Value primitiveValue) { Constant cKind = Constant.forObject(kind); // TODO: here the ordering is hard coded... we should query RiType.fields() and act accordingly - return new CiVirtualObject(runtime.getType(Constant.class), new RiValue[] {cKind, primitiveValue, RiValue.IllegalValue, objectValue}, nextId++); + return new CiVirtualObject(runtime.getType(Constant.class), new Value[] {cKind, primitiveValue, Value.IllegalValue, objectValue}, nextId++); } - public RiValue proxy(RiValue ciValue) { + public Value proxy(Value ciValue) { switch (ciValue.kind) { case Boolean: - return new CiVirtualObject(runtime.getType(Boolean.class), new RiValue[] {ciValue}, nextId++); + return new CiVirtualObject(runtime.getType(Boolean.class), new Value[] {ciValue}, nextId++); case Byte: - return new CiVirtualObject(runtime.getType(Byte.class), new RiValue[] {ciValue}, nextId++); + return new CiVirtualObject(runtime.getType(Byte.class), new Value[] {ciValue}, nextId++); case Char: - return new CiVirtualObject(runtime.getType(Character.class), new RiValue[] {ciValue}, nextId++); + return new CiVirtualObject(runtime.getType(Character.class), new Value[] {ciValue}, nextId++); case Double: - return new CiVirtualObject(runtime.getType(Double.class), new RiValue[] {ciValue, RiValue.IllegalValue}, nextId++); + return new CiVirtualObject(runtime.getType(Double.class), new Value[] {ciValue, Value.IllegalValue}, nextId++); case Float: - return new CiVirtualObject(runtime.getType(Float.class), new RiValue[] {ciValue}, nextId++); + return new CiVirtualObject(runtime.getType(Float.class), new Value[] {ciValue}, nextId++); case Int: - return new CiVirtualObject(runtime.getType(Integer.class), new RiValue[] {ciValue}, nextId++); + return new CiVirtualObject(runtime.getType(Integer.class), new Value[] {ciValue}, nextId++); case Long: - return new CiVirtualObject(runtime.getType(Long.class), new RiValue[] {ciValue, RiValue.IllegalValue}, nextId++); + return new CiVirtualObject(runtime.getType(Long.class), new Value[] {ciValue, Value.IllegalValue}, nextId++); case Object: return ciValue; case Short: - return new CiVirtualObject(runtime.getType(Short.class), new RiValue[] {ciValue}, nextId++); + return new CiVirtualObject(runtime.getType(Short.class), new Value[] {ciValue}, nextId++); default: assert false : ciValue.kind; return null; } } - public CiVirtualObject arrayProxy(RiType arrayType, RiValue[] values) { + public CiVirtualObject arrayProxy(RiType arrayType, Value[] values) { return new CiVirtualObject(arrayType, values, nextId++); } diff -r e18ba36bfebc -r bc647d8b0080 graal/com.oracle.graal.api.code/src/com/oracle/graal/api/code/package-info.java --- a/graal/com.oracle.graal.api.code/src/com/oracle/graal/api/code/package-info.java Fri Jun 08 23:41:02 2012 +0200 +++ b/graal/com.oracle.graal.api.code/src/com/oracle/graal/api/code/package-info.java Fri Jun 08 23:44:20 2012 +0200 @@ -33,8 +33,8 @@ * {@link com.oracle.graal.api.code.CiCodePos} and {@link com.oracle.graal.api.code.CiDebugInfo} provide detailed information to the * runtime to support debugging and deoptimization of the compiled code. *

- * The compiler manipulates {@link com.oracle.graal.api.meta.RiValue} instances that have a {@link com.oracle.graal.api.meta.RiKind}, and are - * immutable. A concrete {@link com.oracle.graal.api.meta.RiValue value} is one of the following subclasses: + * The compiler manipulates {@link com.oracle.graal.api.meta.Value} instances that have a {@link com.oracle.graal.api.meta.RiKind}, and are + * immutable. A concrete {@link com.oracle.graal.api.meta.Value value} is one of the following subclasses: *

    *
  • {@link com.oracle.graal.api.meta.Constant}: a constant value. *
  • {@link com.oracle.graal.api.code.CiRegisterValue}: a value stored in a {@linkplain com.oracle.graal.api.code.CiRegister target machine register}. diff -r e18ba36bfebc -r bc647d8b0080 graal/com.oracle.graal.api.meta/src/com/oracle/graal/api/meta/Constant.java --- a/graal/com.oracle.graal.api.meta/src/com/oracle/graal/api/meta/Constant.java Fri Jun 08 23:41:02 2012 +0200 +++ b/graal/com.oracle.graal.api.meta/src/com/oracle/graal/api/meta/Constant.java Fri Jun 08 23:44:20 2012 +0200 @@ -27,7 +27,7 @@ * within the compiler and across the compiler/runtime interface. Exports a set of {@code CiConstant} * instances that represent frequently used constant values, such as {@link #ZERO}. */ -public final class Constant extends RiValue { +public final class Constant extends Value { private static final long serialVersionUID = -6355452536852663986L; private static final Constant[] INT_CONSTANT_CACHE = new Constant[100]; diff -r e18ba36bfebc -r bc647d8b0080 graal/com.oracle.graal.api.meta/src/com/oracle/graal/api/meta/RiValue.java --- a/graal/com.oracle.graal.api.meta/src/com/oracle/graal/api/meta/RiValue.java Fri Jun 08 23:41:02 2012 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,60 +0,0 @@ -/* - * Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ -package com.oracle.graal.api.meta; - -import java.io.*; - -/** - * Abstract base class for values manipulated by the compiler. All values have a {@linkplain RiKind kind} and are immutable. - */ -public abstract class RiValue implements Serializable { - private static final long serialVersionUID = -6909397188697766469L; - - @SuppressWarnings("serial") - public static RiValue IllegalValue = new RiValue(RiKind.Illegal) { - @Override - public String toString() { - return "-"; - } - }; - - /** - * The kind of this value. - */ - public final RiKind kind; - - /** - * Initializes a new value of the specified kind. - * @param kind the kind - */ - protected RiValue(RiKind kind) { - this.kind = kind; - } - - /** - * String representation of the kind, which should be the end of all {@link #toString()} implementation of subclasses. - */ - protected final String kindSuffix() { - return "|" + kind.typeChar; - } -} diff -r e18ba36bfebc -r bc647d8b0080 graal/com.oracle.graal.api.meta/src/com/oracle/graal/api/meta/Value.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/graal/com.oracle.graal.api.meta/src/com/oracle/graal/api/meta/Value.java Fri Jun 08 23:44:20 2012 +0200 @@ -0,0 +1,60 @@ +/* + * Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ +package com.oracle.graal.api.meta; + +import java.io.*; + +/** + * Abstract base class for values manipulated by the compiler. All values have a {@linkplain RiKind kind} and are immutable. + */ +public abstract class Value implements Serializable { + private static final long serialVersionUID = -6909397188697766469L; + + @SuppressWarnings("serial") + public static Value IllegalValue = new Value(RiKind.Illegal) { + @Override + public String toString() { + return "-"; + } + }; + + /** + * The kind of this value. + */ + public final RiKind kind; + + /** + * Initializes a new value of the specified kind. + * @param kind the kind + */ + protected Value(RiKind kind) { + this.kind = kind; + } + + /** + * String representation of the kind, which should be the end of all {@link #toString()} implementation of subclasses. + */ + protected final String kindSuffix() { + return "|" + kind.typeChar; + } +} diff -r e18ba36bfebc -r bc647d8b0080 graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/alloc/Interval.java --- a/graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/alloc/Interval.java Fri Jun 08 23:41:02 2012 +0200 +++ b/graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/alloc/Interval.java Fri Jun 08 23:44:20 2012 +0200 @@ -402,17 +402,17 @@ /** * The {@linkplain CiRegisterValue register} or {@linkplain Variable variable} for this interval prior to register allocation. */ - public final RiValue operand; + public final Value operand; /** - * The {@linkplain OperandPool#operandNumber(RiValue) operand number} for this interval's {@linkplain #operand operand}. + * The {@linkplain OperandPool#operandNumber(Value) operand number} for this interval's {@linkplain #operand operand}. */ public final int operandNumber; /** * The {@linkplain CiRegisterValue register}, {@linkplain CiStackSlot spill slot} or {@linkplain CiAddress address} assigned to this interval. */ - private RiValue location; + private Value location; /** * The stack slot to which all splits of this interval are spilled if necessary. @@ -487,7 +487,7 @@ */ private Interval locationHint; - void assignLocation(RiValue newLocation) { + void assignLocation(Value newLocation) { if (isRegister(newLocation)) { assert this.location == null : "cannot re-assign location for " + this; if (newLocation.kind == RiKind.Illegal && kind != RiKind.Illegal) { @@ -506,7 +506,7 @@ /** * Gets the {@linkplain CiRegisterValue register}, {@linkplain CiStackSlot spill slot} or {@linkplain CiAddress address} assigned to this interval. */ - public RiValue location() { + public Value location() { return location; } @@ -659,9 +659,9 @@ /** * Sentinel interval to denote the end of an interval list. */ - static final Interval EndMarker = new Interval(RiValue.IllegalValue, -1); + static final Interval EndMarker = new Interval(Value.IllegalValue, -1); - Interval(RiValue operand, int operandNumber) { + Interval(Value operand, int operandNumber) { assert operand != null; this.operand = operand; this.operandNumber = operandNumber; diff -r e18ba36bfebc -r bc647d8b0080 graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/alloc/LinearScan.java --- a/graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/alloc/LinearScan.java Fri Jun 08 23:41:02 2012 +0200 +++ b/graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/alloc/LinearScan.java Fri Jun 08 23:44:20 2012 +0200 @@ -64,7 +64,7 @@ * Bit map specifying which {@linkplain OperandPool operands} are live upon entry to this block. * These are values used in this block or any of its successors where such value are not defined * in this block. - * The bit index of an operand is its {@linkplain OperandPool#operandNumber(com.oracle.max.cri.ri.RiValue.ci.CiValue) operand number}. + * The bit index of an operand is its {@linkplain OperandPool#operandNumber(com.oracle.max.cri.Value.RiValue.ci.CiValue) operand number}. */ public BitMap liveIn; @@ -72,20 +72,20 @@ * Bit map specifying which {@linkplain OperandPool operands} are live upon exit from this block. * These are values used in a successor block that are either defined in this block or were live * upon entry to this block. - * The bit index of an operand is its {@linkplain OperandPool#operandNumber(com.oracle.max.cri.ri.RiValue.ci.CiValue) operand number}. + * The bit index of an operand is its {@linkplain OperandPool#operandNumber(com.oracle.max.cri.Value.RiValue.ci.CiValue) operand number}. */ public BitMap liveOut; /** * Bit map specifying which {@linkplain OperandPool operands} are used (before being defined) in this block. * That is, these are the values that are live upon entry to the block. - * The bit index of an operand is its {@linkplain OperandPool#operandNumber(com.oracle.max.cri.ri.RiValue.ci.CiValue) operand number}. + * The bit index of an operand is its {@linkplain OperandPool#operandNumber(com.oracle.max.cri.Value.RiValue.ci.CiValue) operand number}. */ public BitMap liveGen; /** * Bit map specifying which {@linkplain OperandPool operands} are defined/overwritten in this block. - * The bit index of an operand is its {@linkplain OperandPool#operandNumber(com.oracle.max.cri.ri.RiValue.ci.CiValue) operand number}. + * The bit index of an operand is its {@linkplain OperandPool#operandNumber(com.oracle.max.cri.Value.RiValue.ci.CiValue) operand number}. */ public BitMap liveKill; } @@ -98,7 +98,7 @@ final Block[] sortedBlocks; /** - * Map from {@linkplain #operandNumber(RiValue) operand numbers} to intervals. + * Map from {@linkplain #operandNumber(Value) operand numbers} to intervals. */ Interval[] intervals; @@ -137,14 +137,14 @@ BitMap2D intervalInLoop; /** - * The variable operands allocated from this pool. The {@linkplain #operandNumber(RiValue) number} + * The variable operands allocated from this pool. The {@linkplain #operandNumber(Value) number} * of the first variable operand in this pool is one greater than the number of the last * register operand in the pool. */ private final ArrayList variables; /** - * The {@linkplain #operandNumber(RiValue) number} of the first variable operand + * The {@linkplain #operandNumber(Value) number} of the first variable operand * {@linkplain #newVariable(RiKind) allocated} from this pool. */ private final int firstVariableNumber; @@ -165,7 +165,7 @@ this.blockData = new BlockMap<>(ir.cfg); } - public static boolean isVariableOrRegister(RiValue value) { + public static boolean isVariableOrRegister(Value value) { return isVariable(value) || isRegister(value); } @@ -175,7 +175,7 @@ * {@linkplain Variable variables} and {@linkplain CiRegisterValue registers} being processed by this * allocator. */ - private int operandNumber(RiValue operand) { + private int operandNumber(Value operand) { if (isRegister(operand)) { int number = asRegister(operand).number; assert number < firstVariableNumber; @@ -188,7 +188,7 @@ /** * Gets the operand denoted by a given operand number. */ - private RiValue operandFor(int operandNumber) { + private Value operandFor(int operandNumber) { if (operandNumber < firstVariableNumber) { assert operandNumber >= 0; return registers[operandNumber].asValue(); @@ -260,7 +260,7 @@ * @param operand the operand for the interval * @return the created interval */ - Interval createInterval(RiValue operand) { + Interval createInterval(Value operand) { assert isProcessed(operand); assert isLegal(operand); int operandNumber = operandNumber(operand); @@ -322,7 +322,7 @@ return intervalInLoop.at(interval, loop); } - Interval intervalFor(RiValue operand) { + Interval intervalFor(Value operand) { int operandNumber = operandNumber(operand); assert operandNumber < intervalsSize; return intervals[operandNumber]; @@ -524,8 +524,8 @@ insertionBuffer.init(block.lir); } - RiValue fromLocation = interval.location(); - RiValue toLocation = canonicalSpillOpr(interval); + Value fromLocation = interval.location(); + Value toLocation = canonicalSpillOpr(interval); assert isRegister(fromLocation) : "from operand must be a register but is: " + fromLocation + " toLocation=" + toLocation + " spillState=" + interval.spillState(); assert isStackSlot(toLocation) : "to operand must be a stack slot"; @@ -580,7 +580,7 @@ void numberInstructions() { ValueProcedure setVariableProc = new ValueProcedure() { @Override - public RiValue doValue(RiValue value) { + public Value doValue(Value value) { if (isVariable(value)) { int variableIdx = asVariable(value).index; while (variables.size() <= variableIdx) { @@ -664,7 +664,7 @@ ValueProcedure useProc = new ValueProcedure() { @Override - protected RiValue doValue(RiValue operand) { + protected Value doValue(Value operand) { if (isVariable(operand)) { int operandNum = operandNumber(operand); if (!liveKill.get(operandNum)) { @@ -686,7 +686,7 @@ }; ValueProcedure stateProc = new ValueProcedure() { @Override - public RiValue doValue(RiValue operand) { + public Value doValue(Value operand) { int operandNum = operandNumber(operand); if (!liveKill.get(operandNum)) { liveGen.set(operandNum); @@ -699,7 +699,7 @@ }; ValueProcedure defProc = new ValueProcedure() { @Override - public RiValue doValue(RiValue operand) { + public Value doValue(Value operand) { if (isVariable(operand)) { int varNum = operandNumber(operand); liveKill.set(varNum); @@ -738,7 +738,7 @@ } // end of block iteration } - private void verifyTemp(BitMap liveKill, RiValue operand) { + private void verifyTemp(BitMap liveKill, Value operand) { // fixed intervals are never live at block boundaries, so // they need not be processed in live sets // process them only in debug mode so that this can be checked @@ -749,7 +749,7 @@ } } - private void verifyInput(Block block, BitMap liveKill, RiValue operand) { + private void verifyInput(Block block, BitMap liveKill, Value operand) { // fixed intervals are never live at block boundaries, so // they need not be processed in live sets. // this is checked by these assertions to be sure about it. @@ -857,7 +857,7 @@ // print some additional information to simplify debugging for (int operandNum = 0; operandNum < blockData.get(ir.cfg.getStartBlock()).liveIn.size(); operandNum++) { if (blockData.get(ir.cfg.getStartBlock()).liveIn.get(operandNum)) { - RiValue operand = operandFor(operandNum); + Value operand = operandFor(operandNum); TTY.println(" var %d; operand=%s; node=%s", operandNum, operand.toString(), gen.valueForOperand(operand)); for (int j = 0; j < numBlocks; j++) { @@ -870,7 +870,7 @@ if (info != null) { info.forEachState(new ValueProcedure() { @Override - public RiValue doValue(RiValue liveStateOperand) { + public Value doValue(Value liveStateOperand) { TTY.println(" operand=" + liveStateOperand); return liveStateOperand; } @@ -910,7 +910,7 @@ TTY.println(blockData.get(block).liveOut.toString()); } - void addUse(RiValue operand, int from, int to, RegisterPriority registerPriority, RiKind kind) { + void addUse(Value operand, int from, int to, RegisterPriority registerPriority, RiKind kind) { if (!isProcessed(operand)) { return; } @@ -933,7 +933,7 @@ interval.addUsePos(to & ~1, registerPriority); } - void addTemp(RiValue operand, int tempPos, RegisterPriority registerPriority, RiKind kind) { + void addTemp(Value operand, int tempPos, RegisterPriority registerPriority, RiKind kind) { if (!isProcessed(operand)) { return; } @@ -953,11 +953,11 @@ interval.addUsePos(tempPos, registerPriority); } - boolean isProcessed(RiValue operand) { + boolean isProcessed(Value operand) { return !isRegister(operand) || attributes(asRegister(operand)).isAllocatable; } - void addDef(RiValue operand, int defPos, RegisterPriority registerPriority, RiKind kind) { + void addDef(Value operand, int defPos, RegisterPriority registerPriority, RiKind kind) { if (!isProcessed(operand)) { return; } @@ -1066,12 +1066,12 @@ } } - void addRegisterHint(final LIRInstruction op, final RiValue targetValue, OperandMode mode, EnumSet flags) { + void addRegisterHint(final LIRInstruction op, final Value targetValue, OperandMode mode, EnumSet flags) { if (flags.contains(OperandFlag.RegisterHint) && isVariableOrRegister(targetValue)) { op.forEachRegisterHint(targetValue, mode, new ValueProcedure() { @Override - protected RiValue doValue(RiValue registerHint) { + protected Value doValue(Value registerHint) { if (isVariableOrRegister(registerHint)) { Interval from = intervalFor(registerHint); Interval to = intervalFor(targetValue); @@ -1110,7 +1110,7 @@ BitMap live = blockData.get(block).liveOut; for (int operandNum = live.nextSetBit(0); operandNum >= 0; operandNum = live.nextSetBit(operandNum + 1)) { assert live.get(operandNum) : "should not stop here otherwise"; - RiValue operand = operandFor(operandNum); + Value operand = operandFor(operandNum); if (GraalOptions.TraceLinearScanLevel >= 2) { TTY.println("live in %s to %d", operand, blockTo + 2); } @@ -1148,7 +1148,7 @@ op.forEachOutput(new ValueProcedure() { @Override - public RiValue doValue(RiValue operand, OperandMode mode, EnumSet flags) { + public Value doValue(Value operand, OperandMode mode, EnumSet flags) { if (isVariableOrRegister(operand)) { addDef(operand, opId, registerPriorityOfOutputOperand(op), operand.kind.stackKind()); addRegisterHint(op, operand, mode, flags); @@ -1158,7 +1158,7 @@ }); op.forEachTemp(new ValueProcedure() { @Override - public RiValue doValue(RiValue operand, OperandMode mode, EnumSet flags) { + public Value doValue(Value operand, OperandMode mode, EnumSet flags) { if (isVariableOrRegister(operand)) { addTemp(operand, opId, RegisterPriority.MustHaveRegister, operand.kind.stackKind()); addRegisterHint(op, operand, mode, flags); @@ -1168,7 +1168,7 @@ }); op.forEachAlive(new ValueProcedure() { @Override - public RiValue doValue(RiValue operand, OperandMode mode, EnumSet flags) { + public Value doValue(Value operand, OperandMode mode, EnumSet flags) { if (isVariableOrRegister(operand)) { RegisterPriority p = registerPriorityOfInputOperand(flags); addUse(operand, blockFrom, opId + 1, p, operand.kind.stackKind()); @@ -1179,7 +1179,7 @@ }); op.forEachInput(new ValueProcedure() { @Override - public RiValue doValue(RiValue operand, OperandMode mode, EnumSet flags) { + public Value doValue(Value operand, OperandMode mode, EnumSet flags) { if (isVariableOrRegister(operand)) { RegisterPriority p = registerPriorityOfInputOperand(flags); addUse(operand, blockFrom, opId, p, operand.kind.stackKind()); @@ -1195,7 +1195,7 @@ // to a call site, the value would be in a register at the call otherwise) op.forEachState(new ValueProcedure() { @Override - public RiValue doValue(RiValue operand) { + public Value doValue(Value operand) { addUse(operand, blockFrom, opId + 1, RegisterPriority.None, operand.kind.stackKind()); return operand; } @@ -1396,21 +1396,21 @@ throw new CiBailout("LinearScan: interval is null"); } - Interval intervalAtBlockBegin(Block block, RiValue operand) { + Interval intervalAtBlockBegin(Block block, Value operand) { assert isVariable(operand) : "register number out of bounds"; assert intervalFor(operand) != null : "no interval found"; return splitChildAtOpId(intervalFor(operand), block.getFirstLirInstructionId(), LIRInstruction.OperandMode.Output); } - Interval intervalAtBlockEnd(Block block, RiValue operand) { + Interval intervalAtBlockEnd(Block block, Value operand) { assert isVariable(operand) : "register number out of bounds"; assert intervalFor(operand) != null : "no interval found"; return splitChildAtOpId(intervalFor(operand), block.getLastLirInstructionId() + 1, LIRInstruction.OperandMode.Output); } - Interval intervalAtOpId(RiValue operand, int opId) { + Interval intervalAtOpId(Value operand, int opId) { assert isVariable(operand) : "register number out of bounds"; assert intervalFor(operand) != null : "no interval found"; @@ -1428,7 +1428,7 @@ assert operandNum < numOperands : "live information set for not exisiting interval"; assert blockData.get(fromBlock).liveOut.get(operandNum) && blockData.get(toBlock).liveIn.get(operandNum) : "interval not live at this edge"; - RiValue liveOperand = operandFor(operandNum); + Value liveOperand = operandFor(operandNum); Interval fromInterval = intervalAtBlockEnd(fromBlock, liveOperand); Interval toInterval = intervalAtBlockBegin(toBlock, liveOperand); @@ -1549,7 +1549,7 @@ // * Phase 7: assign register numbers back to LIR // (includes computation of debug information and oop maps) - boolean verifyAssignedLocation(Interval interval, RiValue location) { + boolean verifyAssignedLocation(Interval interval, Value location) { RiKind kind = interval.kind(); assert isRegister(location) || isStackSlot(location); @@ -1605,7 +1605,7 @@ * @param mode the usage mode for {@code operand} by the instruction * @return the location assigned for the operand */ - private RiValue colorLirOperand(Variable operand, int opId, OperandMode mode) { + private Value colorLirOperand(Variable operand, int opId, OperandMode mode) { Interval interval = intervalFor(operand); assert interval != null : "interval must exist"; @@ -1643,7 +1643,7 @@ // intervals that have no oops inside need not to be processed. // to ensure a walking until the last instruction id, add a dummy interval // with a high operation id - nonOopIntervals = new Interval(RiValue.IllegalValue, -1); + nonOopIntervals = new Interval(Value.IllegalValue, -1); nonOopIntervals.addRange(Integer.MAX_VALUE - 2, Integer.MAX_VALUE - 1); return new IntervalWalker(this, oopIntervals, nonOopIntervals); @@ -1661,7 +1661,7 @@ // Iterate through active intervals for (Interval interval = iw.activeLists.get(RegisterBinding.Fixed); interval != Interval.EndMarker; interval = interval.next) { - RiValue operand = interval.operand; + Value operand = interval.operand; assert interval.currentFrom() <= op.id() && op.id() <= interval.currentTo() : "interval should not be active otherwise"; assert isVariable(interval.operand) : "fixed interval found"; @@ -1690,7 +1690,7 @@ } } - private boolean isCallerSave(RiValue operand) { + private boolean isCallerSave(Value operand) { return attributes(asRegister(operand)).isCallerSave; } @@ -1715,7 +1715,7 @@ info.forEachState(new ValueProcedure() { @Override - public RiValue doValue(RiValue operand) { + public Value doValue(Value operand) { int tempOpId = op.id(); OperandMode mode = OperandMode.Input; Block block = blockForId(tempOpId); @@ -1737,7 +1737,7 @@ // Get current location of operand // The operand must be live because debug information is considered when building the intervals // if the interval is not live, colorLirOperand will cause an assert on failure - RiValue result = colorLirOperand((Variable) operand, tempOpId, mode); + Value result = colorLirOperand((Variable) operand, tempOpId, mode); assert !hasCall(tempOpId) || isStackSlot(result) || !isCallerSave(result) : "cannot have caller-save register operands at calls"; return result; } @@ -1759,7 +1759,7 @@ ValueProcedure assignProc = new ValueProcedure() { @Override - public RiValue doValue(RiValue operand, OperandMode mode, EnumSet flags) { + public Value doValue(Value operand, OperandMode mode, EnumSet flags) { if (isVariable(operand)) { return colorLirOperand((Variable) operand, op.id(), mode); } @@ -1998,8 +1998,8 @@ if (i2.from() == 1 && i2.to() == 2) { continue; } - RiValue l1 = i1.location(); - RiValue l2 = i2.location(); + Value l1 = i1.location(); + Value l2 = i2.location(); if (i1.intersects(i2) && (l1.equals(l2))) { if (GraalOptions.DetailedAsserts) { TTY.println("Intervals %d and %d overlap and have the same register assigned", i1.operandNumber, i2.operandNumber); @@ -2017,7 +2017,7 @@ Interval curInterval; @Override - protected RiValue doValue(RiValue operand) { + protected Value doValue(Value operand) { if (isRegister(operand)) { if (intervalFor(operand) == curInterval) { ok = true; @@ -2035,7 +2035,7 @@ fixedIntervals = createUnhandledLists(IS_PRECOLORED_INTERVAL, null).first; // to ensure a walking until the last instruction id, add a dummy interval // with a high operation id - otherIntervals = new Interval(RiValue.IllegalValue, -1); + otherIntervals = new Interval(Value.IllegalValue, -1); otherIntervals.addRange(Integer.MAX_VALUE - 2, Integer.MAX_VALUE - 1); IntervalWalker iw = new IntervalWalker(this, fixedIntervals, otherIntervals); @@ -2088,7 +2088,7 @@ if (GraalOptions.TraceLinearScanLevel >= 4) { TTY.println("checking interval %d of block B%d", operandNum, block.getId()); } - RiValue operand = operandFor(operandNum); + Value operand = operandFor(operandNum); assert isVariable(operand) : "value must have variable operand"; // TKR assert value.asConstant() == null || value.isPinned() : // "only pinned constants can be alive accross block boundaries"; diff -r e18ba36bfebc -r bc647d8b0080 graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/alloc/LinearScanWalker.java --- a/graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/alloc/LinearScanWalker.java Fri Jun 08 23:41:02 2012 +0200 +++ b/graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/alloc/LinearScanWalker.java Fri Jun 08 23:44:20 2012 +0200 @@ -95,7 +95,7 @@ } void excludeFromUse(Interval i) { - RiValue location = i.location(); + Value location = i.location(); int i1 = asRegister(location).number; if (i1 >= availableRegs[0].number && i1 <= availableRegs[availableRegs.length - 1].number) { usePos[i1] = 0; @@ -675,7 +675,7 @@ return true; } - CiRegister findLockedRegister(int regNeededUntil, int intervalTo, RiValue ignoreReg, boolean[] needSplit) { + CiRegister findLockedRegister(int regNeededUntil, int intervalTo, Value ignoreReg, boolean[] needSplit) { int maxReg = -1; CiRegister ignore = isRegister(ignoreReg) ? asRegister(ignoreReg) : null; @@ -906,7 +906,7 @@ TTY.println(" splitParent: %s, insertMoveWhenActivated: %b", interval.splitParent().operandNumber, interval.insertMoveWhenActivated()); } - final RiValue operand = interval.operand; + final Value operand = interval.operand; if (interval.location() != null && isStackSlot(interval.location())) { // activating an interval that has a stack slot assigned . split it at first use position // used for method parameters diff -r e18ba36bfebc -r bc647d8b0080 graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/alloc/MoveResolver.java --- a/graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/alloc/MoveResolver.java Fri Jun 08 23:41:02 2012 +0200 +++ b/graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/alloc/MoveResolver.java Fri Jun 08 23:44:20 2012 +0200 @@ -42,7 +42,7 @@ private LIRInsertionBuffer insertionBuffer; // buffer where moves are inserted private final List mappingFrom; - private final List mappingFromOpr; + private final List mappingFromOpr; private final List mappingTo; private boolean multipleReadsAllowed; private final int[] registerBlocked; @@ -107,7 +107,7 @@ } } - HashSet usedRegs = new HashSet<>(); + HashSet usedRegs = new HashSet<>(); if (!multipleReadsAllowed) { for (i = 0; i < mappingFrom.size(); i++) { Interval interval = mappingFrom.get(i); @@ -142,7 +142,7 @@ // mark assignedReg and assignedRegHi of the interval as blocked private void blockRegisters(Interval interval) { - RiValue location = interval.location(); + Value location = interval.location(); if (isRegister(location)) { int reg = asRegister(location).number; assert multipleReadsAllowed || registerBlocked(reg) == 0 : "register already marked as used"; @@ -152,7 +152,7 @@ // mark assignedReg and assignedRegHi of the interval as unblocked private void unblockRegisters(Interval interval) { - RiValue location = interval.location(); + Value location = interval.location(); if (isRegister(location)) { int reg = asRegister(location).number; assert registerBlocked(reg) > 0 : "register already marked as unused"; @@ -165,9 +165,9 @@ * or is only blocked by {@code from}. */ private boolean safeToProcessMove(Interval from, Interval to) { - RiValue fromReg = from != null ? from.location() : null; + Value fromReg = from != null ? from.location() : null; - RiValue reg = to.location(); + Value reg = to.location(); if (isRegister(reg)) { if (registerBlocked(asRegister(reg).number) > 1 || (registerBlocked(asRegister(reg).number) == 1 && reg != fromReg)) { return false; @@ -196,8 +196,8 @@ assert fromInterval.kind() == toInterval.kind() : "move between different types"; assert insertIdx != -1 : "must setup insert position first"; - RiValue fromOpr = fromInterval.operand; - RiValue toOpr = toInterval.operand; + Value fromOpr = fromInterval.operand; + Value toOpr = toInterval.operand; insertionBuffer.append(insertIdx, allocator.ir.spillMoveFactory.createMove(toOpr, fromOpr)); @@ -206,11 +206,11 @@ } } - private void insertMove(RiValue fromOpr, Interval toInterval) { + private void insertMove(Value fromOpr, Interval toInterval) { assert fromOpr.kind == toInterval.kind() : "move between different types"; assert insertIdx != -1 : "must setup insert position first"; - RiValue toOpr = toInterval.operand; + Value toOpr = toInterval.operand; insertionBuffer.append(insertIdx, allocator.ir.spillMoveFactory.createMove(toOpr, fromOpr)); if (GraalOptions.TraceLinearScanLevel >= 4) { @@ -333,11 +333,11 @@ assert fromInterval.operand != toInterval.operand : "from and to interval equal: " + fromInterval; assert fromInterval.kind() == toInterval.kind(); mappingFrom.add(fromInterval); - mappingFromOpr.add(RiValue.IllegalValue); + mappingFromOpr.add(Value.IllegalValue); mappingTo.add(toInterval); } - void addMapping(RiValue fromOpr, Interval toInterval) { + void addMapping(Value fromOpr, Interval toInterval) { if (GraalOptions.TraceLinearScanLevel >= 4) { TTY.println("MoveResolver: adding mapping from %s to %d (%s)", fromOpr, toInterval.operandNumber, toInterval.location()); } diff -r e18ba36bfebc -r bc647d8b0080 graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/alloc/RegisterVerifier.java --- a/graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/alloc/RegisterVerifier.java Fri Jun 08 23:41:02 2012 +0200 +++ b/graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/alloc/RegisterVerifier.java Fri Jun 08 23:44:20 2012 +0200 @@ -45,7 +45,7 @@ ArrayMap savedStates; // saved information of previous check // simplified access to methods of LinearScan - Interval intervalAt(RiValue operand) { + Interval intervalAt(Value operand) { return allocator.intervalFor(operand); } @@ -178,7 +178,7 @@ return inputState.clone(); } - static void statePut(Interval[] inputState, RiValue location, Interval interval) { + static void statePut(Interval[] inputState, Value location, Interval interval) { if (location != null && isRegister(location)) { CiRegister reg = asRegister(location); int regNum = reg.number; @@ -196,7 +196,7 @@ } } - static boolean checkState(Interval[] inputState, RiValue reg, Interval interval) { + static boolean checkState(Interval[] inputState, Value reg, Interval interval) { if (reg != null && isRegister(reg)) { if (inputState[asRegister(reg).number] != interval) { throw new GraalInternalError("!! Error in register allocation: register %s does not contain interval %s but interval %s", reg, interval.operand, inputState[asRegister(reg).number]); @@ -216,7 +216,7 @@ ValueProcedure useProc = new ValueProcedure() { @Override - public RiValue doValue(RiValue operand, OperandMode mode, EnumSet flags) { + public Value doValue(Value operand, OperandMode mode, EnumSet flags) { if (LinearScan.isVariableOrRegister(operand) && allocator.isProcessed(operand)) { Interval interval = intervalAt(operand); if (op.id() != -1) { @@ -231,7 +231,7 @@ ValueProcedure defProc = new ValueProcedure() { @Override - public RiValue doValue(RiValue operand, OperandMode mode, EnumSet flags) { + public Value doValue(Value operand, OperandMode mode, EnumSet flags) { if (LinearScan.isVariableOrRegister(operand) && allocator.isProcessed(operand)) { Interval interval = intervalAt(operand); if (op.id() != -1) { diff -r e18ba36bfebc -r bc647d8b0080 graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/gen/DebugInfoBuilder.java --- a/graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/gen/DebugInfoBuilder.java Fri Jun 08 23:41:02 2012 +0200 +++ b/graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/gen/DebugInfoBuilder.java Fri Jun 08 23:44:20 2012 +0200 @@ -36,9 +36,9 @@ import com.oracle.graal.nodes.virtual.*; public class DebugInfoBuilder { - private final NodeMap nodeOperands; + private final NodeMap nodeOperands; - public DebugInfoBuilder(NodeMap nodeOperands) { + public DebugInfoBuilder(NodeMap nodeOperands) { this.nodeOperands = nodeOperands; } @@ -81,9 +81,9 @@ VirtualObjectNode vobj = entry.getKey(); if (vobj instanceof BoxedVirtualObjectNode) { BoxedVirtualObjectNode boxedVirtualObjectNode = (BoxedVirtualObjectNode) vobj; - entry.getValue().setValues(new RiValue[]{toCiValue(boxedVirtualObjectNode.getUnboxedValue())}); + entry.getValue().setValues(new Value[]{toCiValue(boxedVirtualObjectNode.getUnboxedValue())}); } else { - RiValue[] values = new RiValue[vobj.fieldsCount()]; + Value[] values = new Value[vobj.fieldsCount()]; entry.getValue().setValues(values); if (values.length > 0) { changed = true; @@ -119,7 +119,7 @@ int numStack = state.stackSize(); int numLocks = (locks != null && locks.callerState == state.outerFrameState()) ? locks.stateDepth + 1 : 0; - RiValue[] values = new RiValue[numLocals + numStack + numLocks]; + Value[] values = new Value[numLocals + numStack + numLocks]; for (int i = 0; i < numLocals; i++) { values[i] = toCiValue(state.localAt(i)); } @@ -131,8 +131,8 @@ for (int i = numLocks - 1; i >= 0; i--) { assert locks != null && nextLock.callerState == state.outerFrameState() && nextLock.stateDepth == i; - RiValue owner = toCiValue(nextLock.monitor.object()); - RiValue lockData = nextLock.lockData; + Value owner = toCiValue(nextLock.monitor.object()); + Value lockData = nextLock.lockData; boolean eliminated = nextLock.monitor.eliminated(); values[numLocals + numStack + nextLock.stateDepth] = new CiMonitorValue(owner, lockData, eliminated); @@ -152,7 +152,7 @@ return frame; } - private RiValue toCiValue(ValueNode value) { + private Value toCiValue(ValueNode value) { if (value instanceof VirtualObjectNode) { VirtualObjectNode obj = (VirtualObjectNode) value; CiVirtualObject ciObj = virtualObjects.get(value); @@ -169,14 +169,14 @@ } else if (value != null) { Debug.metric("StateVariables").increment(); - RiValue operand = nodeOperands.get(value); + Value operand = nodeOperands.get(value); assert operand != null && (operand instanceof Variable || operand instanceof Constant); return operand; } else { // return a dummy value because real value not needed Debug.metric("StateIllegals").increment(); - return RiValue.IllegalValue; + return Value.IllegalValue; } } } diff -r e18ba36bfebc -r bc647d8b0080 graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/gen/LIRGenerator.java --- a/graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/gen/LIRGenerator.java Fri Jun 08 23:41:02 2012 +0200 +++ b/graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/gen/LIRGenerator.java Fri Jun 08 23:44:20 2012 +0200 @@ -23,7 +23,7 @@ package com.oracle.graal.compiler.gen; import static com.oracle.graal.api.code.CiCallingConvention.Type.*; -import static com.oracle.graal.api.meta.RiValue.*; +import static com.oracle.graal.api.meta.Value.*; import static com.oracle.graal.lir.ValueUtil.*; import java.util.*; @@ -72,7 +72,7 @@ protected final CiTarget target; protected final RiResolvedMethod method; protected final FrameMap frameMap; - public final NodeMap nodeOperands; + public final NodeMap nodeOperands; protected final LIR lir; protected final XirSupport xirSupport; @@ -168,15 +168,15 @@ * @param node A node that produces a result value. */ @Override - public RiValue operand(ValueNode node) { + public Value operand(ValueNode node) { if (nodeOperands == null) { return null; } return nodeOperands.get(node); } - public ValueNode valueForOperand(RiValue value) { - for (Entry entry : nodeOperands.entries()) { + public ValueNode valueForOperand(Value value) { + for (Entry entry : nodeOperands.entries()) { if (entry.getValue() == value) { return (ValueNode) entry.getKey(); } @@ -207,7 +207,7 @@ } @Override - public RiValue setResult(ValueNode x, RiValue operand) { + public Value setResult(ValueNode x, Value operand) { assert (isVariable(operand) && x.kind() == operand.kind) || (isConstant(operand) && x.kind() == operand.kind.stackKind()) : operand.kind + " for node " + x; assert operand(x) == null : "operand cannot be set twice"; @@ -219,23 +219,23 @@ } @Override - public abstract Variable emitMove(RiValue input); + public abstract Variable emitMove(Value input); - public Variable load(RiValue value) { + public Variable load(Value value) { if (!isVariable(value)) { return emitMove(value); } return (Variable) value; } - public RiValue loadNonConst(RiValue value) { + public Value loadNonConst(Value value) { if (isConstant(value) && !canInlineConstant((Constant) value)) { return emitMove(value); } return value; } - public RiValue loadForStore(RiValue value, RiKind storeKind) { + public Value loadForStore(Value value, RiKind storeKind) { if (isConstant(value) && canStoreConstant((Constant) value)) { return value; } @@ -279,7 +279,7 @@ * @param kind the kind of value being returned * @return the operand representing the ABI defined location used return a value of kind {@code kind} */ - public RiValue resultOperandFor(RiKind kind) { + public Value resultOperandFor(RiKind kind) { if (kind == RiKind.Void) { return IllegalValue; } @@ -316,12 +316,12 @@ MergeNode merge = (MergeNode) block.getBeginNode(); for (PhiNode phi : merge.phis()) { if (phi.type() == PhiType.Value) { - RiValue phiValue = newVariable(phi.kind()); + Value phiValue = newVariable(phi.kind()); setResult(phi, phiValue); phiValues.add(phiValue); } } - append(new PhiLabelOp(new Label(), block.align, phiValues.toArray(new RiValue[phiValues.size()]))); + append(new PhiLabelOp(new Label(), block.align, phiValues.toArray(new Value[phiValues.size()]))); phiValues.clear(); } else { append(new LabelOp(new Label(), block.align)); @@ -505,7 +505,7 @@ protected void emitPrologue() { CiCallingConvention incomingArguments = frameMap.registerConfig.getCallingConvention(JavaCallee, CiUtil.signatureToKinds(method), target, false); - RiValue[] params = new RiValue[incomingArguments.locations.length]; + Value[] params = new Value[incomingArguments.locations.length]; for (int i = 0; i < params.length; i++) { params[i] = toStackKind(incomingArguments.locations[i]); if (CiValueUtil.isStackSlot(params[i])) { @@ -519,7 +519,7 @@ append(new ParametersOp(params)); for (LocalNode local : graph.getNodes(LocalNode.class)) { - RiValue param = params[local.index()]; + Value param = params[local.index()]; assert param.kind == local.kind().stackKind(); setResult(local, emitMove(param)); } @@ -609,7 +609,7 @@ @Override public void visitReturn(ReturnNode x) { - RiValue operand = RiValue.IllegalValue; + Value operand = Value.IllegalValue; if (!x.kind().isVoid()) { operand = resultOperandFor(x.kind()); emitMove(operand(x.result()), operand); @@ -617,7 +617,7 @@ emitReturn(operand); } - protected abstract void emitReturn(RiValue input); + protected abstract void emitReturn(Value input); @Override public void visitMerge(MergeNode x) { @@ -635,7 +635,7 @@ public void visitLoopEnd(LoopEndNode x) { } - private ArrayList phiValues = new ArrayList<>(); + private ArrayList phiValues = new ArrayList<>(); private void moveToPhi(MergeNode merge, EndNode pred) { if (GraalOptions.AllocSSA) { @@ -645,7 +645,7 @@ phiValues.add(operand(phi.valueAt(pred))); } } - append(new PhiJumpOp(getLIRBlock(merge), phiValues.toArray(new RiValue[phiValues.size()]))); + append(new PhiJumpOp(getLIRBlock(merge), phiValues.toArray(new Value[phiValues.size()]))); phiValues.clear(); return; } @@ -665,9 +665,9 @@ append(new JumpOp(getLIRBlock(merge), null)); } - private RiValue operandForPhi(PhiNode phi) { + private Value operandForPhi(PhiNode phi) { assert phi.type() == PhiType.Value : "wrong phi type: " + phi; - RiValue result = operand(phi); + Value result = operand(phi); if (result == null) { // allocate a variable for this phi Variable newOperand = newVariable(phi.kind()); @@ -768,12 +768,12 @@ @Override public void emitConditional(ConditionalNode conditional) { - RiValue tVal = operand(conditional.trueValue()); - RiValue fVal = operand(conditional.falseValue()); + Value tVal = operand(conditional.trueValue()); + Value fVal = operand(conditional.falseValue()); setResult(conditional, emitConditional(conditional.condition(), tVal, fVal)); } - public Variable emitConditional(BooleanNode node, RiValue trueValue, RiValue falseValue) { + public Variable emitConditional(BooleanNode node, Value trueValue, Value falseValue) { if (node instanceof IsNullNode) { return emitNullCheckConditional((IsNullNode) node, trueValue, falseValue); } else if (node instanceof CompareNode) { @@ -787,11 +787,11 @@ } } - private Variable emitNullCheckConditional(IsNullNode node, RiValue trueValue, RiValue falseValue) { + private Variable emitNullCheckConditional(IsNullNode node, Value trueValue, Value falseValue) { return emitCMove(operand(node.object()), Constant.NULL_OBJECT, Condition.EQ, false, trueValue, falseValue); } - private Variable emitInstanceOfConditional(InstanceOfNode x, RiValue trueValue, RiValue falseValue) { + private Variable emitInstanceOfConditional(InstanceOfNode x, Value trueValue, Value falseValue) { XirArgument obj = toXirArgument(x.object()); XirArgument trueArg = toXirArgument(trueValue); XirArgument falseArg = toXirArgument(falseValue); @@ -799,19 +799,19 @@ return (Variable) emitXir(snippet, null, null, false); } - private Variable emitConstantConditional(boolean value, RiValue trueValue, RiValue falseValue) { + private Variable emitConstantConditional(boolean value, Value trueValue, Value falseValue) { return emitMove(value ? trueValue : falseValue); } - private Variable emitCompareConditional(CompareNode compare, RiValue trueValue, RiValue falseValue) { + private Variable emitCompareConditional(CompareNode compare, Value trueValue, Value falseValue) { return emitCMove(operand(compare.x()), operand(compare.y()), compare.condition(), compare.unorderedIsTrue(), trueValue, falseValue); } public abstract void emitLabel(Label label, boolean align); public abstract void emitJump(LabelRef label, LIRDebugInfo info); - public abstract void emitBranch(RiValue left, RiValue right, Condition cond, boolean unorderedIsTrue, LabelRef label, LIRDebugInfo info); - public abstract Variable emitCMove(RiValue leftVal, RiValue right, Condition cond, boolean unorderedIsTrue, RiValue trueValue, RiValue falseValue); + public abstract void emitBranch(Value left, Value right, Condition cond, boolean unorderedIsTrue, LabelRef label, LIRDebugInfo info); + public abstract Variable emitCMove(Value leftVal, Value right, Condition cond, boolean unorderedIsTrue, Value trueValue, Value falseValue); protected FrameState stateBeforeCallWithArguments(FrameState stateAfter, MethodCallTargetNode call, int bci) { return stateAfter.duplicateModified(bci, stateAfter.rethrowException(), call.returnKind(), toJVMArgumentStack(call.targetMethod().signature(), call.isStatic(), call.arguments())); @@ -873,7 +873,7 @@ break; } - RiValue destinationAddress = null; + Value destinationAddress = null; if (!target().invokeSnippetAfterArguments) { // This is the version currently necessary for Maxine: since the invokeinterface-snippet uses a division, it // destroys rdx, which is also used to pass a parameter. Therefore, the snippet must be before the parameters are assigned to their locations. @@ -881,12 +881,12 @@ destinationAddress = emitXir(snippet, x.node(), addrInfo, false); } - RiValue resultOperand = resultOperandFor(x.node().kind()); + Value resultOperand = resultOperandFor(x.node().kind()); RiKind[] signature = CiUtil.signatureToKinds(callTarget.targetMethod().signature(), callTarget.isStatic() ? null : callTarget.targetMethod().holder().kind()); CiCallingConvention cc = frameMap.registerConfig.getCallingConvention(JavaCall, signature, target(), false); frameMap.callsMethod(cc, JavaCall); - List argList = visitInvokeArguments(cc, callTarget.arguments()); + List argList = visitInvokeArguments(cc, callTarget.arguments()); if (target().invokeSnippetAfterArguments) { // This is the version currently active for HotSpot. @@ -902,10 +902,10 @@ } } - protected abstract void emitCall(Object targetMethod, RiValue result, List arguments, RiValue targetAddress, LIRDebugInfo info, Map marks); + protected abstract void emitCall(Object targetMethod, Value result, List arguments, Value targetAddress, LIRDebugInfo info, Map marks); - private static RiValue toStackKind(RiValue value) { + private static Value toStackKind(Value value) { if (value.kind.stackKind() != value.kind) { // We only have stack-kinds in the LIR, so convert the operand kind for values from the calling convention. if (isRegister(value)) { @@ -919,13 +919,13 @@ return value; } - public List visitInvokeArguments(CiCallingConvention cc, Iterable arguments) { + public List visitInvokeArguments(CiCallingConvention cc, Iterable arguments) { // for each argument, load it into the correct location - List argList = new ArrayList<>(); + List argList = new ArrayList<>(); int j = 0; for (ValueNode arg : arguments) { if (arg != null) { - RiValue operand = toStackKind(cc.locations[j++]); + Value operand = toStackKind(cc.locations[j++]); emitMove(operand(arg), operand); argList.add(operand); @@ -940,20 +940,20 @@ protected abstract LabelRef createDeoptStub(CiDeoptAction action, RiDeoptReason reason, LIRDebugInfo info, Object deoptInfo); @Override - public Variable emitCall(@SuppressWarnings("hiding") Object target, RiKind result, RiKind[] arguments, boolean canTrap, RiValue... args) { + public Variable emitCall(@SuppressWarnings("hiding") Object target, RiKind result, RiKind[] arguments, boolean canTrap, Value... args) { LIRDebugInfo info = canTrap ? state() : null; - RiValue physReg = resultOperandFor(result); + Value physReg = resultOperandFor(result); - List argumentList; + List argumentList; if (arguments.length > 0) { // move the arguments into the correct location CiCallingConvention cc = frameMap.registerConfig.getCallingConvention(RuntimeCall, arguments, target(), false); frameMap.callsMethod(cc, RuntimeCall); assert cc.locations.length == args.length : "argument count mismatch"; for (int i = 0; i < args.length; i++) { - RiValue arg = args[i]; - RiValue loc = cc.locations[i]; + Value arg = args[i]; + Value loc = cc.locations[i]; emitMove(arg, loc); } argumentList = Arrays.asList(cc.locations); @@ -976,10 +976,10 @@ public void emitRuntimeCall(RuntimeCallNode x) { // TODO Merge with emitCallToRuntime() method above. - RiValue resultOperand = resultOperandFor(x.kind()); + Value resultOperand = resultOperandFor(x.kind()); CiCallingConvention cc = frameMap.registerConfig.getCallingConvention(RuntimeCall, x.call().arguments, target(), false); frameMap.callsMethod(cc, RuntimeCall); - List argList = visitInvokeArguments(cc, x.arguments()); + List argList = visitInvokeArguments(cc, x.arguments()); LIRDebugInfo info = null; FrameState stateAfter = x.stateAfter(); @@ -1045,7 +1045,7 @@ } } - protected abstract void emitTableSwitch(int lowKey, LabelRef defaultTarget, LabelRef[] targets, RiValue index); + protected abstract void emitTableSwitch(int lowKey, LabelRef defaultTarget, LabelRef[] targets, Value index); // the range of values in a lookupswitch or tableswitch statement private static final class SwitchRange { @@ -1116,7 +1116,7 @@ } - protected XirArgument toXirArgument(RiValue v) { + protected XirArgument toXirArgument(Value v) { if (v == null) { return null; } @@ -1130,7 +1130,7 @@ return XirArgument.forInternalObject(loadNonConst(operand(i))); } - private RiValue allocateOperand(XirSnippet snippet, XirOperand op) { + private Value allocateOperand(XirSnippet snippet, XirOperand op) { if (op instanceof XirParameter) { XirParameter param = (XirParameter) op; return allocateOperand(snippet.arguments[param.parameterIndex], op, param.canBeConstant); @@ -1145,12 +1145,12 @@ } } - private RiValue allocateOperand(XirArgument arg, XirOperand var, boolean canBeConstant) { + private Value allocateOperand(XirArgument arg, XirOperand var, boolean canBeConstant) { if (arg.constant != null) { return arg.constant; } - RiValue value = (RiValue) arg.object; + Value value = (Value) arg.object; if (canBeConstant) { return value; } @@ -1163,23 +1163,23 @@ return variable; } - protected RiValue emitXir(XirSnippet snippet, ValueNode x, LIRDebugInfo info, boolean setInstructionResult) { + protected Value emitXir(XirSnippet snippet, ValueNode x, LIRDebugInfo info, boolean setInstructionResult) { return emitXir(snippet, x, info, null, setInstructionResult, null, null); } - protected RiValue emitXir(XirSnippet snippet, ValueNode instruction, LIRDebugInfo info, LIRDebugInfo infoAfter, boolean setInstructionResult, LabelRef trueSuccessor, LabelRef falseSuccessor) { + protected Value emitXir(XirSnippet snippet, ValueNode instruction, LIRDebugInfo info, LIRDebugInfo infoAfter, boolean setInstructionResult, LabelRef trueSuccessor, LabelRef falseSuccessor) { if (GraalOptions.PrintXirTemplates) { TTY.println("Emit XIR template " + snippet.template.name); } - final RiValue[] operandsArray = new RiValue[snippet.template.variableCount]; + final Value[] operandsArray = new Value[snippet.template.variableCount]; frameMap.reserveOutgoing(snippet.template.outgoingStackSize); XirOperand resultOperand = snippet.template.resultOperand; if (snippet.template.allocateResultOperand) { - RiValue outputOperand = IllegalValue; + Value outputOperand = IllegalValue; // This snippet has a result that must be separately allocated // Otherwise it is assumed that the result is part of the inputs if (resultOperand.kind != RiKind.Void && resultOperand.kind != RiKind.Illegal) { @@ -1214,13 +1214,13 @@ XirOperand[] inputTempOperands = snippet.template.inputTempOperands; XirOperand[] tempOperands = snippet.template.tempOperands; - RiValue[] inputOperandArray = new RiValue[inputOperands.length + inputTempOperands.length]; - RiValue[] tempOperandArray = new RiValue[tempOperands.length]; + Value[] inputOperandArray = new Value[inputOperands.length + inputTempOperands.length]; + Value[] tempOperandArray = new Value[tempOperands.length]; int[] inputOperandIndicesArray = new int[inputOperands.length + inputTempOperands.length]; int[] tempOperandIndicesArray = new int[tempOperands.length]; for (int i = 0; i < inputOperands.length; i++) { XirOperand x = inputOperands[i]; - RiValue op = allocateOperand(snippet, x); + Value op = allocateOperand(snippet, x); operandsArray[x.index] = op; inputOperandArray[i] = op; inputOperandIndicesArray[i] = x.index; @@ -1233,7 +1233,7 @@ for (int i = 0; i < tempOperands.length; i++) { XirOperand x = tempOperands[i]; - RiValue op = allocateOperand(snippet, x); + Value op = allocateOperand(snippet, x); operandsArray[x.index] = op; tempOperandArray[i] = op; tempOperandIndicesArray[i] = x.index; @@ -1242,17 +1242,17 @@ } } - for (RiValue operand : operandsArray) { + for (Value operand : operandsArray) { assert operand != null; } - RiValue allocatedResultOperand = operandsArray[resultOperand.index]; + Value allocatedResultOperand = operandsArray[resultOperand.index]; if (!isVariable(allocatedResultOperand) && !isRegister(allocatedResultOperand)) { allocatedResultOperand = IllegalValue; } if (setInstructionResult && isLegal(allocatedResultOperand)) { - RiValue operand = operand(instruction); + Value operand = operand(instruction); if (operand == null) { setResult(instruction, allocatedResultOperand); } else { @@ -1274,25 +1274,25 @@ return operandsArray[resultOperand.index]; } - protected abstract void emitXir(XirSnippet snippet, RiValue[] operands, RiValue outputOperand, RiValue[] inputs, RiValue[] temps, int[] inputOperandIndices, int[] tempOperandIndices, int outputOperandIndex, + protected abstract void emitXir(XirSnippet snippet, Value[] operands, Value outputOperand, Value[] inputs, Value[] temps, int[] inputOperandIndices, int[] tempOperandIndices, int outputOperandIndex, LIRDebugInfo info, LIRDebugInfo infoAfter, LabelRef trueSuccessor, LabelRef falseSuccessor); - protected final RiValue callRuntime(CiRuntimeCall runtimeCall, LIRDebugInfo info, RiValue... args) { + protected final Value callRuntime(CiRuntimeCall runtimeCall, LIRDebugInfo info, Value... args) { // get a result register RiKind result = runtimeCall.resultKind; RiKind[] arguments = runtimeCall.arguments; - RiValue physReg = result.isVoid() ? IllegalValue : resultOperandFor(result); + Value physReg = result.isVoid() ? IllegalValue : resultOperandFor(result); - List argumentList; + List argumentList; if (arguments.length > 0) { // move the arguments into the correct location CiCallingConvention cc = frameMap.registerConfig.getCallingConvention(RuntimeCall, arguments, target(), false); frameMap.callsMethod(cc, RuntimeCall); assert cc.locations.length == args.length : "argument count mismatch"; for (int i = 0; i < args.length; i++) { - RiValue arg = args[i]; - RiValue loc = cc.locations[i]; + Value arg = args[i]; + Value loc = cc.locations[i]; emitMove(arg, loc); } argumentList = Arrays.asList(cc.locations); @@ -1307,8 +1307,8 @@ return physReg; } - protected final Variable callRuntimeWithResult(CiRuntimeCall runtimeCall, LIRDebugInfo info, RiValue... args) { - RiValue location = callRuntime(runtimeCall, info, args); + protected final Variable callRuntimeWithResult(CiRuntimeCall runtimeCall, LIRDebugInfo info, Value... args) { + Value location = callRuntime(runtimeCall, info, args); return emitMove(location); } diff -r e18ba36bfebc -r bc647d8b0080 graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/gen/PhiResolver.java --- a/graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/gen/PhiResolver.java Fri Jun 08 23:41:02 2012 +0200 +++ b/graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/gen/PhiResolver.java Fri Jun 08 23:44:20 2012 +0200 @@ -22,7 +22,7 @@ */ package com.oracle.graal.compiler.gen; -import static com.oracle.graal.api.meta.RiValue.*; +import static com.oracle.graal.api.meta.Value.*; import static com.oracle.graal.lir.ValueUtil.*; import java.util.*; @@ -58,7 +58,7 @@ /** * A source operand whose value flows into the {@linkplain #destinations destination} operands. */ - final RiValue operand; + final Value operand; /** * The operands whose values are defined by the {@linkplain #operand source} operand. @@ -80,7 +80,7 @@ */ boolean startNode; - PhiResolverNode(RiValue operand) { + PhiResolverNode(Value operand) { this.operand = operand; destinations = new ArrayList<>(4); } @@ -105,7 +105,7 @@ */ private PhiResolverNode loop; - private RiValue temp; + private Value temp; private final ArrayList variableOperands = new ArrayList<>(3); private final ArrayList otherOperands = new ArrayList<>(3); @@ -113,7 +113,7 @@ /** * Maps operands to nodes. */ - private final HashMap operandToNodeMap = new HashMap<>(); + private final HashMap operandToNodeMap = new HashMap<>(); public PhiResolver(LIRGenerator gen) { this.gen = gen; @@ -141,7 +141,7 @@ } } - public void move(RiValue src, RiValue dest) { + public void move(Value src, Value dest) { assert isVariable(dest) : "destination must be virtual"; // tty.print("move "); src.print(); tty.print(" to "); dest.print(); tty.cr(); assert isLegal(src) : "source for phi move is illegal"; @@ -151,7 +151,7 @@ srcNode.destinations.add(destNode); } - private PhiResolverNode createNode(RiValue operand, boolean source) { + private PhiResolverNode createNode(Value operand, boolean source) { PhiResolverNode node; if (isVariable(operand)) { node = operandToNodeMap.get(operand); @@ -175,11 +175,11 @@ return node; } - private PhiResolverNode destinationNode(RiValue opr) { + private PhiResolverNode destinationNode(Value opr) { return createNode(opr, false); } - private void emitMove(RiValue src, RiValue dest) { + private void emitMove(Value src, Value dest) { assert isLegal(src); assert isLegal(dest); gen.emitMove(src, dest); @@ -217,19 +217,19 @@ } } - private void moveTempTo(RiValue dest) { + private void moveTempTo(Value dest) { assert isLegal(temp); emitMove(temp, dest); temp = IllegalValue; } - private void moveToTemp(RiValue src) { + private void moveToTemp(Value src) { assert isIllegal(temp); temp = gen.newVariable(src.kind); emitMove(src, temp); } - private PhiResolverNode sourceNode(RiValue opr) { + private PhiResolverNode sourceNode(Value opr) { return createNode(opr, true); } } diff -r e18ba36bfebc -r bc647d8b0080 graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/target/amd64/AMD64LIRGenerator.java --- a/graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/target/amd64/AMD64LIRGenerator.java Fri Jun 08 23:41:02 2012 +0200 +++ b/graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/target/amd64/AMD64LIRGenerator.java Fri Jun 08 23:44:20 2012 +0200 @@ -87,12 +87,12 @@ public static class AMD64SpillMoveFactory implements LIR.SpillMoveFactory { @Override - public LIRInstruction createMove(RiValue result, RiValue input) { + public LIRInstruction createMove(Value result, Value input) { return new SpillMoveOp(result, input); } @Override - public LIRInstruction createExchange(RiValue input1, RiValue input2) { + public LIRInstruction createExchange(Value input1, Value input2) { // TODO (cwimmer) implement XCHG operation for LIR return null; } @@ -134,8 +134,8 @@ @Override public CiAddress makeAddress(LocationNode location, ValueNode object) { - RiValue base = operand(object); - RiValue index = RiValue.IllegalValue; + Value base = operand(object); + Value index = Value.IllegalValue; int scale = 1; long displacement = location.displacement(); @@ -143,7 +143,7 @@ if (!asConstant(base).isNull()) { displacement += asConstant(base).asLong(); } - base = RiValue.IllegalValue; + base = Value.IllegalValue; } if (location instanceof IndexedLocationNode) { @@ -158,10 +158,10 @@ // only use the constant index if the resulting displacement fits into a 32 bit offset if (NumUtil.isInt(newDisplacement)) { displacement = newDisplacement; - index = RiValue.IllegalValue; + index = Value.IllegalValue; } else { // create a temporary variable for the index, the pointer load cannot handle a constant index - RiValue newIndex = newVariable(RiKind.Long); + Value newIndex = newVariable(RiKind.Long); emitMove(index, newIndex); index = newIndex; } @@ -172,14 +172,14 @@ } @Override - public Variable emitMove(RiValue input) { + public Variable emitMove(Value input) { Variable result = newVariable(input.kind); emitMove(input, result); return result; } @Override - public void emitMove(RiValue src, RiValue dst) { + public void emitMove(Value src, Value dst) { if (isRegister(src) || isStackSlot(dst)) { append(new MoveFromRegOp(dst, src)); } else { @@ -188,20 +188,20 @@ } @Override - public Variable emitLoad(RiValue loadAddress, boolean canTrap) { + public Variable emitLoad(Value loadAddress, boolean canTrap) { Variable result = newVariable(loadAddress.kind); append(new LoadOp(result, loadAddress, canTrap ? state() : null)); return result; } @Override - public void emitStore(RiValue storeAddress, RiValue inputVal, boolean canTrap) { - RiValue input = loadForStore(inputVal, storeAddress.kind); + public void emitStore(Value storeAddress, Value inputVal, boolean canTrap) { + Value input = loadForStore(inputVal, storeAddress.kind); append(new StoreOp(storeAddress, input, canTrap ? state() : null)); } @Override - public Variable emitLea(RiValue address) { + public Variable emitLea(Value address) { Variable result = newVariable(target().wordKind); append(new LeaOp(result, address)); return result; @@ -218,7 +218,7 @@ } @Override - public void emitBranch(RiValue left, RiValue right, Condition cond, boolean unorderedIsTrue, LabelRef label, LIRDebugInfo info) { + public void emitBranch(Value left, Value right, Condition cond, boolean unorderedIsTrue, LabelRef label, LIRDebugInfo info) { boolean mirrored = emitCompare(left, right); Condition finalCondition = mirrored ? cond.mirror() : cond; switch (left.kind.stackKind()) { @@ -232,7 +232,7 @@ } @Override - public Variable emitCMove(RiValue left, RiValue right, Condition cond, boolean unorderedIsTrue, RiValue trueValue, RiValue falseValue) { + public Variable emitCMove(Value left, Value right, Condition cond, boolean unorderedIsTrue, Value trueValue, Value falseValue) { boolean mirrored = emitCompare(left, right); Condition finalCondition = mirrored ? cond.mirror() : cond; @@ -255,9 +255,9 @@ * @param b the right operand of the comparison * @return true if the left and right operands were switched, false otherwise */ - private boolean emitCompare(RiValue a, RiValue b) { + private boolean emitCompare(Value a, Value b) { Variable left; - RiValue right; + Value right; boolean mirrored; if (ValueUtil.isVariable(b)) { left = load(b); @@ -281,7 +281,7 @@ } @Override - public Variable emitNegate(RiValue input) { + public Variable emitNegate(Value input) { Variable result = newVariable(input.kind); switch (input.kind) { case Int: append(new Op1Stack(INEG, result, input)); break; @@ -294,7 +294,7 @@ } @Override - public Variable emitAdd(RiValue a, RiValue b) { + public Variable emitAdd(Value a, Value b) { Variable result = newVariable(a.kind); switch(a.kind) { case Int: append(new Op2Stack(IADD, result, a, loadNonConst(b))); break; @@ -307,7 +307,7 @@ } @Override - public Variable emitSub(RiValue a, RiValue b) { + public Variable emitSub(Value a, Value b) { Variable result = newVariable(a.kind); switch(a.kind) { case Int: append(new Op2Stack(ISUB, result, a, loadNonConst(b))); break; @@ -320,7 +320,7 @@ } @Override - public Variable emitMul(RiValue a, RiValue b) { + public Variable emitMul(Value a, Value b) { Variable result = newVariable(a.kind); switch(a.kind) { case Int: append(new Op2Reg(IMUL, result, a, loadNonConst(b))); break; @@ -333,7 +333,7 @@ } @Override - public Variable emitDiv(RiValue a, RiValue b) { + public Variable emitDiv(Value a, Value b) { switch(a.kind) { case Int: emitMove(a, RAX_I); @@ -359,7 +359,7 @@ } @Override - public RiValue emitRem(RiValue a, RiValue b) { + public Value emitRem(Value a, Value b) { switch(a.kind) { case Int: emitMove(a, RAX_I); @@ -379,7 +379,7 @@ } @Override - public Variable emitUDiv(RiValue a, RiValue b) { + public Variable emitUDiv(Value a, Value b) { switch(a.kind) { case Int: emitMove(a, RAX_I); @@ -395,7 +395,7 @@ } @Override - public Variable emitURem(RiValue a, RiValue b) { + public Variable emitURem(Value a, Value b) { switch(a.kind) { case Int: emitMove(a, RAX_I); @@ -412,7 +412,7 @@ @Override - public Variable emitAnd(RiValue a, RiValue b) { + public Variable emitAnd(Value a, Value b) { Variable result = newVariable(a.kind); switch(a.kind) { case Int: append(new Op2Stack(IAND, result, a, loadNonConst(b))); break; @@ -423,7 +423,7 @@ } @Override - public Variable emitOr(RiValue a, RiValue b) { + public Variable emitOr(Value a, Value b) { Variable result = newVariable(a.kind); switch(a.kind) { case Int: append(new Op2Stack(IOR, result, a, loadNonConst(b))); break; @@ -434,7 +434,7 @@ } @Override - public Variable emitXor(RiValue a, RiValue b) { + public Variable emitXor(Value a, Value b) { Variable result = newVariable(a.kind); switch(a.kind) { case Int: append(new Op2Stack(IXOR, result, a, loadNonConst(b))); break; @@ -446,7 +446,7 @@ @Override - public Variable emitShl(RiValue a, RiValue b) { + public Variable emitShl(Value a, Value b) { Variable result = newVariable(a.kind); switch (a.kind) { case Int: append(new ShiftOp(ISHL, result, a, loadShiftCount(b))); break; @@ -457,7 +457,7 @@ } @Override - public Variable emitShr(RiValue a, RiValue b) { + public Variable emitShr(Value a, Value b) { Variable result = newVariable(a.kind); switch (a.kind) { case Int: append(new ShiftOp(ISHR, result, a, loadShiftCount(b))); break; @@ -468,7 +468,7 @@ } @Override - public Variable emitUShr(RiValue a, RiValue b) { + public Variable emitUShr(Value a, Value b) { Variable result = newVariable(a.kind); switch (a.kind) { case Int: append(new ShiftOp(IUSHR, result, a, loadShiftCount(b))); break; @@ -478,7 +478,7 @@ return result; } - private RiValue loadShiftCount(RiValue value) { + private Value loadShiftCount(Value value) { if (isConstant(value)) { return value; } @@ -489,7 +489,7 @@ @Override - public Variable emitConvert(ConvertNode.Op opcode, RiValue inputVal) { + public Variable emitConvert(ConvertNode.Op opcode, Value inputVal) { Variable input = load(inputVal); Variable result = newVariable(opcode.to); switch (opcode) { @@ -542,28 +542,28 @@ } @Override - protected void emitCall(Object targetMethod, RiValue result, List arguments, RiValue targetAddress, LIRDebugInfo info, Map marks) { + protected void emitCall(Object targetMethod, Value result, List arguments, Value targetAddress, LIRDebugInfo info, Map marks) { if (isConstant(targetAddress)) { assert asConstant(targetAddress).isDefaultValue() : "destination address should be zero"; - append(new DirectCallOp(targetMethod, result, arguments.toArray(new RiValue[arguments.size()]), info, marks)); + append(new DirectCallOp(targetMethod, result, arguments.toArray(new Value[arguments.size()]), info, marks)); } else { - append(new IndirectCallOp(targetMethod, result, arguments.toArray(new RiValue[arguments.size()]), targetAddress, info, marks)); + append(new IndirectCallOp(targetMethod, result, arguments.toArray(new Value[arguments.size()]), targetAddress, info, marks)); } } @Override - protected void emitReturn(RiValue input) { + protected void emitReturn(Value input) { append(new ReturnOp(input)); } @Override - protected void emitXir(XirSnippet snippet, RiValue[] operands, RiValue outputOperand, RiValue[] inputs, RiValue[] temps, int[] inputOperandIndices, int[] tempOperandIndices, int outputOperandIndex, + protected void emitXir(XirSnippet snippet, Value[] operands, Value outputOperand, Value[] inputs, Value[] temps, int[] inputOperandIndices, int[] tempOperandIndices, int outputOperandIndex, LIRDebugInfo info, LIRDebugInfo infoAfter, LabelRef trueSuccessor, LabelRef falseSuccessor) { append(new AMD64XirOp(snippet, operands, outputOperand, inputs, temps, inputOperandIndices, tempOperandIndices, outputOperandIndex, info, infoAfter, trueSuccessor, falseSuccessor)); } @Override - protected void emitTableSwitch(int lowKey, LabelRef defaultTarget, LabelRef[] targets, RiValue index) { + protected void emitTableSwitch(int lowKey, LabelRef defaultTarget, LabelRef[] targets, Value index) { // Making a copy of the switch value is necessary because jump table destroys the input value Variable tmp = emitMove(index); append(new TableSwitchOp(lowKey, defaultTarget, targets, tmp, newVariable(target.wordKind))); @@ -589,12 +589,12 @@ RiKind kind = node.newValue().kind(); assert kind == node.expected().kind(); - RiValue expected = loadNonConst(operand(node.expected())); + Value expected = loadNonConst(operand(node.expected())); Variable newValue = load(operand(node.newValue())); CiAddress address; int displacement = node.displacement(); - RiValue index = operand(node.offset()); + Value index = operand(node.offset()); if (isConstant(index) && NumUtil.isInt(asConstant(index).asLong())) { displacement += (int) asConstant(index).asLong(); address = new CiAddress(kind, load(operand(node.object())), displacement); diff -r e18ba36bfebc -r bc647d8b0080 graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/target/amd64/AMD64XirOp.java --- a/graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/target/amd64/AMD64XirOp.java Fri Jun 08 23:41:02 2012 +0200 +++ b/graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/target/amd64/AMD64XirOp.java Fri Jun 08 23:44:20 2012 +0200 @@ -24,7 +24,7 @@ import static com.oracle.graal.api.code.CiCallingConvention.Type.*; import static com.oracle.graal.api.code.CiValueUtil.*; -import static com.oracle.graal.api.meta.RiValue.*; +import static com.oracle.graal.api.meta.Value.*; import java.util.*; @@ -45,7 +45,7 @@ import com.oracle.max.cri.xir.CiXirAssembler.XirMark; public class AMD64XirOp extends LIRXirInstruction { - public AMD64XirOp(XirSnippet snippet, RiValue[] operands, RiValue outputOperand, RiValue[] inputs, RiValue[] temps, int[] inputOperandIndices, int[] tempOperandIndices, int outputOperandIndex, + public AMD64XirOp(XirSnippet snippet, Value[] operands, Value outputOperand, Value[] inputs, Value[] temps, int[] inputOperandIndices, int[] tempOperandIndices, int outputOperandIndex, LIRDebugInfo info, LIRDebugInfo infoAfter, LabelRef trueSuccessor, LabelRef falseSuccessor) { super("XIR", snippet, operands, outputOperand, inputs, temps, inputOperandIndices, tempOperandIndices, outputOperandIndex, info, infoAfter, trueSuccessor, falseSuccessor); } @@ -106,7 +106,7 @@ } - protected void emitXirInstructions(TargetMethodAssembler tasm, AMD64MacroAssembler masm, XirInstruction[] instructions, Label[] labels, RiValue[] operands, Map marks) { + protected void emitXirInstructions(TargetMethodAssembler tasm, AMD64MacroAssembler masm, XirInstruction[] instructions, Label[] labels, Value[] operands, Map marks) { for (XirInstruction inst : instructions) { switch (inst.op) { case Add: @@ -154,15 +154,15 @@ break; case Mov: { - RiValue result = operands[inst.result.index]; - RiValue source = operands[inst.x().index]; + Value result = operands[inst.result.index]; + Value source = operands[inst.x().index]; AMD64Move.move(tasm, masm, result, source); break; } case PointerLoad: { - RiValue result = operands[inst.result.index]; - RiValue pointer = operands[inst.x().index]; + Value result = operands[inst.result.index]; + Value pointer = operands[inst.x().index]; CiRegisterValue register = assureInRegister(tasm, masm, pointer); AMD64Move.load(tasm, masm, result, new CiAddress(inst.kind, register), (Boolean) inst.extra ? info : null); @@ -170,8 +170,8 @@ } case PointerStore: { - RiValue value = assureNot64BitConstant(tasm, masm, operands[inst.y().index]); - RiValue pointer = operands[inst.x().index]; + Value value = assureNot64BitConstant(tasm, masm, operands[inst.y().index]); + Value pointer = operands[inst.x().index]; assert isRegister(pointer); AMD64Move.store(tasm, masm, new CiAddress(inst.kind, pointer), value, (Boolean) inst.extra ? info : null); @@ -185,9 +185,9 @@ CiAddress.Scale scale = addressInformation.scale; int displacement = addressInformation.disp; - RiValue result = operands[inst.result.index]; - RiValue pointer = operands[inst.x().index]; - RiValue index = operands[inst.y().index]; + Value result = operands[inst.result.index]; + Value pointer = operands[inst.x().index]; + Value index = operands[inst.y().index]; pointer = assureInRegister(tasm, masm, pointer); assert isRegister(pointer); @@ -211,9 +211,9 @@ CiAddress.Scale scale = addressInformation.scale; int displacement = addressInformation.disp; - RiValue result = operands[inst.result.index]; - RiValue pointer = operands[inst.x().index]; - RiValue index = operands[inst.y().index]; + Value result = operands[inst.result.index]; + Value pointer = operands[inst.x().index]; + Value index = operands[inst.y().index]; pointer = assureInRegister(tasm, masm, pointer); assert isRegister(pointer); @@ -229,9 +229,9 @@ CiAddress.Scale scale = addressInformation.scale; int displacement = addressInformation.disp; - RiValue value = assureNot64BitConstant(tasm, masm, operands[inst.z().index]); - RiValue pointer = operands[inst.x().index]; - RiValue index = operands[inst.y().index]; + Value value = assureNot64BitConstant(tasm, masm, operands[inst.z().index]); + Value pointer = operands[inst.x().index]; + Value index = operands[inst.y().index]; pointer = assureInRegister(tasm, masm, pointer); assert isRegister(pointer); @@ -266,8 +266,8 @@ case PointerCAS: assert asRegister(operands[inst.x().index]).equals(AMD64.rax) : "wrong input x: " + operands[inst.x().index]; - RiValue exchangedVal = operands[inst.y().index]; - RiValue exchangedAddress = operands[inst.x().index]; + Value exchangedVal = operands[inst.y().index]; + Value exchangedAddress = operands[inst.x().index]; CiRegisterValue pointerRegister = assureInRegister(tasm, masm, exchangedAddress); CiAddress addr = new CiAddress(tasm.target.wordKind, pointerRegister); @@ -286,8 +286,8 @@ CiCallingConvention cc = tasm.frameMap.registerConfig.getCallingConvention(RuntimeCall, signature, tasm.target, false); for (int i = 0; i < inst.arguments.length; i++) { - RiValue argumentLocation = cc.locations[i]; - RiValue argumentSourceLocation = operands[inst.arguments[i].index]; + Value argumentLocation = cc.locations[i]; + Value argumentSourceLocation = operands[inst.arguments[i].index]; if (argumentLocation != argumentSourceLocation) { AMD64Move.move(tasm, masm, argumentLocation, argumentSourceLocation); } @@ -298,7 +298,7 @@ if (inst.result != null && inst.result.kind != RiKind.Illegal && inst.result.kind != RiKind.Void) { CiRegister returnRegister = tasm.frameMap.registerConfig.getReturnRegister(inst.result.kind); - RiValue resultLocation = returnRegister.asValue(inst.result.kind.stackKind()); + Value resultLocation = returnRegister.asValue(inst.result.kind.stackKind()); AMD64Move.move(tasm, masm, operands[inst.result.index], resultLocation); } break; @@ -314,7 +314,7 @@ } case DecAndJumpNotZero: { Label label = labels[((XirLabel) inst.extra).index]; - RiValue value = operands[inst.x().index]; + Value value = operands[inst.x().index]; if (value.kind == RiKind.Long) { masm.decq(asRegister(value)); } else { @@ -367,9 +367,9 @@ case Jbset: { Label label = labels[((XirLabel) inst.extra).index]; - RiValue pointer = operands[inst.x().index]; - RiValue offset = operands[inst.y().index]; - RiValue bit = operands[inst.z().index]; + Value pointer = operands[inst.x().index]; + Value offset = operands[inst.y().index]; + Value bit = operands[inst.z().index]; assert isConstant(offset) && isConstant(bit); Constant constantOffset = (Constant) offset; Constant constantBit = (Constant) bit; @@ -392,7 +392,7 @@ } case NullCheck: { tasm.recordImplicitException(masm.codeBuffer.position(), info); - RiValue pointer = operands[inst.x().index]; + Value pointer = operands[inst.x().index]; masm.nullCheck(asRegister(pointer)); break; } @@ -402,7 +402,7 @@ break; } case Pop: { - RiValue result = operands[inst.result.index]; + Value result = operands[inst.result.index]; if (isRegister(result)) { masm.pop(asRegister(result)); } else { @@ -440,7 +440,7 @@ } private static void emitXirViaLir(TargetMethodAssembler tasm, AMD64MacroAssembler masm, AMD64Arithmetic intOp, AMD64Arithmetic longOp, AMD64Arithmetic floatOp, - AMD64Arithmetic doubleOp, RiValue left, RiValue right, RiValue result) { + AMD64Arithmetic doubleOp, Value left, Value right, Value result) { AMD64Arithmetic code; switch (result.kind) { case Int: code = intOp; break; @@ -458,9 +458,9 @@ } } - private static void emitXirCompare(TargetMethodAssembler tasm, AMD64MacroAssembler masm, XirInstruction inst, ConditionFlag cflag, RiValue[] ops, Label label) { - RiValue x = ops[inst.x().index]; - RiValue y = ops[inst.y().index]; + private static void emitXirCompare(TargetMethodAssembler tasm, AMD64MacroAssembler masm, XirInstruction inst, ConditionFlag cflag, Value[] ops, Label label) { + Value x = ops[inst.x().index]; + Value y = ops[inst.y().index]; AMD64Compare code; switch (x.kind) { case Int: code = AMD64Compare.ICMP; break; @@ -474,7 +474,7 @@ masm.jcc(cflag, label); } - private static RiValue assureNot64BitConstant(TargetMethodAssembler tasm, AMD64MacroAssembler masm, RiValue value) { + private static Value assureNot64BitConstant(TargetMethodAssembler tasm, AMD64MacroAssembler masm, Value value) { if (isConstant(value) && (value.kind == RiKind.Long || value.kind == RiKind.Object)) { CiRegisterValue register = tasm.frameMap.registerConfig.getScratchRegister().asValue(value.kind); AMD64Move.move(tasm, masm, register, value); @@ -483,7 +483,7 @@ return value; } - private static CiRegisterValue assureInRegister(TargetMethodAssembler tasm, AMD64MacroAssembler masm, RiValue pointer) { + private static CiRegisterValue assureInRegister(TargetMethodAssembler tasm, AMD64MacroAssembler masm, Value pointer) { if (isConstant(pointer)) { CiRegisterValue register = tasm.frameMap.registerConfig.getScratchRegister().asValue(pointer.kind); AMD64Move.move(tasm, masm, register, pointer); diff -r e18ba36bfebc -r bc647d8b0080 graal/com.oracle.graal.hotspot.server/src/com/oracle/graal/hotspot/server/ReplacingStreams.java --- a/graal/com.oracle.graal.hotspot.server/src/com/oracle/graal/hotspot/server/ReplacingStreams.java Fri Jun 08 23:41:02 2012 +0200 +++ b/graal/com.oracle.graal.hotspot.server/src/com/oracle/graal/hotspot/server/ReplacingStreams.java Fri Jun 08 23:44:20 2012 +0200 @@ -47,7 +47,7 @@ input = new ReplacingInputStream(new BufferedInputStream(inputStream)); invocation = new InvocationSocket(output, input); - addStaticObject(RiValue.IllegalValue); + addStaticObject(Value.IllegalValue); addStaticObject(HotSpotProxy.DUMMY_CONSTANT_OBJ); } diff -r e18ba36bfebc -r bc647d8b0080 graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/counters/MethodEntryCounters.java --- a/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/counters/MethodEntryCounters.java Fri Jun 08 23:41:02 2012 +0200 +++ b/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/counters/MethodEntryCounters.java Fri Jun 08 23:44:20 2012 +0200 @@ -69,8 +69,8 @@ protected final Counter counter; - protected AMD64MethodEntryOp(Counter counter, RiValue counterArr, RiValue callerPc) { - super("ENTRY_COUNTER", LIRInstruction.NO_OPERANDS, null, LIRInstruction.NO_OPERANDS, LIRInstruction.NO_OPERANDS, new RiValue[] {counterArr, callerPc}); + protected AMD64MethodEntryOp(Counter counter, Value counterArr, Value callerPc) { + super("ENTRY_COUNTER", LIRInstruction.NO_OPERANDS, null, LIRInstruction.NO_OPERANDS, LIRInstruction.NO_OPERANDS, new Value[] {counterArr, callerPc}); this.counter = counter; } @@ -78,8 +78,8 @@ public void emitCode(TargetMethodAssembler tasm, AMD64MacroAssembler masm) { int start = masm.codeBuffer.position(); - RiValue counterArr = temp(0); - RiValue callerPc = temp(1); + Value counterArr = temp(0); + Value callerPc = temp(1); int off = Unsafe.getUnsafe().arrayBaseOffset(long[].class); int scale = Unsafe.getUnsafe().arrayIndexScale(long[].class); diff -r e18ba36bfebc -r bc647d8b0080 graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/nodes/ArrayWriteBarrier.java --- a/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/nodes/ArrayWriteBarrier.java Fri Jun 08 23:41:02 2012 +0200 +++ b/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/nodes/ArrayWriteBarrier.java Fri Jun 08 23:44:20 2012 +0200 @@ -47,7 +47,7 @@ @Override public void generate(LIRGeneratorTool gen) { - RiValue addr = gen.emitLea(gen.makeAddress(location(), object())); + Value addr = gen.emitLea(gen.makeAddress(location(), object())); generateBarrier(addr, gen); } } diff -r e18ba36bfebc -r bc647d8b0080 graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/nodes/FieldWriteBarrier.java --- a/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/nodes/FieldWriteBarrier.java Fri Jun 08 23:41:02 2012 +0200 +++ b/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/nodes/FieldWriteBarrier.java Fri Jun 08 23:44:20 2012 +0200 @@ -40,7 +40,7 @@ @Override public void generate(LIRGeneratorTool generator) { - RiValue obj = generator.newVariable(generator.target().wordKind); + Value obj = generator.newVariable(generator.target().wordKind); generator.emitMove(generator.operand(object()), obj); generateBarrier(obj, generator); } diff -r e18ba36bfebc -r bc647d8b0080 graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/nodes/TailcallNode.java --- a/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/nodes/TailcallNode.java Fri Jun 08 23:41:02 2012 +0200 +++ b/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/nodes/TailcallNode.java Fri Jun 08 23:44:20 2012 +0200 @@ -68,9 +68,9 @@ for (int i = 0, slot = 0; i < cc.locations.length; i++, slot += FrameStateBuilder.stackSlots(frameState.localAt(slot).kind())) { parameters.add(frameState.localAt(slot)); } - List argList = gen.visitInvokeArguments(cc, parameters); + List argList = gen.visitInvokeArguments(cc, parameters); - RiValue entry = gen.emitLoad(new CiAddress(RiKind.Long, gen.operand(target), config.nmethodEntryOffset), false); + Value entry = gen.emitLoad(new CiAddress(RiKind.Long, gen.operand(target), config.nmethodEntryOffset), false); gen.append(new AMD64TailcallOp(argList, entry, cc.locations)); } diff -r e18ba36bfebc -r bc647d8b0080 graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/nodes/WriteBarrier.java --- a/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/nodes/WriteBarrier.java Fri Jun 08 23:41:02 2012 +0200 +++ b/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/nodes/WriteBarrier.java Fri Jun 08 23:44:20 2012 +0200 @@ -35,9 +35,9 @@ super(StampFactory.forVoid()); } - protected void generateBarrier(RiValue adr, LIRGeneratorTool gen) { + protected void generateBarrier(Value adr, LIRGeneratorTool gen) { HotSpotVMConfig config = HotSpotGraalRuntime.getInstance().getConfig(); - RiValue base = gen.emitUShr(adr, Constant.forInt(config.cardtableShift)); + Value base = gen.emitUShr(adr, Constant.forInt(config.cardtableShift)); long startAddress = config.cardtableStartAddress; int displacement = 0; diff -r e18ba36bfebc -r bc647d8b0080 graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/ri/HotSpotRegisterConfig.java --- a/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/ri/HotSpotRegisterConfig.java Fri Jun 08 23:41:02 2012 +0200 +++ b/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/ri/HotSpotRegisterConfig.java Fri Jun 08 23:44:20 2012 +0200 @@ -120,7 +120,7 @@ } private CiCallingConvention callingConvention(RiKind[] types, Type type, CiTarget target, boolean stackOnly) { - RiValue[] locations = new RiValue[types.length]; + Value[] locations = new Value[types.length]; int currentGeneral = 0; int currentXMM = 0; diff -r e18ba36bfebc -r bc647d8b0080 graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/snippets/DirectStoreNode.java --- a/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/snippets/DirectStoreNode.java Fri Jun 08 23:41:02 2012 +0200 +++ b/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/snippets/DirectStoreNode.java Fri Jun 08 23:44:20 2012 +0200 @@ -57,7 +57,7 @@ @Override public void generate(LIRGeneratorTool gen) { - RiValue v = gen.operand(value); + Value v = gen.operand(value); gen.emitStore(new CiAddress(v.kind, gen.operand(address)), v, false); } } diff -r e18ba36bfebc -r bc647d8b0080 graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/snippets/GetObjectAddressNode.java --- a/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/snippets/GetObjectAddressNode.java Fri Jun 08 23:41:02 2012 +0200 +++ b/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/snippets/GetObjectAddressNode.java Fri Jun 08 23:44:20 2012 +0200 @@ -49,7 +49,7 @@ @Override public void generate(LIRGeneratorTool gen) { - RiValue obj = gen.newVariable(gen.target().wordKind); + Value obj = gen.newVariable(gen.target().wordKind); gen.emitMove(gen.operand(object), obj); gen.setResult(this, obj); } diff -r e18ba36bfebc -r bc647d8b0080 graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/target/amd64/AMD64TailcallOp.java --- a/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/target/amd64/AMD64TailcallOp.java Fri Jun 08 23:41:02 2012 +0200 +++ b/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/target/amd64/AMD64TailcallOp.java Fri Jun 08 23:44:20 2012 +0200 @@ -38,7 +38,7 @@ */ public class AMD64TailcallOp extends AMD64LIRInstruction { - public AMD64TailcallOp(List parameters, RiValue target, RiValue[] callingConvention) { + public AMD64TailcallOp(List parameters, Value target, Value[] callingConvention) { super("TAILCALL", LIRInstruction.NO_OPERANDS, null, toArray(parameters, target), LIRInstruction.NO_OPERANDS, callingConvention.clone()); assert inputs.length == temps.length + 1; @@ -48,8 +48,8 @@ } } - private static RiValue[] toArray(List parameters, RiValue target) { - RiValue[] result = new RiValue[parameters.size() + 1]; + private static Value[] toArray(List parameters, Value target) { + Value[] result = new Value[parameters.size() + 1]; parameters.toArray(result); result[parameters.size()] = target; return result; diff -r e18ba36bfebc -r bc647d8b0080 graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/target/amd64/HotSpotAMD64Backend.java --- a/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/target/amd64/HotSpotAMD64Backend.java Fri Jun 08 23:41:02 2012 +0200 +++ b/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/target/amd64/HotSpotAMD64Backend.java Fri Jun 08 23:44:20 2012 +0200 @@ -71,7 +71,7 @@ CiRegisterValue thread = r15.asValue(); CiAddress exceptionAddress = new CiAddress(RiKind.Object, thread, config.threadExceptionOopOffset); CiAddress pcAddress = new CiAddress(RiKind.Long, thread, config.threadExceptionPcOffset); - RiValue exception = emitLoad(exceptionAddress, false); + Value exception = emitLoad(exceptionAddress, false); emitStore(exceptionAddress, Constant.NULL_OBJECT, false); emitStore(pcAddress, Constant.LONG_0, false); setResult(x, exception); diff -r e18ba36bfebc -r bc647d8b0080 graal/com.oracle.graal.lir.amd64/src/com/oracle/graal/lir/amd64/AMD64Arithmetic.java --- a/graal/com.oracle.graal.lir.amd64/src/com/oracle/graal/lir/amd64/AMD64Arithmetic.java Fri Jun 08 23:41:02 2012 +0200 +++ b/graal/com.oracle.graal.lir.amd64/src/com/oracle/graal/lir/amd64/AMD64Arithmetic.java Fri Jun 08 23:44:20 2012 +0200 @@ -48,14 +48,14 @@ public static class Op1Reg extends AMD64LIRInstruction { - public Op1Reg(AMD64Arithmetic opcode, RiValue result, RiValue x) { - super(opcode, new RiValue[] {result}, null, new RiValue[] {x}, LIRInstruction.NO_OPERANDS, LIRInstruction.NO_OPERANDS); + public Op1Reg(AMD64Arithmetic opcode, Value result, Value x) { + super(opcode, new Value[] {result}, null, new Value[] {x}, LIRInstruction.NO_OPERANDS, LIRInstruction.NO_OPERANDS); } @Override public void emitCode(TargetMethodAssembler tasm, AMD64MacroAssembler masm) { - RiValue result = output(0); - RiValue x = input(0); + Value result = output(0); + Value x = input(0); emit(tasm, masm, (AMD64Arithmetic) code, result, x, null); } @@ -72,14 +72,14 @@ } public static class Op1Stack extends AMD64LIRInstruction { - public Op1Stack(AMD64Arithmetic opcode, RiValue result, RiValue x) { - super(opcode, new RiValue[] {result}, null, new RiValue[] {x}, LIRInstruction.NO_OPERANDS, LIRInstruction.NO_OPERANDS); + public Op1Stack(AMD64Arithmetic opcode, Value result, Value x) { + super(opcode, new Value[] {result}, null, new Value[] {x}, LIRInstruction.NO_OPERANDS, LIRInstruction.NO_OPERANDS); } @Override public void emitCode(TargetMethodAssembler tasm, AMD64MacroAssembler masm) { - RiValue result = output(0); - RiValue x = input(0); + Value result = output(0); + Value x = input(0); AMD64Move.move(tasm, masm, result, x); emit(tasm, masm, (AMD64Arithmetic) code, result); @@ -97,15 +97,15 @@ } public static class Op2Stack extends AMD64LIRInstruction { - public Op2Stack(AMD64Arithmetic opcode, RiValue result, RiValue x, RiValue y) { - super(opcode, new RiValue[] {result}, null, new RiValue[] {x}, new RiValue[] {y}, LIRInstruction.NO_OPERANDS); + public Op2Stack(AMD64Arithmetic opcode, Value result, Value x, Value y) { + super(opcode, new Value[] {result}, null, new Value[] {x}, new Value[] {y}, LIRInstruction.NO_OPERANDS); } @Override public void emitCode(TargetMethodAssembler tasm, AMD64MacroAssembler masm) { - RiValue result = output(0); - RiValue x = input(0); - RiValue y = alive(0); + Value result = output(0); + Value x = input(0); + Value y = alive(0); AMD64Move.move(tasm, masm, result, x); emit(tasm, masm, (AMD64Arithmetic) code, result, y, null); @@ -125,9 +125,9 @@ @Override public void verify() { - RiValue result = output(0); - RiValue x = input(0); - RiValue y = alive(0); + Value result = output(0); + Value x = input(0); + Value y = alive(0); super.verify(); assert differentRegisters(result, y) || sameRegister(x, y); @@ -136,15 +136,15 @@ } public static class Op2Reg extends AMD64LIRInstruction { - public Op2Reg(AMD64Arithmetic opcode, RiValue result, RiValue x, RiValue y) { - super(opcode, new RiValue[] {result}, null, new RiValue[] {x}, new RiValue[] {y}, LIRInstruction.NO_OPERANDS); + public Op2Reg(AMD64Arithmetic opcode, Value result, Value x, Value y) { + super(opcode, new Value[] {result}, null, new Value[] {x}, new Value[] {y}, LIRInstruction.NO_OPERANDS); } @Override public void emitCode(TargetMethodAssembler tasm, AMD64MacroAssembler masm) { - RiValue result = output(0); - RiValue x = input(0); - RiValue y = alive(0); + Value result = output(0); + Value x = input(0); + Value y = alive(0); AMD64Move.move(tasm, masm, result, x); emit(tasm, masm, (AMD64Arithmetic) code, result, y, null); @@ -164,9 +164,9 @@ @Override public void verify() { - RiValue result = output(0); - RiValue x = input(0); - RiValue y = alive(0); + Value result = output(0); + Value x = input(0); + Value y = alive(0); super.verify(); assert differentRegisters(result, y) || sameRegister(x, y); @@ -175,15 +175,15 @@ } public static class Op2RegCommutative extends AMD64LIRInstruction { - public Op2RegCommutative(AMD64Arithmetic opcode, RiValue result, RiValue x, RiValue y) { - super(opcode, new RiValue[] {result}, null, new RiValue[] {x, y}, LIRInstruction.NO_OPERANDS, LIRInstruction.NO_OPERANDS); + public Op2RegCommutative(AMD64Arithmetic opcode, Value result, Value x, Value y) { + super(opcode, new Value[] {result}, null, new Value[] {x, y}, LIRInstruction.NO_OPERANDS, LIRInstruction.NO_OPERANDS); } @Override public void emitCode(TargetMethodAssembler tasm, AMD64MacroAssembler masm) { - RiValue result = output(0); - RiValue x = input(0); - RiValue y = input(1); + Value result = output(0); + Value x = input(0); + Value y = input(1); if (sameRegister(result, y)) { emit(tasm, masm, (AMD64Arithmetic) code, result, x, null); @@ -207,9 +207,9 @@ @Override protected void verify() { - RiValue result = output(0); - RiValue x = input(0); - RiValue y = input(1); + Value result = output(0); + Value x = input(0); + Value y = input(1); super.verify(); verifyKind((AMD64Arithmetic) code, result, x, y); @@ -217,15 +217,15 @@ } public static class ShiftOp extends AMD64LIRInstruction { - public ShiftOp(AMD64Arithmetic opcode, RiValue result, RiValue x, RiValue y) { - super(opcode, new RiValue[] {result}, null, new RiValue[] {x}, new RiValue[] {y}, LIRInstruction.NO_OPERANDS); + public ShiftOp(AMD64Arithmetic opcode, Value result, Value x, Value y) { + super(opcode, new Value[] {result}, null, new Value[] {x}, new Value[] {y}, LIRInstruction.NO_OPERANDS); } @Override public void emitCode(TargetMethodAssembler tasm, AMD64MacroAssembler masm) { - RiValue result = output(0); - RiValue x = input(0); - RiValue y = alive(0); + Value result = output(0); + Value x = input(0); + Value y = alive(0); AMD64Move.move(tasm, masm, result, x); emit(tasm, masm, (AMD64Arithmetic) code, result, y, null); @@ -245,9 +245,9 @@ @Override public void verify() { - RiValue result = output(0); - RiValue x = input(0); - RiValue y = alive(0); + Value result = output(0); + Value x = input(0); + Value y = alive(0); super.verify(); assert isConstant(y) || asRegister(y) == AMD64.rcx; @@ -258,14 +258,14 @@ } public static class DivOp extends AMD64LIRInstruction { - public DivOp(AMD64Arithmetic opcode, RiValue result, RiValue x, RiValue y, LIRDebugInfo info) { - super(opcode, new RiValue[] {result}, info, new RiValue[] {x}, new RiValue[] {y}, new RiValue[] {asRegister(result) == AMD64.rax ? AMD64.rdx.asValue(result.kind) : AMD64.rax.asValue(result.kind)}); + public DivOp(AMD64Arithmetic opcode, Value result, Value x, Value y, LIRDebugInfo info) { + super(opcode, new Value[] {result}, info, new Value[] {x}, new Value[] {y}, new Value[] {asRegister(result) == AMD64.rax ? AMD64.rdx.asValue(result.kind) : AMD64.rax.asValue(result.kind)}); } @Override public void emitCode(TargetMethodAssembler tasm, AMD64MacroAssembler masm) { - RiValue result = output(0); - RiValue y = alive(0); + Value result = output(0); + Value y = alive(0); emit(tasm, masm, (AMD64Arithmetic) code, result, y, info); } @@ -286,9 +286,9 @@ @Override protected void verify() { - RiValue result = output(0); - RiValue x = input(0); - RiValue y = alive(0); + Value result = output(0); + Value x = input(0); + Value y = alive(0); super.verify(); // left input in rax, right input in any register but rax and rdx, result quotient in rax, result remainder in rdx @@ -301,7 +301,7 @@ @SuppressWarnings("unused") - protected static void emit(TargetMethodAssembler tasm, AMD64MacroAssembler masm, AMD64Arithmetic opcode, RiValue result) { + protected static void emit(TargetMethodAssembler tasm, AMD64MacroAssembler masm, AMD64Arithmetic opcode, Value result) { switch (opcode) { case INEG: masm.negl(asIntReg(result)); break; case LNEG: masm.negq(asLongReg(result)); break; @@ -313,7 +313,7 @@ } } - public static void emit(TargetMethodAssembler tasm, AMD64MacroAssembler masm, AMD64Arithmetic opcode, RiValue dst, RiValue src, LIRDebugInfo info) { + public static void emit(TargetMethodAssembler tasm, AMD64MacroAssembler masm, AMD64Arithmetic opcode, Value dst, Value src, LIRDebugInfo info) { int exceptionOffset = -1; if (isRegister(src)) { switch (opcode) { @@ -498,7 +498,7 @@ } } - private static void emitConvertFixup(TargetMethodAssembler tasm, AMD64MacroAssembler masm, RiValue result, RiValue x) { + private static void emitConvertFixup(TargetMethodAssembler tasm, AMD64MacroAssembler masm, Value result, Value x) { ConvertSlowPath slowPath = new ConvertSlowPath(result, x); tasm.stubs.add(slowPath); switch (result.kind) { @@ -513,10 +513,10 @@ private static class ConvertSlowPath extends AMD64Code { public final Label start = new Label(); public final Label continuation = new Label(); - private final RiValue result; - private final RiValue x; + private final Value result; + private final Value x; - public ConvertSlowPath(RiValue result, RiValue x) { + public ConvertSlowPath(Value result, Value x) { this.result = result; this.x = x; } @@ -555,7 +555,7 @@ } - private static void verifyKind(AMD64Arithmetic opcode, RiValue result, RiValue x, RiValue y) { + private static void verifyKind(AMD64Arithmetic opcode, Value result, Value x, Value y) { assert (opcode.name().startsWith("I") && result.kind == RiKind.Int && x.kind.stackKind() == RiKind.Int && y.kind.stackKind() == RiKind.Int) || (opcode.name().startsWith("L") && result.kind == RiKind.Long && x.kind == RiKind.Long && y.kind == RiKind.Long) || (opcode.name().startsWith("F") && result.kind == RiKind.Float && x.kind == RiKind.Float && y.kind == RiKind.Float) diff -r e18ba36bfebc -r bc647d8b0080 graal/com.oracle.graal.lir.amd64/src/com/oracle/graal/lir/amd64/AMD64Call.java --- a/graal/com.oracle.graal.lir.amd64/src/com/oracle/graal/lir/amd64/AMD64Call.java Fri Jun 08 23:41:02 2012 +0200 +++ b/graal/com.oracle.graal.lir.amd64/src/com/oracle/graal/lir/amd64/AMD64Call.java Fri Jun 08 23:44:20 2012 +0200 @@ -41,8 +41,8 @@ private final Object targetMethod; private final Map marks; - public DirectCallOp(Object targetMethod, RiValue result, RiValue[] parameters, LIRDebugInfo info, Map marks) { - super("CALL_DIRECT", new RiValue[] {result}, info, parameters, LIRInstruction.NO_OPERANDS, LIRInstruction.NO_OPERANDS); + public DirectCallOp(Object targetMethod, Value result, Value[] parameters, LIRDebugInfo info, Map marks) { + super("CALL_DIRECT", new Value[] {result}, info, parameters, LIRInstruction.NO_OPERANDS, LIRInstruction.NO_OPERANDS); this.targetMethod = targetMethod; this.marks = marks; } @@ -71,19 +71,19 @@ private final Object targetMethod; private final Map marks; - private static RiValue[] concat(RiValue[] parameters, RiValue targetAddress) { - RiValue[] result = Arrays.copyOf(parameters, parameters.length + 1); + private static Value[] concat(Value[] parameters, Value targetAddress) { + Value[] result = Arrays.copyOf(parameters, parameters.length + 1); result[result.length - 1] = targetAddress; return result; } - public IndirectCallOp(Object targetMethod, RiValue result, RiValue[] parameters, RiValue targetAddress, LIRDebugInfo info, Map marks) { - super("CALL_INDIRECT", new RiValue[] {result}, info, concat(parameters, targetAddress), LIRInstruction.NO_OPERANDS, LIRInstruction.NO_OPERANDS); + public IndirectCallOp(Object targetMethod, Value result, Value[] parameters, Value targetAddress, LIRDebugInfo info, Map marks) { + super("CALL_INDIRECT", new Value[] {result}, info, concat(parameters, targetAddress), LIRInstruction.NO_OPERANDS, LIRInstruction.NO_OPERANDS); this.targetMethod = targetMethod; this.marks = marks; } - private RiValue targetAddress() { + private Value targetAddress() { return input(inputs.length - 1); } diff -r e18ba36bfebc -r bc647d8b0080 graal/com.oracle.graal.lir.amd64/src/com/oracle/graal/lir/amd64/AMD64Compare.java --- a/graal/com.oracle.graal.lir.amd64/src/com/oracle/graal/lir/amd64/AMD64Compare.java Fri Jun 08 23:41:02 2012 +0200 +++ b/graal/com.oracle.graal.lir.amd64/src/com/oracle/graal/lir/amd64/AMD64Compare.java Fri Jun 08 23:44:20 2012 +0200 @@ -36,14 +36,14 @@ ICMP, LCMP, ACMP, FCMP, DCMP; public static class CompareOp extends AMD64LIRInstruction { - public CompareOp(AMD64Compare opcode, RiValue x, RiValue y) { - super(opcode, LIRInstruction.NO_OPERANDS, null, new RiValue[] {x, y}, LIRInstruction.NO_OPERANDS, LIRInstruction.NO_OPERANDS); + public CompareOp(AMD64Compare opcode, Value x, Value y) { + super(opcode, LIRInstruction.NO_OPERANDS, null, new Value[] {x, y}, LIRInstruction.NO_OPERANDS, LIRInstruction.NO_OPERANDS); } @Override public void emitCode(TargetMethodAssembler tasm, AMD64MacroAssembler masm) { - RiValue x = input(0); - RiValue y = input(1); + Value x = input(0); + Value y = input(1); emit(tasm, masm, (AMD64Compare) code, x, y); } @@ -59,8 +59,8 @@ @Override protected void verify() { - RiValue x = input(0); - RiValue y = input(1); + Value x = input(0); + Value y = input(1); super.verify(); assert (name().startsWith("I") && x.kind == RiKind.Int && y.kind.stackKind() == RiKind.Int) @@ -72,7 +72,7 @@ } } - public static void emit(TargetMethodAssembler tasm, AMD64MacroAssembler masm, AMD64Compare opcode, RiValue x, RiValue y) { + public static void emit(TargetMethodAssembler tasm, AMD64MacroAssembler masm, AMD64Compare opcode, Value x, Value y) { if (isRegister(y)) { switch (opcode) { case ICMP: masm.cmpl(asIntReg(x), asIntReg(y)); break; diff -r e18ba36bfebc -r bc647d8b0080 graal/com.oracle.graal.lir.amd64/src/com/oracle/graal/lir/amd64/AMD64ControlFlow.java --- a/graal/com.oracle.graal.lir.amd64/src/com/oracle/graal/lir/amd64/AMD64ControlFlow.java Fri Jun 08 23:41:02 2012 +0200 +++ b/graal/com.oracle.graal.lir.amd64/src/com/oracle/graal/lir/amd64/AMD64ControlFlow.java Fri Jun 08 23:44:20 2012 +0200 @@ -41,8 +41,8 @@ public class AMD64ControlFlow { public static class ReturnOp extends AMD64LIRInstruction { - public ReturnOp(RiValue input) { - super("RETURN", LIRInstruction.NO_OPERANDS, null, new RiValue[] {input}, LIRInstruction.NO_OPERANDS, LIRInstruction.NO_OPERANDS); + public ReturnOp(Value input) { + super("RETURN", LIRInstruction.NO_OPERANDS, null, new Value[] {input}, LIRInstruction.NO_OPERANDS, LIRInstruction.NO_OPERANDS); } @Override @@ -137,7 +137,7 @@ private final LabelRef[] targets; public TableSwitchOp(final int lowKey, final LabelRef defaultTarget, final LabelRef[] targets, Variable index, Variable scratch) { - super("TABLE_SWITCH", LIRInstruction.NO_OPERANDS, null, LIRInstruction.NO_OPERANDS, new RiValue[] {index}, new RiValue[] {scratch}); + super("TABLE_SWITCH", LIRInstruction.NO_OPERANDS, null, LIRInstruction.NO_OPERANDS, new Value[] {index}, new Value[] {scratch}); this.lowKey = lowKey; this.defaultTarget = defaultTarget; this.targets = targets; @@ -175,8 +175,8 @@ public static class CondMoveOp extends AMD64LIRInstruction { private final ConditionFlag condition; - public CondMoveOp(Variable result, Condition condition, Variable trueValue, RiValue falseValue) { - super("CMOVE", new RiValue[] {result}, null, new RiValue[] {falseValue}, new RiValue[] {trueValue}, LIRInstruction.NO_OPERANDS); + public CondMoveOp(Variable result, Condition condition, Variable trueValue, Value falseValue) { + super("CMOVE", new Value[] {result}, null, new Value[] {falseValue}, new Value[] {trueValue}, LIRInstruction.NO_OPERANDS); this.condition = intCond(condition); } @@ -209,7 +209,7 @@ private final boolean unorderedIsTrue; public FloatCondMoveOp(Variable result, Condition condition, boolean unorderedIsTrue, Variable trueValue, Variable falseValue) { - super("FLOAT_CMOVE", new RiValue[] {result}, null, LIRInstruction.NO_OPERANDS, new RiValue[] {trueValue, falseValue}, LIRInstruction.NO_OPERANDS); + super("FLOAT_CMOVE", new Value[] {result}, null, LIRInstruction.NO_OPERANDS, new Value[] {trueValue, falseValue}, LIRInstruction.NO_OPERANDS); this.condition = floatCond(condition); this.unorderedIsTrue = unorderedIsTrue; } @@ -305,7 +305,7 @@ masm.bind(endLabel); } - private static void cmove(TargetMethodAssembler tasm, AMD64MacroAssembler masm, RiValue result, boolean isFloat, ConditionFlag condition, boolean unorderedIsTrue, RiValue trueValue, RiValue falseValue) { + private static void cmove(TargetMethodAssembler tasm, AMD64MacroAssembler masm, Value result, boolean isFloat, ConditionFlag condition, boolean unorderedIsTrue, Value trueValue, Value falseValue) { // check that we don't overwrite an input operand before it is used. assert !result.equals(trueValue); @@ -321,7 +321,7 @@ } } - private static void cmove(TargetMethodAssembler tasm, AMD64MacroAssembler masm, RiValue result, ConditionFlag cond, RiValue other) { + private static void cmove(TargetMethodAssembler tasm, AMD64MacroAssembler masm, Value result, ConditionFlag cond, Value other) { if (isRegister(other)) { assert asRegister(other) != asRegister(result) : "other already overwritten by previous move"; switch (other.kind) { diff -r e18ba36bfebc -r bc647d8b0080 graal/com.oracle.graal.lir.amd64/src/com/oracle/graal/lir/amd64/AMD64LIRInstruction.java --- a/graal/com.oracle.graal.lir.amd64/src/com/oracle/graal/lir/amd64/AMD64LIRInstruction.java Fri Jun 08 23:41:02 2012 +0200 +++ b/graal/com.oracle.graal.lir.amd64/src/com/oracle/graal/lir/amd64/AMD64LIRInstruction.java Fri Jun 08 23:44:20 2012 +0200 @@ -32,7 +32,7 @@ */ public abstract class AMD64LIRInstruction extends LIRInstruction { - public AMD64LIRInstruction(Object opcode, RiValue[] outputs, LIRDebugInfo info, RiValue[] inputs, RiValue[] alives, RiValue[] temps) { + public AMD64LIRInstruction(Object opcode, Value[] outputs, LIRDebugInfo info, Value[] inputs, Value[] alives, Value[] temps) { super(opcode, outputs, info, inputs, alives, temps); } diff -r e18ba36bfebc -r bc647d8b0080 graal/com.oracle.graal.lir.amd64/src/com/oracle/graal/lir/amd64/AMD64Move.java --- a/graal/com.oracle.graal.lir.amd64/src/com/oracle/graal/lir/amd64/AMD64Move.java Fri Jun 08 23:41:02 2012 +0200 +++ b/graal/com.oracle.graal.lir.amd64/src/com/oracle/graal/lir/amd64/AMD64Move.java Fri Jun 08 23:44:20 2012 +0200 @@ -40,8 +40,8 @@ public class AMD64Move { public static class SpillMoveOp extends AMD64LIRInstruction implements MoveOp { - public SpillMoveOp(RiValue result, RiValue input) { - super("MOVE", new RiValue[] {result}, null, new RiValue[] {input}, LIRInstruction.NO_OPERANDS, LIRInstruction.NO_OPERANDS); + public SpillMoveOp(Value result, Value input) { + super("MOVE", new Value[] {result}, null, new Value[] {input}, LIRInstruction.NO_OPERANDS, LIRInstruction.NO_OPERANDS); } @Override @@ -50,11 +50,11 @@ } @Override - public RiValue getInput() { + public Value getInput() { return input(0); } @Override - public RiValue getResult() { + public Value getResult() { return output(0); } @@ -71,8 +71,8 @@ public static class MoveToRegOp extends AMD64LIRInstruction implements MoveOp { - public MoveToRegOp(RiValue result, RiValue input) { - super("MOVE", new RiValue[] {result}, null, new RiValue[] {input}, LIRInstruction.NO_OPERANDS, LIRInstruction.NO_OPERANDS); + public MoveToRegOp(Value result, Value input) { + super("MOVE", new Value[] {result}, null, new Value[] {input}, LIRInstruction.NO_OPERANDS, LIRInstruction.NO_OPERANDS); } @Override @@ -81,11 +81,11 @@ } @Override - public RiValue getInput() { + public Value getInput() { return input(0); } @Override - public RiValue getResult() { + public Value getResult() { return output(0); } @@ -102,8 +102,8 @@ public static class MoveFromRegOp extends AMD64LIRInstruction implements MoveOp { - public MoveFromRegOp(RiValue result, RiValue input) { - super("MOVE", new RiValue[] {result}, null, new RiValue[] {input}, LIRInstruction.NO_OPERANDS, LIRInstruction.NO_OPERANDS); + public MoveFromRegOp(Value result, Value input) { + super("MOVE", new Value[] {result}, null, new Value[] {input}, LIRInstruction.NO_OPERANDS, LIRInstruction.NO_OPERANDS); } @Override @@ -112,11 +112,11 @@ } @Override - public RiValue getInput() { + public Value getInput() { return input(0); } @Override - public RiValue getResult() { + public Value getResult() { return output(0); } @@ -133,8 +133,8 @@ public static class LoadOp extends AMD64LIRInstruction { - public LoadOp(RiValue result, RiValue address, LIRDebugInfo info) { - super("LOAD", new RiValue[] {result}, info, new RiValue[] {address}, LIRInstruction.NO_OPERANDS, LIRInstruction.NO_OPERANDS); + public LoadOp(Value result, Value address, LIRDebugInfo info) { + super("LOAD", new Value[] {result}, info, new Value[] {address}, LIRInstruction.NO_OPERANDS, LIRInstruction.NO_OPERANDS); } @Override @@ -155,8 +155,8 @@ public static class StoreOp extends AMD64LIRInstruction { - public StoreOp(RiValue address, RiValue input, LIRDebugInfo info) { - super("STORE", LIRInstruction.NO_OPERANDS, info, new RiValue[] {address, input}, LIRInstruction.NO_OPERANDS, LIRInstruction.NO_OPERANDS); + public StoreOp(Value address, Value input, LIRDebugInfo info) { + super("STORE", LIRInstruction.NO_OPERANDS, info, new Value[] {address, input}, LIRInstruction.NO_OPERANDS, LIRInstruction.NO_OPERANDS); } @Override @@ -177,8 +177,8 @@ public static class LeaOp extends AMD64LIRInstruction { - public LeaOp(RiValue result, RiValue address) { - super("LEA", new RiValue[] {result}, null, new RiValue[] {address}, LIRInstruction.NO_OPERANDS, LIRInstruction.NO_OPERANDS); + public LeaOp(Value result, Value address) { + super("LEA", new Value[] {result}, null, new Value[] {address}, LIRInstruction.NO_OPERANDS, LIRInstruction.NO_OPERANDS); } @Override @@ -220,7 +220,7 @@ public static class NullCheckOp extends AMD64LIRInstruction { public NullCheckOp(Variable input, LIRDebugInfo info) { - super("NULL_CHECK", LIRInstruction.NO_OPERANDS, info, new RiValue[] {input}, LIRInstruction.NO_OPERANDS, LIRInstruction.NO_OPERANDS); + super("NULL_CHECK", LIRInstruction.NO_OPERANDS, info, new Value[] {input}, LIRInstruction.NO_OPERANDS, LIRInstruction.NO_OPERANDS); } @Override @@ -240,8 +240,8 @@ public static class CompareAndSwapOp extends AMD64LIRInstruction { - public CompareAndSwapOp(RiValue result, CiAddress address, RiValue cmpValue, RiValue newValue) { - super("CAS", new RiValue[] {result}, null, new RiValue[] {address, cmpValue, newValue}, LIRInstruction.NO_OPERANDS, LIRInstruction.NO_OPERANDS); + public CompareAndSwapOp(Value result, CiAddress address, Value cmpValue, Value newValue) { + super("CAS", new Value[] {result}, null, new Value[] {address, cmpValue, newValue}, LIRInstruction.NO_OPERANDS, LIRInstruction.NO_OPERANDS); } @Override @@ -265,7 +265,7 @@ } - public static void move(TargetMethodAssembler tasm, AMD64MacroAssembler masm, RiValue result, RiValue input) { + public static void move(TargetMethodAssembler tasm, AMD64MacroAssembler masm, Value result, Value input) { if (isRegister(input)) { if (isRegister(result)) { reg2reg(masm, result, input); @@ -293,7 +293,7 @@ } } - private static void reg2reg(AMD64MacroAssembler masm, RiValue result, RiValue input) { + private static void reg2reg(AMD64MacroAssembler masm, Value result, Value input) { if (input.equals(result)) { return; } @@ -308,7 +308,7 @@ } } - private static void reg2stack(TargetMethodAssembler tasm, AMD64MacroAssembler masm, RiValue result, RiValue input) { + private static void reg2stack(TargetMethodAssembler tasm, AMD64MacroAssembler masm, Value result, Value input) { switch (input.kind) { case Jsr: case Int: masm.movl(tasm.asAddress(result), asRegister(input)); break; @@ -320,7 +320,7 @@ } } - private static void stack2reg(TargetMethodAssembler tasm, AMD64MacroAssembler masm, RiValue result, RiValue input) { + private static void stack2reg(TargetMethodAssembler tasm, AMD64MacroAssembler masm, Value result, Value input) { switch (input.kind) { case Jsr: case Int: masm.movl(asRegister(result), tasm.asAddress(input)); break; @@ -332,7 +332,7 @@ } } - private static void const2reg(TargetMethodAssembler tasm, AMD64MacroAssembler masm, RiValue result, Constant input) { + private static void const2reg(TargetMethodAssembler tasm, AMD64MacroAssembler masm, Value result, Constant input) { // Note: we use the kind of the input operand (and not the kind of the result operand) because they don't match // in all cases. For example, an object constant can be loaded to a long register when unsafe casts occurred (e.g., // for a write barrier where arithmetic operations are then performed on the pointer). @@ -384,7 +384,7 @@ } } - private static void const2stack(TargetMethodAssembler tasm, AMD64MacroAssembler masm, RiValue result, Constant input) { + private static void const2stack(TargetMethodAssembler tasm, AMD64MacroAssembler masm, Value result, Constant input) { switch (input.kind.stackKind()) { case Jsr: case Int: masm.movl(tasm.asAddress(result), input.asInt()); break; @@ -404,7 +404,7 @@ } - public static void load(TargetMethodAssembler tasm, AMD64MacroAssembler masm, RiValue result, CiAddress loadAddr, LIRDebugInfo info) { + public static void load(TargetMethodAssembler tasm, AMD64MacroAssembler masm, Value result, CiAddress loadAddr, LIRDebugInfo info) { if (info != null) { tasm.recordImplicitException(masm.codeBuffer.position(), info); } @@ -422,7 +422,7 @@ } } - public static void store(TargetMethodAssembler tasm, AMD64MacroAssembler masm, CiAddress storeAddr, RiValue input, LIRDebugInfo info) { + public static void store(TargetMethodAssembler tasm, AMD64MacroAssembler masm, CiAddress storeAddr, Value input, LIRDebugInfo info) { if (info != null) { tasm.recordImplicitException(masm.codeBuffer.position(), info); } @@ -474,7 +474,7 @@ } } - protected static void compareAndSwap(TargetMethodAssembler tasm, AMD64MacroAssembler masm, RiValue result, CiAddress address, RiValue cmpValue, RiValue newValue) { + protected static void compareAndSwap(TargetMethodAssembler tasm, AMD64MacroAssembler masm, Value result, CiAddress address, Value cmpValue, Value newValue) { assert asRegister(cmpValue) == AMD64.rax && asRegister(result) == AMD64.rax; if (tasm.target.isMP) { diff -r e18ba36bfebc -r bc647d8b0080 graal/com.oracle.graal.lir/src/com/oracle/graal/lir/FrameMap.java --- a/graal/com.oracle.graal.lir/src/com/oracle/graal/lir/FrameMap.java Fri Jun 08 23:41:02 2012 +0200 +++ b/graal/com.oracle.graal.lir/src/com/oracle/graal/lir/FrameMap.java Fri Jun 08 23:44:20 2012 +0200 @@ -323,7 +323,7 @@ * @param registerRefMap A register reference map, as created by {@link #initRegisterRefMap()}. * @param frameRefMap A frame reference map, as created by {@link #initFrameRefMap()}. */ - public void setReference(RiValue location, CiBitMap registerRefMap, CiBitMap frameRefMap) { + public void setReference(Value location, CiBitMap registerRefMap, CiBitMap frameRefMap) { if (location.kind == RiKind.Object) { if (isRegister(location)) { assert registerRefMap.size() == target.arch.registerReferenceMapBitCount; @@ -347,7 +347,7 @@ * @param registerRefMap A register reference map, as created by {@link #initRegisterRefMap()}. * @param frameRefMap A frame reference map, as created by {@link #initFrameRefMap()}. */ - public void clearReference(RiValue location, CiBitMap registerRefMap, CiBitMap frameRefMap) { + public void clearReference(Value location, CiBitMap registerRefMap, CiBitMap frameRefMap) { if (location.kind == RiKind.Object) { if (location instanceof CiRegisterValue) { assert registerRefMap.size() == target.arch.registerReferenceMapBitCount; diff -r e18ba36bfebc -r bc647d8b0080 graal/com.oracle.graal.lir/src/com/oracle/graal/lir/LIR.java --- a/graal/com.oracle.graal.lir/src/com/oracle/graal/lir/LIR.java Fri Jun 08 23:41:02 2012 +0200 +++ b/graal/com.oracle.graal.lir/src/com/oracle/graal/lir/LIR.java Fri Jun 08 23:44:20 2012 +0200 @@ -65,8 +65,8 @@ public SpillMoveFactory spillMoveFactory; public interface SpillMoveFactory { - LIRInstruction createMove(RiValue result, RiValue input); - LIRInstruction createExchange(RiValue input1, RiValue input2); + LIRInstruction createMove(Value result, Value input); + LIRInstruction createExchange(Value input1, Value input2); } private boolean hasArgInCallerFrame; diff -r e18ba36bfebc -r bc647d8b0080 graal/com.oracle.graal.lir/src/com/oracle/graal/lir/LIRDebugInfo.java --- a/graal/com.oracle.graal.lir/src/com/oracle/graal/lir/LIRDebugInfo.java Fri Jun 08 23:41:02 2012 +0200 +++ b/graal/com.oracle.graal.lir/src/com/oracle/graal/lir/LIRDebugInfo.java Fri Jun 08 23:44:20 2012 +0200 @@ -79,9 +79,9 @@ */ private static final EnumSet STATE_FLAGS = EnumSet.of(OperandFlag.Register, OperandFlag.Stack); - private void processValues(RiValue[] values, ValueProcedure proc) { + private void processValues(Value[] values, ValueProcedure proc) { for (int i = 0; i < values.length; i++) { - RiValue value = values[i]; + Value value = values[i]; if (value instanceof CiMonitorValue) { CiMonitorValue monitor = (CiMonitorValue) value; if (processed(monitor.owner)) { @@ -94,7 +94,7 @@ } } - private boolean processed(RiValue value) { + private boolean processed(Value value) { if (isIllegal(value)) { // Ignore dead local variables. return false; diff -r e18ba36bfebc -r bc647d8b0080 graal/com.oracle.graal.lir/src/com/oracle/graal/lir/LIRInstruction.java --- a/graal/com.oracle.graal.lir/src/com/oracle/graal/lir/LIRInstruction.java Fri Jun 08 23:41:02 2012 +0200 +++ b/graal/com.oracle.graal.lir/src/com/oracle/graal/lir/LIRInstruction.java Fri Jun 08 23:44:20 2012 +0200 @@ -36,7 +36,7 @@ */ public abstract class LIRInstruction { - public static final RiValue[] NO_OPERANDS = {}; + public static final Value[] NO_OPERANDS = {}; /** * Iterator for iterating over a list of values. Subclasses must overwrite one of the doValue methods. @@ -50,7 +50,7 @@ * @param value The value that is iterated. * @return The new value to replace the value that was passed in. */ - protected RiValue doValue(RiValue value) { + protected Value doValue(Value value) { throw GraalInternalError.shouldNotReachHere("One of the doValue() methods must be overwritten"); } @@ -63,7 +63,7 @@ * @param flags A set of flags for the value. * @return The new value to replace the value that was passed in. */ - public RiValue doValue(RiValue value, OperandMode mode, EnumSet flags) { + public Value doValue(Value value, OperandMode mode, EnumSet flags) { return doValue(value); } } @@ -164,22 +164,22 @@ /** * The output operands for this instruction (modified by the register allocator). */ - protected RiValue[] outputs; + protected Value[] outputs; /** * The input operands for this instruction (modified by the register allocator). */ - protected RiValue[] inputs; + protected Value[] inputs; /** * The alive operands for this instruction (modified by the register allocator). */ - protected RiValue[] alives; + protected Value[] alives; /** * The temp operands for this instruction (modified by the register allocator). */ - protected RiValue[] temps; + protected Value[] temps; /** * Used to emit debug information. @@ -200,7 +200,7 @@ * @param inputs the input operands for the instruction. * @param temps the temp operands for the instruction. */ - public LIRInstruction(Object opcode, RiValue[] outputs, LIRDebugInfo info, RiValue[] inputs, RiValue[] alives, RiValue[] temps) { + public LIRInstruction(Object opcode, Value[] outputs, LIRDebugInfo info, Value[] inputs, Value[] alives, Value[] temps) { this.code = opcode; this.outputs = outputs; this.inputs = inputs; @@ -227,7 +227,7 @@ * @param index the index of the operand requested. * @return the {@code index}'th input operand. */ - protected final RiValue input(int index) { + protected final Value input(int index) { return inputs[index]; } @@ -237,7 +237,7 @@ * @param index the index of the operand requested. * @return the {@code index}'th alive operand. */ - protected final RiValue alive(int index) { + protected final Value alive(int index) { return alives[index]; } @@ -247,7 +247,7 @@ * @param index the index of the operand requested. * @return the {@code index}'th temp operand. */ - protected final RiValue temp(int index) { + protected final Value temp(int index) { return temps[index]; } @@ -256,7 +256,7 @@ * * @return return the result operand */ - protected final RiValue output(int index) { + protected final Value output(int index) { return outputs[index]; } @@ -273,11 +273,11 @@ private static final EnumSet ADDRESS_FLAGS = EnumSet.of(OperandFlag.Register, OperandFlag.Illegal); - private void forEach(RiValue[] values, OperandMode mode, ValueProcedure proc) { + private void forEach(Value[] values, OperandMode mode, ValueProcedure proc) { for (int i = 0; i < values.length; i++) { assert ALLOWED_FLAGS.get(mode).containsAll(flagsFor(mode, i)); - RiValue value = values[i]; + Value value = values[i]; if (isAddress(value)) { assert flagsFor(mode, i).contains(OperandFlag.Address); CiAddress address = asAddress(value); @@ -338,8 +338,8 @@ * and the value is returned by this method, i.e., clients can stop the iteration once a suitable hint has been found. * @return The non-null value returned by the procedure, or null. */ - public RiValue forEachRegisterHint(RiValue value, OperandMode mode, ValueProcedure proc) { - RiValue[] hints; + public Value forEachRegisterHint(Value value, OperandMode mode, ValueProcedure proc) { + Value[] hints; if (mode == OperandMode.Input) { hints = outputs; } else if (mode == OperandMode.Output) { @@ -349,7 +349,7 @@ } for (int i = 0; i < hints.length; i++) { - RiValue result = proc.doValue(hints[i], null, null); + Value result = proc.doValue(hints[i], null, null); if (result != null) { return result; } @@ -386,7 +386,7 @@ if (outputs.length > 1) { buf.append("("); } - for (RiValue output : outputs) { + for (Value output : outputs) { buf.append(sep).append(output); sep = ", "; } @@ -401,11 +401,11 @@ buf.append("("); } sep = ""; - for (RiValue input : inputs) { + for (Value input : inputs) { buf.append(sep).append(input); sep = ", "; } - for (RiValue input : alives) { + for (Value input : alives) { buf.append(sep).append(input).append(" ~"); sep = ", "; } @@ -417,7 +417,7 @@ buf.append(" ["); } sep = ""; - for (RiValue temp : temps) { + for (Value temp : temps) { buf.append(sep).append(temp); sep = ", "; } diff -r e18ba36bfebc -r bc647d8b0080 graal/com.oracle.graal.lir/src/com/oracle/graal/lir/LIRVerifier.java --- a/graal/com.oracle.graal.lir/src/com/oracle/graal/lir/LIRVerifier.java Fri Jun 08 23:41:02 2012 +0200 +++ b/graal/com.oracle.graal.lir/src/com/oracle/graal/lir/LIRVerifier.java Fri Jun 08 23:44:20 2012 +0200 @@ -54,12 +54,12 @@ return frameMap.target.arch.registers.length; } - private boolean isAllocatableRegister(RiValue value) { + private boolean isAllocatableRegister(Value value) { return isRegister(value) && frameMap.registerConfig.getAttributesMap()[asRegister(value).number].isAllocatable; } public static boolean verify(final LIRInstruction op) { - ValueProcedure allowedProc = new ValueProcedure() { @Override public RiValue doValue(RiValue value, OperandMode mode, EnumSet flags) { return allowed(op, value, mode, flags); } }; + ValueProcedure allowedProc = new ValueProcedure() { @Override public Value doValue(Value value, OperandMode mode, EnumSet flags) { return allowed(op, value, mode, flags); } }; op.forEachInput(allowedProc); op.forEachAlive(allowedProc); @@ -87,21 +87,21 @@ } private BitSet curVariablesLive; - private RiValue[] curRegistersLive; + private Value[] curRegistersLive; private Block curBlock; private Object curInstruction; private BitSet curRegistersDefined; private void verify() { - ValueProcedure useProc = new ValueProcedure() { @Override public RiValue doValue(RiValue value, OperandMode mode, EnumSet flags) { return use(value, mode, flags); } }; - ValueProcedure defProc = new ValueProcedure() { @Override public RiValue doValue(RiValue value, OperandMode mode, EnumSet flags) { return def(value, mode, flags); } }; + ValueProcedure useProc = new ValueProcedure() { @Override public Value doValue(Value value, OperandMode mode, EnumSet flags) { return use(value, mode, flags); } }; + ValueProcedure defProc = new ValueProcedure() { @Override public Value doValue(Value value, OperandMode mode, EnumSet flags) { return def(value, mode, flags); } }; curRegistersDefined = new BitSet(); for (Block block : lir.linearScanOrder()) { curBlock = block; curVariablesLive = new BitSet(); - curRegistersLive = new RiValue[maxRegisterNum()]; + curRegistersLive = new Value[maxRegisterNum()]; if (block.getDominator() != null) { curVariablesLive.or(liveOutFor(block.getDominator())); @@ -110,7 +110,7 @@ assert block.lir.get(0) instanceof StandardOp.LabelOp : "block must start with label"; if (block.numberOfPreds() > 1) { assert block.lir.get(0) instanceof StandardOp.PhiLabelOp : "phi mapping required for multiple predecessors"; - RiValue[] phiDefinitions = ((StandardOp.PhiLabelOp) block.lir.get(0)).getPhiDefinitions(); + Value[] phiDefinitions = ((StandardOp.PhiLabelOp) block.lir.get(0)).getPhiDefinitions(); if (!beforeRegisterAllocation) { assert phiDefinitions.length == 0; } @@ -118,7 +118,7 @@ assert pred.numberOfSux() == 1; LIRInstruction last = pred.lir.get(pred.lir.size() - 1); assert last instanceof StandardOp.PhiJumpOp : "phi mapping required for multiple successors"; - RiValue[] phiUses = ((StandardOp.PhiJumpOp) last).getPhiInputs(); + Value[] phiUses = ((StandardOp.PhiJumpOp) last).getPhiInputs(); if (!beforeRegisterAllocation) { assert phiUses.length == 0; } @@ -152,7 +152,7 @@ } } - private RiValue use(RiValue value, OperandMode mode, EnumSet flags) { + private Value use(Value value, OperandMode mode, EnumSet flags) { allowed(curInstruction, value, mode, flags); if (isVariable(value)) { @@ -185,7 +185,7 @@ return value; } - private RiValue def(RiValue value, OperandMode mode, EnumSet flags) { + private Value def(Value value, OperandMode mode, EnumSet flags) { allowed(curInstruction, value, mode, flags); if (isVariable(value)) { @@ -226,7 +226,7 @@ return value; } - private static RiValue allowed(Object op, RiValue value, OperandMode mode, EnumSet flags) { + private static Value allowed(Object op, Value value, OperandMode mode, EnumSet flags) { if ((isVariable(value) && flags.contains(OperandFlag.Register)) || (isRegister(value) && flags.contains(OperandFlag.Register)) || (isStackSlot(value) && flags.contains(OperandFlag.Stack)) || diff -r e18ba36bfebc -r bc647d8b0080 graal/com.oracle.graal.lir/src/com/oracle/graal/lir/LIRXirInstruction.java --- a/graal/com.oracle.graal.lir/src/com/oracle/graal/lir/LIRXirInstruction.java Fri Jun 08 23:41:02 2012 +0200 +++ b/graal/com.oracle.graal.lir/src/com/oracle/graal/lir/LIRXirInstruction.java Fri Jun 08 23:44:20 2012 +0200 @@ -32,7 +32,7 @@ public abstract class LIRXirInstruction extends LIRInstruction { - public final RiValue[] originalOperands; + public final Value[] originalOperands; public final int outputOperandIndex; public final int[] inputOperandIndices; public final int[] tempOperandIndices; @@ -43,9 +43,9 @@ public LIRXirInstruction(Object opcode, XirSnippet snippet, - RiValue[] originalOperands, - RiValue outputOperand, - RiValue[] inputs, RiValue[] temps, + Value[] originalOperands, + Value outputOperand, + Value[] inputs, Value[] temps, int[] inputOperandIndices, int[] tempOperandIndices, int outputOperandIndex, LIRDebugInfo info, @@ -54,7 +54,7 @@ LabelRef falseSuccessor) { // Note that we register the XIR input operands as Alive, because the XIR specification allows that input operands // are used at any time, even when the temp operands and the actual output operands have already be assigned. - super(opcode, isLegal(outputOperand) ? new RiValue[] {outputOperand} : LIRInstruction.NO_OPERANDS, info, LIRInstruction.NO_OPERANDS, inputs, temps); + super(opcode, isLegal(outputOperand) ? new Value[] {outputOperand} : LIRInstruction.NO_OPERANDS, info, LIRInstruction.NO_OPERANDS, inputs, temps); this.infoAfter = infoAfter; this.snippet = snippet; this.inputOperandIndices = inputOperandIndices; @@ -76,7 +76,7 @@ throw GraalInternalError.shouldNotReachHere(); } - public RiValue[] getOperands() { + public Value[] getOperands() { for (int i = 0; i < inputOperandIndices.length; i++) { originalOperands[inputOperandIndices[i]] = alive(i); } diff -r e18ba36bfebc -r bc647d8b0080 graal/com.oracle.graal.lir/src/com/oracle/graal/lir/StandardOp.java --- a/graal/com.oracle.graal.lir/src/com/oracle/graal/lir/StandardOp.java Fri Jun 08 23:41:02 2012 +0200 +++ b/graal/com.oracle.graal.lir/src/com/oracle/graal/lir/StandardOp.java Fri Jun 08 23:44:20 2012 +0200 @@ -35,7 +35,7 @@ */ public class StandardOp { - private static RiValue[] EMPTY = new RiValue[0]; + private static Value[] EMPTY = new Value[0]; /** * LIR operation that defines the position of a label. @@ -45,7 +45,7 @@ private final Label label; private final boolean align; - protected LabelOp(Object opcode, RiValue[] outputs, LIRDebugInfo info, RiValue[] inputs, RiValue[] alives, RiValue[] temps, Label label, boolean align) { + protected LabelOp(Object opcode, Value[] outputs, LIRDebugInfo info, Value[] inputs, Value[] alives, Value[] temps, Label label, boolean align) { super(opcode, outputs, info, inputs, alives, temps); this.label = label; this.align = align; @@ -79,7 +79,7 @@ } public static class PhiLabelOp extends LabelOp { - public PhiLabelOp(Label label, boolean align, RiValue[] phiDefinitions) { + public PhiLabelOp(Label label, boolean align, Value[] phiDefinitions) { super("PHI_LABEL", phiDefinitions, null, LIRInstruction.NO_OPERANDS, LIRInstruction.NO_OPERANDS, LIRInstruction.NO_OPERANDS, label, align); } @@ -95,7 +95,7 @@ outputs = EMPTY; } - public RiValue[] getPhiDefinitions() { + public Value[] getPhiDefinitions() { return outputs; } } @@ -110,7 +110,7 @@ public static class JumpOp extends LIRInstruction { private final LabelRef destination; - protected JumpOp(Object opcode, RiValue[] outputs, LIRDebugInfo info, RiValue[] inputs, RiValue[] alives, RiValue[] temps, LabelRef destination) { + protected JumpOp(Object opcode, Value[] outputs, LIRDebugInfo info, Value[] inputs, Value[] alives, Value[] temps, LabelRef destination) { super(opcode, outputs, info, inputs, alives, temps); this.destination = destination; } @@ -140,7 +140,7 @@ } public static class PhiJumpOp extends JumpOp { - public PhiJumpOp(LabelRef destination, RiValue[] phiInputs) { + public PhiJumpOp(LabelRef destination, Value[] phiInputs) { super("PHI_JUMP", LIRInstruction.NO_OPERANDS, null, LIRInstruction.NO_OPERANDS, phiInputs, LIRInstruction.NO_OPERANDS, destination); } @@ -156,7 +156,7 @@ alives = EMPTY; } - public RiValue[] getPhiInputs() { + public Value[] getPhiInputs() { return alives; } } @@ -174,8 +174,8 @@ * Marker interface for a LIR operation that moves a value from {@link #getInput()} to {@link #getResult()}. */ public interface MoveOp { - RiValue getInput(); - RiValue getResult(); + Value getInput(); + Value getResult(); } /** @@ -191,7 +191,7 @@ * In particular, it is not the actual method prologue. */ public static final class ParametersOp extends LIRInstruction { - public ParametersOp(RiValue[] params) { + public ParametersOp(Value[] params) { super("PARAMS", params, null, LIRInstruction.NO_OPERANDS, LIRInstruction.NO_OPERANDS, LIRInstruction.NO_OPERANDS); } diff -r e18ba36bfebc -r bc647d8b0080 graal/com.oracle.graal.lir/src/com/oracle/graal/lir/ValueUtil.java --- a/graal/com.oracle.graal.lir/src/com/oracle/graal/lir/ValueUtil.java Fri Jun 08 23:41:02 2012 +0200 +++ b/graal/com.oracle.graal.lir/src/com/oracle/graal/lir/ValueUtil.java Fri Jun 08 23:44:20 2012 +0200 @@ -27,12 +27,12 @@ public class ValueUtil extends CiValueUtil { - public static boolean isVariable(RiValue value) { + public static boolean isVariable(Value value) { assert value != null; return value instanceof Variable; } - public static Variable asVariable(RiValue value) { + public static Variable asVariable(Value value) { assert value != null; return (Variable) value; } diff -r e18ba36bfebc -r bc647d8b0080 graal/com.oracle.graal.lir/src/com/oracle/graal/lir/Variable.java --- a/graal/com.oracle.graal.lir/src/com/oracle/graal/lir/Variable.java Fri Jun 08 23:41:02 2012 +0200 +++ b/graal/com.oracle.graal.lir/src/com/oracle/graal/lir/Variable.java Fri Jun 08 23:44:20 2012 +0200 @@ -29,7 +29,7 @@ * Represents a value that is yet to be bound to a machine location (such as * a {@link CiRegisterValue} or {@link CiStackSlot}) by a register allocator. */ -public final class Variable extends RiValue { +public final class Variable extends Value { private static final long serialVersionUID = 4507578431686109809L; /** diff -r e18ba36bfebc -r bc647d8b0080 graal/com.oracle.graal.lir/src/com/oracle/graal/lir/asm/TargetMethodAssembler.java --- a/graal/com.oracle.graal.lir/src/com/oracle/graal/lir/asm/TargetMethodAssembler.java Fri Jun 08 23:41:02 2012 +0200 +++ b/graal/com.oracle.graal.lir/src/com/oracle/graal/lir/asm/TargetMethodAssembler.java Fri Jun 08 23:44:20 2012 +0200 @@ -219,7 +219,7 @@ * Returns the integer value of any constants that can be represented by a 32-bit integer value, * including long constants that fit into the 32-bit range. */ - public int asIntConst(RiValue value) { + public int asIntConst(Value value) { assert (value.kind.stackKind() == RiKind.Int || value.kind == RiKind.Jsr || value.kind == RiKind.Long) && isConstant(value); long c = ((Constant) value).asLong(); if (!(NumUtil.isInt(c))) { @@ -231,11 +231,11 @@ /** * Returns the address of a float constant that is embedded as a data references into the code. */ - public CiAddress asFloatConstRef(RiValue value) { + public CiAddress asFloatConstRef(Value value) { return asFloatConstRef(value, 4); } - public CiAddress asFloatConstRef(RiValue value, int alignment) { + public CiAddress asFloatConstRef(Value value, int alignment) { assert value.kind == RiKind.Float && isConstant(value); return recordDataReferenceInCode((Constant) value, alignment); } @@ -243,11 +243,11 @@ /** * Returns the address of a double constant that is embedded as a data references into the code. */ - public CiAddress asDoubleConstRef(RiValue value) { + public CiAddress asDoubleConstRef(Value value) { return asDoubleConstRef(value, 8); } - public CiAddress asDoubleConstRef(RiValue value, int alignment) { + public CiAddress asDoubleConstRef(Value value, int alignment) { assert value.kind == RiKind.Double && isConstant(value); return recordDataReferenceInCode((Constant) value, alignment); } @@ -255,37 +255,37 @@ /** * Returns the address of a long constant that is embedded as a data references into the code. */ - public CiAddress asLongConstRef(RiValue value) { + public CiAddress asLongConstRef(Value value) { assert value.kind == RiKind.Long && isConstant(value); return recordDataReferenceInCode((Constant) value, 8); } - public CiAddress asIntAddr(RiValue value) { + public CiAddress asIntAddr(Value value) { assert value.kind == RiKind.Int; return asAddress(value); } - public CiAddress asLongAddr(RiValue value) { + public CiAddress asLongAddr(Value value) { assert value.kind == RiKind.Long; return asAddress(value); } - public CiAddress asObjectAddr(RiValue value) { + public CiAddress asObjectAddr(Value value) { assert value.kind == RiKind.Object; return asAddress(value); } - public CiAddress asFloatAddr(RiValue value) { + public CiAddress asFloatAddr(Value value) { assert value.kind == RiKind.Float; return asAddress(value); } - public CiAddress asDoubleAddr(RiValue value) { + public CiAddress asDoubleAddr(Value value) { assert value.kind == RiKind.Double; return asAddress(value); } - public CiAddress asAddress(RiValue value) { + public CiAddress asAddress(Value value) { if (isStackSlot(value)) { CiStackSlot slot = (CiStackSlot) value; return new CiAddress(slot.kind, frameMap.registerConfig.getFrameRegister().asValue(), frameMap.offsetForStackSlot(slot)); diff -r e18ba36bfebc -r bc647d8b0080 graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/calc/FloatAddNode.java --- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/calc/FloatAddNode.java Fri Jun 08 23:41:02 2012 +0200 +++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/calc/FloatAddNode.java Fri Jun 08 23:44:20 2012 +0200 @@ -65,10 +65,10 @@ @Override public void generate(LIRGeneratorTool gen) { - RiValue op1 = gen.operand(x()); - RiValue op2 = gen.operand(y()); + Value op1 = gen.operand(x()); + Value op2 = gen.operand(y()); if (!y().isConstant() && !livesLonger(this, y(), gen)) { - RiValue op = op1; + Value op = op1; op1 = op2; op2 = op; } diff -r e18ba36bfebc -r bc647d8b0080 graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/calc/FloatMulNode.java --- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/calc/FloatMulNode.java Fri Jun 08 23:41:02 2012 +0200 +++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/calc/FloatMulNode.java Fri Jun 08 23:44:20 2012 +0200 @@ -52,10 +52,10 @@ @Override public void generate(LIRGeneratorTool gen) { - RiValue op1 = gen.operand(x()); - RiValue op2 = gen.operand(y()); + Value op1 = gen.operand(x()); + Value op2 = gen.operand(y()); if (!y().isConstant() && !FloatAddNode.livesLonger(this, y(), gen)) { - RiValue op = op1; + Value op = op1; op1 = op2; op2 = op; } diff -r e18ba36bfebc -r bc647d8b0080 graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/calc/IntegerAddNode.java --- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/calc/IntegerAddNode.java Fri Jun 08 23:41:02 2012 +0200 +++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/calc/IntegerAddNode.java Fri Jun 08 23:44:20 2012 +0200 @@ -98,11 +98,11 @@ @Override public void generate(LIRGeneratorTool gen) { - RiValue op1 = gen.operand(x()); + Value op1 = gen.operand(x()); assert op1 != null : x() + ", this=" + this; - RiValue op2 = gen.operand(y()); + Value op2 = gen.operand(y()); if (!y().isConstant() && !FloatAddNode.livesLonger(this, y(), gen)) { - RiValue op = op1; + Value op = op1; op1 = op2; op2 = op; } diff -r e18ba36bfebc -r bc647d8b0080 graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/calc/IntegerMulNode.java --- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/calc/IntegerMulNode.java Fri Jun 08 23:41:02 2012 +0200 +++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/calc/IntegerMulNode.java Fri Jun 08 23:44:20 2012 +0200 @@ -78,10 +78,10 @@ @Override public void generate(LIRGeneratorTool gen) { - RiValue op1 = gen.operand(x()); - RiValue op2 = gen.operand(y()); + Value op1 = gen.operand(x()); + Value op2 = gen.operand(y()); if (!y().isConstant() && !FloatAddNode.livesLonger(this, y(), gen)) { - RiValue op = op1; + Value op = op1; op1 = op2; op2 = op; } diff -r e18ba36bfebc -r bc647d8b0080 graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/spi/LIRGeneratorTool.java --- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/spi/LIRGeneratorTool.java Fri Jun 08 23:41:02 2012 +0200 +++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/spi/LIRGeneratorTool.java Fri Jun 08 23:44:20 2012 +0200 @@ -48,41 +48,41 @@ */ public abstract boolean canStoreConstant(Constant c); - public abstract RiValue operand(ValueNode object); - public abstract RiValue newVariable(RiKind kind); - public abstract RiValue setResult(ValueNode x, RiValue operand); + public abstract Value operand(ValueNode object); + public abstract Value newVariable(RiKind kind); + public abstract Value setResult(ValueNode x, Value operand); public abstract CiAddress makeAddress(LocationNode location, ValueNode object); - public abstract RiValue emitMove(RiValue input); - public abstract void emitMove(RiValue src, RiValue dst); - public abstract RiValue emitLoad(RiValue loadAddress, boolean canTrap); - public abstract void emitStore(RiValue storeAddress, RiValue input, boolean canTrap); - public abstract RiValue emitLea(RiValue address); + public abstract Value emitMove(Value input); + public abstract void emitMove(Value src, Value dst); + public abstract Value emitLoad(Value loadAddress, boolean canTrap); + public abstract void emitStore(Value storeAddress, Value input, boolean canTrap); + public abstract Value emitLea(Value address); - public abstract RiValue emitNegate(RiValue input); - public abstract RiValue emitAdd(RiValue a, RiValue b); - public abstract RiValue emitSub(RiValue a, RiValue b); - public abstract RiValue emitMul(RiValue a, RiValue b); - public abstract RiValue emitDiv(RiValue a, RiValue b); - public abstract RiValue emitRem(RiValue a, RiValue b); - public abstract RiValue emitUDiv(RiValue a, RiValue b); - public abstract RiValue emitURem(RiValue a, RiValue b); + public abstract Value emitNegate(Value input); + public abstract Value emitAdd(Value a, Value b); + public abstract Value emitSub(Value a, Value b); + public abstract Value emitMul(Value a, Value b); + public abstract Value emitDiv(Value a, Value b); + public abstract Value emitRem(Value a, Value b); + public abstract Value emitUDiv(Value a, Value b); + public abstract Value emitURem(Value a, Value b); - public abstract RiValue emitAnd(RiValue a, RiValue b); - public abstract RiValue emitOr(RiValue a, RiValue b); - public abstract RiValue emitXor(RiValue a, RiValue b); + public abstract Value emitAnd(Value a, Value b); + public abstract Value emitOr(Value a, Value b); + public abstract Value emitXor(Value a, Value b); - public abstract RiValue emitShl(RiValue a, RiValue b); - public abstract RiValue emitShr(RiValue a, RiValue b); - public abstract RiValue emitUShr(RiValue a, RiValue b); + public abstract Value emitShl(Value a, Value b); + public abstract Value emitShr(Value a, Value b); + public abstract Value emitUShr(Value a, Value b); - public abstract RiValue emitConvert(ConvertNode.Op opcode, RiValue inputVal); + public abstract Value emitConvert(ConvertNode.Op opcode, Value inputVal); public abstract void emitMembar(int barriers); public abstract void emitDeoptimizeOnOverflow(CiDeoptAction action, RiDeoptReason reason, Object deoptInfo); public abstract void emitDeoptimize(CiDeoptAction action, RiDeoptReason reason, Object deoptInfo, long leafGraphId); - public abstract RiValue emitCall(Object target, RiKind result, RiKind[] arguments, boolean canTrap, RiValue... args); - public final RiValue emitCall(CiRuntimeCall runtimeCall, boolean canTrap, RiValue... args) { + public abstract Value emitCall(Object target, RiKind result, RiKind[] arguments, boolean canTrap, Value... args); + public final Value emitCall(CiRuntimeCall runtimeCall, boolean canTrap, Value... args) { return emitCall(runtimeCall, runtimeCall.resultKind, runtimeCall.arguments, canTrap, args); } diff -r e18ba36bfebc -r bc647d8b0080 graal/com.oracle.graal.printer/src/com/oracle/graal/printer/CFGPrinter.java --- a/graal/com.oracle.graal.printer/src/com/oracle/graal/printer/CFGPrinter.java Fri Jun 08 23:41:02 2012 +0200 +++ b/graal/com.oracle.graal.printer/src/com/oracle/graal/printer/CFGPrinter.java Fri Jun 08 23:44:20 2012 +0200 @@ -308,7 +308,7 @@ out.print("tid ").print(nodeToString(node)).println(COLUMN_END); if (lirGenerator != null) { - RiValue operand = lirGenerator.nodeOperands.get(node); + Value operand = lirGenerator.nodeOperands.get(node); if (operand != null) { out.print("result ").print(operand.toString()).println(COLUMN_END); } @@ -407,7 +407,7 @@ private String stateValueToString(ValueNode value) { String result = nodeToString(value); if (lirGenerator != null && lirGenerator.nodeOperands != null && value != null) { - RiValue operand = lirGenerator.nodeOperands.get(value); + Value operand = lirGenerator.nodeOperands.get(value); if (operand != null) { result += ": " + operand; } diff -r e18ba36bfebc -r bc647d8b0080 graal/com.oracle.graal.snippets/src/com/oracle/graal/snippets/target/amd64/AMD64MathIntrinsicOp.java --- a/graal/com.oracle.graal.snippets/src/com/oracle/graal/snippets/target/amd64/AMD64MathIntrinsicOp.java Fri Jun 08 23:41:02 2012 +0200 +++ b/graal/com.oracle.graal.snippets/src/com/oracle/graal/snippets/target/amd64/AMD64MathIntrinsicOp.java Fri Jun 08 23:44:20 2012 +0200 @@ -40,15 +40,15 @@ LOG, LOG10; } - public AMD64MathIntrinsicOp(Opcode opcode, RiValue result, RiValue input) { - super(opcode, new RiValue[] {result}, null, new RiValue[] {input}, LIRInstruction.NO_OPERANDS, LIRInstruction.NO_OPERANDS); + public AMD64MathIntrinsicOp(Opcode opcode, Value result, Value input) { + super(opcode, new Value[] {result}, null, new Value[] {input}, LIRInstruction.NO_OPERANDS, LIRInstruction.NO_OPERANDS); } @Override public void emitCode(TargetMethodAssembler tasm, AMD64MacroAssembler masm) { Opcode opcode = (Opcode) code; - RiValue result = output(0); - RiValue input = input(0); + Value result = output(0); + Value input = input(0); switch (opcode) { case SQRT: masm.sqrtsd(asDoubleReg(result), asDoubleReg(input)); break; diff -r e18ba36bfebc -r bc647d8b0080 graal/com.oracle.max.asm/src/com/oracle/max/asm/target/amd64/AMD64Assembler.java --- a/graal/com.oracle.max.asm/src/com/oracle/max/asm/target/amd64/AMD64Assembler.java Fri Jun 08 23:41:02 2012 +0200 +++ b/graal/com.oracle.max.asm/src/com/oracle/max/asm/target/amd64/AMD64Assembler.java Fri Jun 08 23:44:20 2012 +0200 @@ -2217,7 +2217,7 @@ } } - private static boolean needsRex(RiValue value) { + private static boolean needsRex(Value value) { return isRegister(value) && asRegister(value).encoding >= MinEncodingNeedsRex; } diff -r e18ba36bfebc -r bc647d8b0080 graal/com.oracle.max.cri/src/com/oracle/max/cri/xir/CiXirAssembler.java --- a/graal/com.oracle.max.cri/src/com/oracle/max/cri/xir/CiXirAssembler.java Fri Jun 08 23:41:02 2012 +0200 +++ b/graal/com.oracle.max.cri/src/com/oracle/max/cri/xir/CiXirAssembler.java Fri Jun 08 23:44:20 2012 +0200 @@ -246,7 +246,7 @@ } public static class XirRegister extends XirTemp { - public final RiValue register; + public final Value register; XirRegister(CiXirAssembler asm, String name, CiRegisterValue register, boolean reserve) { super(asm, name, register.kind, reserve); diff -r e18ba36bfebc -r bc647d8b0080 graal/com.oracle.max.criutils/src/com/oracle/max/criutils/CompilationPrinter.java --- a/graal/com.oracle.max.criutils/src/com/oracle/max/criutils/CompilationPrinter.java Fri Jun 08 23:41:02 2012 +0200 +++ b/graal/com.oracle.max.criutils/src/com/oracle/max/criutils/CompilationPrinter.java Fri Jun 08 23:44:20 2012 +0200 @@ -170,7 +170,7 @@ return sb.toString(); } - protected String valueToString(RiValue value, List virtualObjects) { + protected String valueToString(Value value, List virtualObjects) { if (value == null) { return "-"; } diff -r e18ba36bfebc -r bc647d8b0080 src/share/vm/classfile/vmSymbols.hpp --- a/src/share/vm/classfile/vmSymbols.hpp Fri Jun 08 23:41:02 2012 +0200 +++ b/src/share/vm/classfile/vmSymbols.hpp Fri Jun 08 23:44:20 2012 +0200 @@ -304,7 +304,7 @@ template(com_oracle_max_cri_ci_CiBitMap, "com/oracle/graal/api/code/CiBitMap") \ template(com_oracle_max_cri_ci_CiDebugInfo, "com/oracle/graal/api/code/CiDebugInfo") \ template(com_oracle_max_cri_ci_CiFrame, "com/oracle/graal/api/code/CiFrame") \ - template(com_oracle_max_cri_ci_CiValue, "com/oracle/graal/api/meta/RiValue") \ + template(com_oracle_max_cri_ci_CiValue, "com/oracle/graal/api/meta/Value") \ template(com_oracle_max_cri_ci_CiStackSlot, "com/oracle/graal/api/code/CiStackSlot") \ template(com_oracle_max_cri_ci_CiRegisterValue, "com/oracle/graal/api/code/CiRegisterValue") \ template(com_oracle_max_cri_ci_CiRegister, "com/oracle/graal/api/code/CiRegister") \ diff -r e18ba36bfebc -r bc647d8b0080 src/share/vm/graal/graalJavaAccess.hpp --- a/src/share/vm/graal/graalJavaAccess.hpp Fri Jun 08 23:41:02 2012 +0200 +++ b/src/share/vm/graal/graalJavaAccess.hpp Fri Jun 08 23:44:20 2012 +0200 @@ -163,7 +163,7 @@ oop_field(GraalBitMap, extra, "[J") \ end_class \ start_class(CiFrame) \ - oop_field(CiFrame, values, "[Lcom/oracle/graal/api/meta/RiValue;") \ + oop_field(CiFrame, values, "[Lcom/oracle/graal/api/meta/Value;") \ int_field(CiFrame, numLocals) \ int_field(CiFrame, numStack) \ int_field(CiFrame, numLocks) \ @@ -211,7 +211,7 @@ end_class \ start_class(CiValue) \ oop_field(CiValue, kind, "Lcom/oracle/graal/api/meta/RiKind;") \ - static_oop_field(CiValue, IllegalValue, "Lcom/oracle/graal/api/meta/RiValue;"); \ + static_oop_field(CiValue, IllegalValue, "Lcom/oracle/graal/api/meta/Value;"); \ end_class \ start_class(CiRegisterValue) \ oop_field(CiRegisterValue, reg, "Lcom/oracle/graal/api/code/CiRegister;") \ @@ -226,11 +226,11 @@ start_class(CiVirtualObject) \ int_field(CiVirtualObject, id) \ oop_field(CiVirtualObject, type, "Lcom/oracle/graal/api/meta/RiType;") \ - oop_field(CiVirtualObject, values, "[Lcom/oracle/graal/api/meta/RiValue;") \ + oop_field(CiVirtualObject, values, "[Lcom/oracle/graal/api/meta/Value;") \ end_class \ start_class(CiMonitorValue) \ - oop_field(CiMonitorValue, owner, "Lcom/oracle/graal/api/meta/RiValue;") \ - oop_field(CiMonitorValue, lockData, "Lcom/oracle/graal/api/meta/RiValue;") \ + oop_field(CiMonitorValue, owner, "Lcom/oracle/graal/api/meta/Value;") \ + oop_field(CiMonitorValue, lockData, "Lcom/oracle/graal/api/meta/Value;") \ boolean_field(CiMonitorValue, eliminated) \ end_class \ /* end*/