Mercurial > hg > graal-compiler
changeset 22400:b611fa9fef24
ValueNode.getKind is really getStackKind
line wrap: on
line diff
--- a/graal/com.oracle.graal.compiler.test/src/com/oracle/graal/compiler/test/PushNodesThroughPiTest.java Sun Aug 02 22:55:04 2015 -0700 +++ b/graal/com.oracle.graal.compiler.test/src/com/oracle/graal/compiler/test/PushNodesThroughPiTest.java Sun Aug 02 22:55:21 2015 -0700 @@ -75,7 +75,7 @@ long disp = address.getOffset().asJavaConstant().asLong(); ResolvedJavaType receiverType = StampTool.typeOrNull(address.getBase()); - ResolvedJavaField field = receiverType.findInstanceFieldWithOffset(disp, rn.getKind()); + ResolvedJavaField field = receiverType.findInstanceFieldWithOffset(disp, rn.getStackKind()); assert field != null : "Node " + rn + " tries to access a field which doesn't exists for this type"; if (field.getName().equals("x")) {
--- a/graal/com.oracle.graal.compiler.test/src/com/oracle/graal/compiler/test/deopt/CompiledMethodTest.java Sun Aug 02 22:55:04 2015 -0700 +++ b/graal/com.oracle.graal.compiler.test/src/com/oracle/graal/compiler/test/deopt/CompiledMethodTest.java Sun Aug 02 22:55:21 2015 -0700 @@ -58,7 +58,7 @@ new DeadCodeEliminationPhase().apply(graph); for (ConstantNode node : ConstantNode.getConstantNodes(graph)) { - if (node.getKind() == Kind.Object && " ".equals(getSnippetReflection().asObject(String.class, node.asJavaConstant()))) { + if (node.getStackKind() == Kind.Object && " ".equals(getSnippetReflection().asObject(String.class, node.asJavaConstant()))) { node.replace(graph, ConstantNode.forConstant(getSnippetReflection().forObject("-"), getMetaAccess(), graph)); } }
--- a/graal/com.oracle.graal.compiler.test/src/com/oracle/graal/compiler/test/tutorial/StaticAnalysis.java Sun Aug 02 22:55:04 2015 -0700 +++ b/graal/com.oracle.graal.compiler.test/src/com/oracle/graal/compiler/test/tutorial/StaticAnalysis.java Sun Aug 02 22:55:21 2015 -0700 @@ -442,7 +442,7 @@ } private boolean isObject(ValueNode node) { - return node.getKind() == Kind.Object; + return node.getStackKind() == Kind.Object; } @Override
--- a/graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/gen/DebugInfoBuilder.java Sun Aug 02 22:55:04 2015 -0700 +++ b/graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/gen/DebugInfoBuilder.java Sun Aug 02 22:55:21 2015 -0700 @@ -95,7 +95,7 @@ if (!currentField.values().get(i).isConstant() || currentField.values().get(i).asJavaConstant().getKind() != Kind.Illegal) { values[pos++] = toValue(currentField.values().get(i)); } else { - assert currentField.values().get(i - 1).getKind() == Kind.Double || currentField.values().get(i - 1).getKind() == Kind.Long : vobj + " " + i + " " + + assert currentField.values().get(i - 1).getStackKind() == Kind.Double || currentField.values().get(i - 1).getStackKind() == Kind.Long : vobj + " " + i + " " + currentField.values().get(i - 1); } }
--- a/graal/com.oracle.graal.hotspot.amd64/src/com/oracle/graal/hotspot/amd64/AMD64RawNativeCallNode.java Sun Aug 02 22:55:04 2015 -0700 +++ b/graal/com.oracle.graal.hotspot.amd64/src/com/oracle/graal/hotspot/amd64/AMD64RawNativeCallNode.java Sun Aug 02 22:55:21 2015 -0700 @@ -59,7 +59,7 @@ CallingConvention cc = generator.getLIRGeneratorTool().getCodeCache().getRegisterConfig().getCallingConvention(Type.NativeCall, returnType, parameterTypes, generator.getLIRGeneratorTool().target(), false); gen.getLIRGeneratorTool().emitCCall(functionPointer.asLong(), cc, parameter, countFloatingTypeArguments(args)); - if (this.getKind() != Kind.Void) { + if (this.getStackKind() != Kind.Void) { generator.setResult(this, gen.getLIRGeneratorTool().emitMove(cc.getReturn())); } } @@ -67,7 +67,7 @@ private static int countFloatingTypeArguments(NodeInputList<ValueNode> args) { int count = 0; for (ValueNode n : args) { - if (n.getKind() == Kind.Double || n.getKind() == Kind.Float) { + if (n.getStackKind() == Kind.Double || n.getStackKind() == Kind.Float) { count++; } }
--- a/graal/com.oracle.graal.hotspot.test/src/com/oracle/graal/hotspot/test/AheadOfTimeCompilationTest.java Sun Aug 02 22:55:04 2015 -0700 +++ b/graal/com.oracle.graal.hotspot.test/src/com/oracle/graal/hotspot/test/AheadOfTimeCompilationTest.java Sun Aug 02 22:55:21 2015 -0700 @@ -81,7 +81,7 @@ public void testStaticFinalObject() { StructuredGraph result = compile("getStaticFinalObject", false); assertDeepEquals(1, getConstantNodes(result).count()); - assertDeepEquals(Kind.Object, getConstantNodes(result).first().getKind()); + assertDeepEquals(Kind.Object, getConstantNodes(result).first().getStackKind()); assertDeepEquals(0, result.getNodes().filter(FloatingReadNode.class).count()); assertDeepEquals(0, result.getNodes().filter(ReadNode.class).count()); } @@ -187,7 +187,7 @@ assertDeepEquals(1, result.getNodes(PiNode.TYPE).count()); assertDeepEquals(1, getConstantNodes(result).count()); ConstantNode constant = getConstantNodes(result).first(); - assertDeepEquals(Kind.Long, constant.getKind()); + assertDeepEquals(Kind.Long, constant.getStackKind()); assertDeepEquals(((HotSpotResolvedObjectType) getMetaAccess().lookupJavaType(Boolean.class)).klass(), constant.asConstant()); } @@ -198,7 +198,7 @@ assertDeepEquals(0, result.getNodes(PiNode.TYPE).count()); assertDeepEquals(1, getConstantNodes(result).count()); ConstantNode constant = getConstantNodes(result).first(); - assertDeepEquals(Kind.Object, constant.getKind()); + assertDeepEquals(Kind.Object, constant.getStackKind()); HotSpotObjectConstantImpl c = (HotSpotObjectConstantImpl) constant.asConstant(); Assert.assertTrue(c.isEqualTo(Boolean.TRUE));
--- a/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/meta/DefaultHotSpotLoweringProvider.java Sun Aug 02 22:55:04 2015 -0700 +++ b/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/meta/DefaultHotSpotLoweringProvider.java Sun Aug 02 22:55:21 2015 -0700 @@ -400,7 +400,7 @@ // mirroring the calculations in c1_GraphBuilder.cpp (setup_osr_entry_block) int localsOffset = (graph.method().getMaxLocals() - 1) * 8; for (OSRLocalNode osrLocal : graph.getNodes(OSRLocalNode.TYPE)) { - int size = osrLocal.getKind().getSlotCount(); + int size = osrLocal.getStackKind().getSlotCount(); int offset = localsOffset - (osrLocal.index() + size - 1) * 8; AddressNode address = createOffsetAddress(graph, buffer, offset); ReadNode load = graph.add(new ReadNode(address, any(), osrLocal.stamp(), BarrierType.NONE)); @@ -461,7 +461,7 @@ } private boolean addReadBarrier(UnsafeLoadNode load) { - if (runtime.getConfig().useG1GC && load.graph().getGuardsStage() == StructuredGraph.GuardsStage.FIXED_DEOPTS && load.object().getKind() == Kind.Object && load.accessKind() == Kind.Object && + if (runtime.getConfig().useG1GC && load.graph().getGuardsStage() == StructuredGraph.GuardsStage.FIXED_DEOPTS && load.object().getStackKind() == Kind.Object && load.accessKind() == Kind.Object && !StampTool.isPointerAlwaysNull(load.object())) { ResolvedJavaType type = StampTool.typeOrNull(load.object()); if (type != null && !type.isArray()) {
--- a/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/meta/HotSpotInvocationPlugins.java Sun Aug 02 22:55:04 2015 -0700 +++ b/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/meta/HotSpotInvocationPlugins.java Sun Aug 02 22:55:21 2015 -0700 @@ -78,7 +78,7 @@ for (Node node : newNodes) { if (node.hasUsages() && node instanceof ConstantNode) { ConstantNode c = (ConstantNode) node; - if (c.getKind() == Kind.Object && AheadOfTimeVerificationPhase.isIllegalObjectConstant(c)) { + if (c.getStackKind() == Kind.Object && AheadOfTimeVerificationPhase.isIllegalObjectConstant(c)) { if (isClass(c)) { // This will be handled later by LoadJavaMirrorWithKlassPhase } else {
--- a/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/phases/AheadOfTimeVerificationPhase.java Sun Aug 02 22:55:04 2015 -0700 +++ b/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/phases/AheadOfTimeVerificationPhase.java Sun Aug 02 22:55:21 2015 -0700 @@ -54,7 +54,7 @@ } private static boolean isObject(ConstantNode node) { - return node.getKind() == Kind.Object; + return node.getStackKind() == Kind.Object; } private static boolean isNullReference(ConstantNode node) {
--- a/graal/com.oracle.graal.java/src/com/oracle/graal/java/BytecodeParser.java Sun Aug 02 22:55:04 2015 -0700 +++ b/graal/com.oracle.graal.java/src/com/oracle/graal/java/BytecodeParser.java Sun Aug 02 22:55:21 2015 -0700 @@ -191,7 +191,7 @@ */ Kind returnKind = parser.currentInvokeReturnType.getKind(); ValueNode tos = frameStateBuilder.pop(returnKind); - assert tos.getKind() == returnVal.getKind(); + assert tos.getStackKind() == returnVal.getStackKind(); FrameState newFrameState = frameStateBuilder.create(parser.stream.nextBCI(), parser.getNonIntrinsicAncestor(), false, new Kind[]{returnKind}, new ValueNode[]{returnVal}); frameState.replaceAndDelete(newFrameState); @@ -1362,7 +1362,7 @@ this.args = args; this.resultType = resultType; this.beforeStackSize = frameState.stackSize(); - this.needsNullCheck = !targetMethod.isStatic() && args[0].getKind() == Kind.Object && !StampTool.isPointerNonNull(args[0].stamp()); + this.needsNullCheck = !targetMethod.isStatic() && args[0].getStackKind() == Kind.Object && !StampTool.isPointerNonNull(args[0].stamp()); this.nodeCount = graph.getNodeCount(); this.mark = graph.getMark(); } @@ -2405,7 +2405,7 @@ } protected void genIf(ValueNode x, Condition cond, ValueNode y) { - assert x.getKind().getStackKind() == y.getKind().getStackKind(); + assert x.getStackKind() == y.getStackKind(); assert currentBlock.getSuccessorCount() == 2; BciBlock trueBlock = currentBlock.getSuccessor(0); BciBlock falseBlock = currentBlock.getSuccessor(1); @@ -2520,15 +2520,15 @@ private LogicNode createLogicNode(Condition cond, ValueNode a, ValueNode b) { LogicNode condition; - assert !a.getKind().isNumericFloat(); + assert !a.getStackKind().isNumericFloat(); if (cond == Condition.EQ || cond == Condition.NE) { - if (a.getKind() == Kind.Object) { + if (a.getStackKind() == Kind.Object) { condition = genObjectEquals(a, b); } else { condition = genIntegerEquals(a, b); } } else { - assert a.getKind() != Kind.Object && !cond.isUnsigned(); + assert a.getStackKind() != Kind.Object && !cond.isUnsigned(); condition = genIntegerLessThan(a, b); } return condition;
--- a/graal/com.oracle.graal.java/src/com/oracle/graal/java/FrameStateBuilder.java Sun Aug 02 22:55:04 2015 -0700 +++ b/graal/com.oracle.graal.java/src/com/oracle/graal/java/FrameStateBuilder.java Sun Aug 02 22:55:21 2015 -0700 @@ -311,7 +311,7 @@ ValueNode x = stack[i]; ValueNode y = other.stack[i]; assert x != null && y != null; - if (x != y && (x == TWO_SLOT_MARKER || x.isDeleted() || y == TWO_SLOT_MARKER || y.isDeleted() || x.getKind() != y.getKind())) { + if (x != y && (x == TWO_SLOT_MARKER || x.isDeleted() || y == TWO_SLOT_MARKER || y.isDeleted() || x.getStackKind() != y.getStackKind())) { return false; } } @@ -376,7 +376,7 @@ if (currentValue == null || currentValue.isDeleted()) { return null; } else if (block.isPhiAtMerge(currentValue)) { - if (otherValue == null || otherValue == TWO_SLOT_MARKER || otherValue.isDeleted() || currentValue.getKind() != otherValue.getKind()) { + if (otherValue == null || otherValue == TWO_SLOT_MARKER || otherValue.isDeleted() || currentValue.getStackKind() != otherValue.getStackKind()) { propagateDelete((ValuePhiNode) currentValue); return null; } @@ -386,7 +386,7 @@ assert !(block instanceof LoopBeginNode) : String.format("Phi functions for loop headers are create eagerly for changed locals and all stack slots: %s != %s", currentValue, otherValue); if (currentValue == TWO_SLOT_MARKER || otherValue == TWO_SLOT_MARKER) { return null; - } else if (otherValue == null || otherValue.isDeleted() || currentValue.getKind() != otherValue.getKind()) { + } else if (otherValue == null || otherValue.isDeleted() || currentValue.getStackKind() != otherValue.getStackKind()) { return null; } return createValuePhi(currentValue, otherValue, block); @@ -504,7 +504,7 @@ * @param object the object whose monitor will be locked. */ public void pushLock(ValueNode object, MonitorIdNode monitorId) { - assert object.isAlive() && object.getKind() == Kind.Object : "unexpected value: " + object; + assert object.isAlive() && object.getStackKind() == Kind.Object : "unexpected value: " + object; lockedObjects = Arrays.copyOf(lockedObjects, lockedObjects.length + 1); monitorIds = Arrays.copyOf(monitorIds, monitorIds.length + 1); lockedObjects[lockedObjects.length - 1] = object; @@ -635,7 +635,7 @@ assert slotKind.getSlotCount() > 0; if (canVerifyKind) { - assert x.getKind().getStackKind() == slotKind.getStackKind(); + assert x.getStackKind() == slotKind.getStackKind(); } return true; } @@ -933,11 +933,11 @@ Debug.log(String.format("| state [nr locals = %d, stack depth = %d, method = %s]", localsSize(), stackSize(), method)); for (int i = 0; i < localsSize(); ++i) { ValueNode value = locals[i]; - Debug.log(String.format("| local[%d] = %-8s : %s", i, value == null ? "bogus" : value == TWO_SLOT_MARKER ? "second" : value.getKind().getJavaName(), value)); + Debug.log(String.format("| local[%d] = %-8s : %s", i, value == null ? "bogus" : value == TWO_SLOT_MARKER ? "second" : value.getStackKind().getJavaName(), value)); } for (int i = 0; i < stackSize(); ++i) { ValueNode value = stack[i]; - Debug.log(String.format("| stack[%d] = %-8s : %s", i, value == null ? "bogus" : value == TWO_SLOT_MARKER ? "second" : value.getKind().getJavaName(), value)); + Debug.log(String.format("| stack[%d] = %-8s : %s", i, value == null ? "bogus" : value == TWO_SLOT_MARKER ? "second" : value.getStackKind().getJavaName(), value)); } } }
--- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/BinaryOpLogicNode.java Sun Aug 02 22:55:04 2015 -0700 +++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/BinaryOpLogicNode.java Sun Aug 02 22:55:21 2015 -0700 @@ -47,7 +47,7 @@ public BinaryOpLogicNode(NodeClass<? extends BinaryOpLogicNode> c, ValueNode x, ValueNode y) { super(c); - assert x != null && y != null && x.getKind() == y.getKind(); + assert x != null && y != null && x.getStackKind() == y.getStackKind(); this.x = x; this.y = y; }
--- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/FrameState.java Sun Aug 02 22:55:04 2015 -0700 +++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/FrameState.java Sun Aug 02 22:55:21 2015 -0700 @@ -143,7 +143,7 @@ * @param bci this must be {@link BytecodeFrame#AFTER_BCI} */ public FrameState(int bci, ValueNode returnValue) { - this(null, null, bci, 0, returnValue.getKind().getSlotCount(), 0, false, false, null, Collections.<EscapeObjectState> emptyList()); + this(null, null, bci, 0, returnValue.getStackKind().getSlotCount(), 0, false, false, null, Collections.<EscapeObjectState> emptyList()); assert bci == BytecodeFrame.AFTER_BCI; this.values.initialize(0, returnValue); } @@ -303,7 +303,7 @@ * {@code pushedValue} which must be of type {@code popKind}. */ public FrameState duplicateModified(Kind popKind, Kind pushedSlotKind, ValueNode pushedValue) { - assert pushedValue != null && pushedValue.getKind() == popKind; + assert pushedValue != null && pushedValue.getStackKind() == popKind; return duplicateModified(graph(), bci, rethrowException, duringCall, popKind, new Kind[]{pushedSlotKind}, new ValueNode[]{pushedValue}); } @@ -325,7 +325,7 @@ copy.remove(copy.size() - 1); } ValueNode lastSlot = copy.get(copy.size() - 1); - assert lastSlot.getKind().getStackKind() == popKind.getStackKind(); + assert lastSlot.getStackKind() == popKind.getStackKind(); copy.remove(copy.size() - 1); } } @@ -531,7 +531,7 @@ assertTrue(locksSize() == monitorIdCount(), "mismatch in number of locks"); for (ValueNode value : values) { assertTrue(value == null || !value.isDeleted(), "frame state must not contain deleted nodes"); - assertTrue(value == null || value instanceof VirtualObjectNode || (value.getKind() != Kind.Void), "unexpected value: %s", value); + assertTrue(value == null || value instanceof VirtualObjectNode || (value.getStackKind() != Kind.Void), "unexpected value: %s", value); } return super.verify(); }
--- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/GuardedValueNode.java Sun Aug 02 22:55:04 2015 -0700 +++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/GuardedValueNode.java Sun Aug 02 22:55:21 2015 -0700 @@ -61,7 +61,7 @@ @Override public void generate(NodeLIRBuilderTool generator) { - if (object.getKind() != Kind.Void && object.getKind() != Kind.Illegal) { + if (object.getStackKind() != Kind.Void && object.getStackKind() != Kind.Illegal) { generator.setResult(this, generator.operand(object)); } }
--- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/IfNode.java Sun Aug 02 22:55:04 2015 -0700 +++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/IfNode.java Sun Aug 02 22:55:21 2015 -0700 @@ -658,10 +658,10 @@ } private ConditionalNode canonicalizeConditionalCascade(ValueNode trueValue, ValueNode falseValue) { - if (trueValue.getKind() != falseValue.getKind()) { + if (trueValue.getStackKind() != falseValue.getStackKind()) { return null; } - if (trueValue.getKind() != Kind.Int && trueValue.getKind() != Kind.Long) { + if (trueValue.getStackKind() != Kind.Int && trueValue.getStackKind() != Kind.Long) { return null; } if (trueValue.isConstant() && falseValue.isConstant()) {
--- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/Invoke.java Sun Aug 02 22:55:04 2015 -0700 +++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/Invoke.java Sun Aug 02 22:55:21 2015 -0700 @@ -86,7 +86,7 @@ @Override default void computeStateDuring(FrameState stateAfter) { - FrameState newStateDuring = stateAfter.duplicateModifiedDuringCall(bci(), asNode().getKind()); + FrameState newStateDuring = stateAfter.duplicateModifiedDuringCall(bci(), asNode().getStackKind()); setStateDuring(newStateDuring); }
--- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/InvokeNode.java Sun Aug 02 22:55:04 2015 -0700 +++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/InvokeNode.java Sun Aug 02 22:55:21 2015 -0700 @@ -93,7 +93,7 @@ @Override public boolean isAllowedUsageType(InputType type) { if (!super.isAllowedUsageType(type)) { - if (getKind() != Kind.Void) { + if (getStackKind() != Kind.Void) { if (callTarget instanceof MethodCallTargetNode && ((MethodCallTargetNode) callTarget).targetMethod().getAnnotation(NodeIntrinsic.class) != null) { return true; }
--- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/InvokeWithExceptionNode.java Sun Aug 02 22:55:04 2015 -0700 +++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/InvokeWithExceptionNode.java Sun Aug 02 22:55:21 2015 -0700 @@ -181,7 +181,7 @@ @Override public void intrinsify(Node node) { - assert !(node instanceof ValueNode) || (((ValueNode) node).getKind() == Kind.Void) == (getKind() == Kind.Void); + assert !(node instanceof ValueNode) || (((ValueNode) node).getStackKind() == Kind.Void) == (getStackKind() == Kind.Void); CallTargetNode call = callTarget; FrameState state = stateAfter(); killExceptionEdge(); @@ -194,7 +194,7 @@ foreign.setBci(bci()); } if (node == null) { - assert getKind() == Kind.Void && hasNoUsages(); + assert getStackKind() == Kind.Void && hasNoUsages(); graph().removeSplit(this, next()); } else if (node instanceof ControlSinkNode) { this.replaceAtPredecessor(node);
--- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/PiNode.java Sun Aug 02 22:55:04 2015 -0700 +++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/PiNode.java Sun Aug 02 22:55:21 2015 -0700 @@ -76,7 +76,7 @@ @Override public void generate(NodeLIRBuilderTool generator) { - if (object.getKind() != Kind.Void && object.getKind() != Kind.Illegal) { + if (object.getStackKind() != Kind.Void && object.getStackKind() != Kind.Illegal) { generator.setResult(this, generator.operand(object)); } }
--- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/UnwindNode.java Sun Aug 02 22:55:04 2015 -0700 +++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/UnwindNode.java Sun Aug 02 22:55:21 2015 -0700 @@ -44,7 +44,7 @@ public UnwindNode(ValueNode exception) { super(TYPE, StampFactory.forVoid()); - assert exception.getKind() == Kind.Object; + assert exception.getStackKind() == Kind.Object; this.exception = exception; }
--- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/ValueNode.java Sun Aug 02 22:55:04 2015 -0700 +++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/ValueNode.java Sun Aug 02 22:55:21 2015 -0700 @@ -34,7 +34,7 @@ * instructions. */ @NodeInfo -public abstract class ValueNode extends com.oracle.graal.graph.Node implements KindProvider { +public abstract class ValueNode extends com.oracle.graal.graph.Node { public static final NodeClass<ValueNode> TYPE = NodeClass.create(ValueNode.class); /** @@ -89,7 +89,7 @@ return false; } - public final Kind getKind() { + public final Kind getStackKind() { return stamp().getStackKind(); } @@ -151,7 +151,7 @@ @Override public boolean isAllowedUsageType(InputType type) { - if (getKind() != Kind.Void && type == InputType.Value) { + if (getStackKind() != Kind.Void && type == InputType.Value) { return true; } else { return super.isAllowedUsageType(type);
--- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/ValueNodeUtil.java Sun Aug 02 22:55:04 2015 -0700 +++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/ValueNodeUtil.java Sun Aug 02 22:55:21 2015 -0700 @@ -33,7 +33,7 @@ public class ValueNodeUtil { public static ValueNode assertKind(Kind kind, ValueNode x) { - assert x != null && x.getKind() == kind : "kind=" + kind + ", value=" + x + ((x == null) ? "" : ", value.kind=" + x.getKind()); + assert x != null && x.getStackKind() == kind : "kind=" + kind + ", value=" + x + ((x == null) ? "" : ", value.kind=" + x.getStackKind()); return x; } @@ -46,27 +46,27 @@ } public static ValueNode assertLong(ValueNode x) { - assert x != null && (x.getKind() == Kind.Long); + assert x != null && (x.getStackKind() == Kind.Long); return x; } public static ValueNode assertInt(ValueNode x) { - assert x != null && (x.getKind() == Kind.Int); + assert x != null && (x.getStackKind() == Kind.Int); return x; } public static ValueNode assertFloat(ValueNode x) { - assert x != null && (x.getKind() == Kind.Float); + assert x != null && (x.getStackKind() == Kind.Float); return x; } public static ValueNode assertObject(ValueNode x) { - assert x != null && (x.getKind() == Kind.Object); + assert x != null && (x.getStackKind() == Kind.Object); return x; } public static ValueNode assertDouble(ValueNode x) { - assert x != null && (x.getKind() == Kind.Double); + assert x != null && (x.getStackKind() == Kind.Double); return x; } @@ -88,14 +88,14 @@ /** * Converts a given instruction to a value string. The representation of an node as a value is * formed by concatenating the {@linkplain jdk.internal.jvmci.meta.Kind#getTypeChar character} - * denoting its {@linkplain ValueNode#getKind kind} and its id. For example, {@code "i13"}. + * denoting its {@linkplain ValueNode#getStackKind kind} and its id. For example, {@code "i13"}. * * @param value the instruction to convert to a value string. If {@code value == null}, then "-" * is returned. * @return the instruction representation as a string */ public static String valueString(ValueNode value) { - return (value == null) ? "-" : ("" + value.getKind().getTypeChar() + value.toString(Verbosity.Id)); + return (value == null) ? "-" : ("" + value.getStackKind().getTypeChar() + value.toString(Verbosity.Id)); } public static ValueNode asNode(MemoryNode node) {
--- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/calc/CompareNode.java Sun Aug 02 22:55:04 2015 -0700 +++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/calc/CompareNode.java Sun Aug 02 22:55:21 2015 -0700 @@ -174,9 +174,9 @@ } public static LogicNode createCompareNode(Condition condition, ValueNode x, ValueNode y, ConstantReflectionProvider constantReflection) { - assert x.getKind() == y.getKind(); + assert x.getStackKind() == y.getStackKind(); assert condition.isCanonical() : "condition is not canonical: " + condition; - assert !x.getKind().isNumericFloat(); + assert !x.getStackKind().isNumericFloat(); LogicNode comparison; if (condition == Condition.EQ) { @@ -185,15 +185,15 @@ } else if (x.stamp() instanceof AbstractPointerStamp) { comparison = PointerEqualsNode.create(x, y); } else { - assert x.getKind().isNumericInteger(); + assert x.getStackKind().isNumericInteger(); comparison = IntegerEqualsNode.create(x, y, constantReflection); } } else if (condition == Condition.LT) { - assert x.getKind().isNumericInteger(); + assert x.getStackKind().isNumericInteger(); comparison = IntegerLessThanNode.create(x, y, constantReflection); } else { assert condition == Condition.BT; - assert x.getKind().isNumericInteger(); + assert x.getStackKind().isNumericInteger(); comparison = IntegerBelowNode.create(x, y, constantReflection); }
--- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/calc/IntegerEqualsNode.java Sun Aug 02 22:55:04 2015 -0700 +++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/calc/IntegerEqualsNode.java Sun Aug 02 22:55:21 2015 -0700 @@ -40,8 +40,8 @@ public IntegerEqualsNode(ValueNode x, ValueNode y) { super(TYPE, Condition.EQ, false, x, y); - assert !x.getKind().isNumericFloat() && x.getKind() != Kind.Object; - assert !y.getKind().isNumericFloat() && y.getKind() != Kind.Object; + assert !x.getStackKind().isNumericFloat() && x.getStackKind() != Kind.Object; + assert !y.getStackKind().isNumericFloat() && y.getStackKind() != Kind.Object; } public static LogicNode create(ValueNode x, ValueNode y, ConstantReflectionProvider constantReflection) { @@ -78,7 +78,7 @@ ValueNode a = mirrored ? normalizeNode.getY() : normalizeNode.getX(); ValueNode b = mirrored ? normalizeNode.getX() : normalizeNode.getY(); - if (normalizeNode.getX().getKind() == Kind.Double || normalizeNode.getX().getKind() == Kind.Float) { + if (normalizeNode.getX().getStackKind() == Kind.Double || normalizeNode.getX().getStackKind() == Kind.Float) { return new FloatEqualsNode(a, b); } else { return new IntegerEqualsNode(a, b); @@ -121,10 +121,10 @@ if (shift.getY().isConstant()) { int mask = shift.getShiftAmountMask(); int amount = shift.getY().asJavaConstant().asInt() & mask; - if (shift.getX().getKind() == Kind.Int) { + if (shift.getX().getStackKind() == Kind.Int) { return new IntegerTestNode(shift.getX(), ConstantNode.forInt(-1 >>> amount)); } else { - assert shift.getX().getKind() == Kind.Long; + assert shift.getX().getStackKind() == Kind.Long; return new IntegerTestNode(shift.getX(), ConstantNode.forLong(-1L >>> amount)); } } @@ -133,10 +133,10 @@ if (shift.getY().isConstant() && ((IntegerStamp) shift.getX().stamp()).isPositive()) { int mask = shift.getShiftAmountMask(); int amount = shift.getY().asJavaConstant().asInt() & mask; - if (shift.getX().getKind() == Kind.Int) { + if (shift.getX().getStackKind() == Kind.Int) { return new IntegerTestNode(shift.getX(), ConstantNode.forInt(-1 << amount)); } else { - assert shift.getX().getKind() == Kind.Long; + assert shift.getX().getStackKind() == Kind.Long; return new IntegerTestNode(shift.getX(), ConstantNode.forLong(-1L << amount)); } } @@ -145,10 +145,10 @@ if (shift.getY().isConstant()) { int mask = shift.getShiftAmountMask(); int amount = shift.getY().asJavaConstant().asInt() & mask; - if (shift.getX().getKind() == Kind.Int) { + if (shift.getX().getStackKind() == Kind.Int) { return new IntegerTestNode(shift.getX(), ConstantNode.forInt(-1 << amount)); } else { - assert shift.getX().getKind() == Kind.Long; + assert shift.getX().getStackKind() == Kind.Long; return new IntegerTestNode(shift.getX(), ConstantNode.forLong(-1L << amount)); } }
--- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/calc/IntegerLessThanNode.java Sun Aug 02 22:55:04 2015 -0700 +++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/calc/IntegerLessThanNode.java Sun Aug 02 22:55:21 2015 -0700 @@ -40,8 +40,8 @@ public IntegerLessThanNode(ValueNode x, ValueNode y) { super(TYPE, Condition.LT, false, x, y); - assert !x.getKind().isNumericFloat() && x.getKind() != Kind.Object; - assert !y.getKind().isNumericFloat() && y.getKind() != Kind.Object; + assert !x.getStackKind().isNumericFloat() && x.getStackKind() != Kind.Object; + assert !y.getStackKind().isNumericFloat() && y.getStackKind() != Kind.Object; } public static LogicNode create(ValueNode x, ValueNode y, ConstantReflectionProvider constantReflection) { @@ -65,7 +65,7 @@ ValueNode a = mirrored ? normalizeNode.getY() : normalizeNode.getX(); ValueNode b = mirrored ? normalizeNode.getX() : normalizeNode.getY(); - if (normalizeNode.getX().getKind() == Kind.Double || normalizeNode.getX().getKind() == Kind.Float) { + if (normalizeNode.getX().getStackKind() == Kind.Double || normalizeNode.getX().getStackKind() == Kind.Float) { return new FloatLessThanNode(a, b, mirrored ^ normalizeNode.isUnorderedLess); } else { return new IntegerLessThanNode(a, b);
--- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/calc/LeftShiftNode.java Sun Aug 02 22:55:04 2015 -0700 +++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/calc/LeftShiftNode.java Sun Aug 02 22:55:21 2015 -0700 @@ -64,14 +64,14 @@ if (other instanceof LeftShiftNode) { int total = amount + otherAmount; if (total != (total & mask)) { - return ConstantNode.forIntegerKind(getKind(), 0); + return ConstantNode.forIntegerKind(getStackKind(), 0); } return new LeftShiftNode(other.getX(), ConstantNode.forInt(total)); } else if ((other instanceof RightShiftNode || other instanceof UnsignedRightShiftNode) && otherAmount == amount) { - if (getKind() == Kind.Long) { + if (getStackKind() == Kind.Long) { return new AndNode(other.getX(), ConstantNode.forLong(-1L << amount)); } else { - assert getKind() == Kind.Int; + assert getStackKind() == Kind.Int; return new AndNode(other.getX(), ConstantNode.forInt(-1 << amount)); } }
--- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/calc/RightShiftNode.java Sun Aug 02 22:55:04 2015 -0700 +++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/calc/RightShiftNode.java Sun Aug 02 22:55:21 2015 -0700 @@ -72,10 +72,10 @@ IntegerStamp istamp = (IntegerStamp) other.getX().stamp(); if (istamp.isPositive()) { - return ConstantNode.forIntegerKind(getKind(), 0); + return ConstantNode.forIntegerKind(getStackKind(), 0); } if (istamp.isStrictlyNegative()) { - return ConstantNode.forIntegerKind(getKind(), -1L); + return ConstantNode.forIntegerKind(getStackKind(), -1L); } /*
--- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/calc/SubNode.java Sun Aug 02 22:55:04 2015 -0700 +++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/calc/SubNode.java Sun Aug 02 22:55:21 2015 -0700 @@ -124,7 +124,7 @@ } if (c instanceof PrimitiveConstant && ((PrimitiveConstant) c).getKind().isNumericInteger()) { long i = ((PrimitiveConstant) c).asLong(); - if (i < 0 || ((IntegerStamp) StampFactory.forKind(forY.getKind())).contains(-i)) { + if (i < 0 || ((IntegerStamp) StampFactory.forKind(forY.getStackKind())).contains(-i)) { // Adding a negative is more friendly to the backend since adds are // commutative, so prefer add when it fits. return BinaryArithmeticNode.add(forX, ConstantNode.forIntegerStamp(stamp(), -i));
--- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/calc/UnsignedRightShiftNode.java Sun Aug 02 22:55:04 2015 -0700 +++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/calc/UnsignedRightShiftNode.java Sun Aug 02 22:55:21 2015 -0700 @@ -64,14 +64,14 @@ if (other instanceof UnsignedRightShiftNode) { int total = amount + otherAmount; if (total != (total & mask)) { - return ConstantNode.forIntegerKind(getKind(), 0); + return ConstantNode.forIntegerKind(getStackKind(), 0); } return new UnsignedRightShiftNode(other.getX(), ConstantNode.forInt(total)); } else if (other instanceof LeftShiftNode && otherAmount == amount) { - if (getKind() == Kind.Long) { + if (getStackKind() == Kind.Long) { return new AndNode(other.getX(), ConstantNode.forLong(-1L >>> amount)); } else { - assert getKind() == Kind.Int; + assert getStackKind() == Kind.Int; return new AndNode(other.getX(), ConstantNode.forInt(-1 >>> amount)); } }
--- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/extended/ForeignCallNode.java Sun Aug 02 22:55:04 2015 -0700 +++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/extended/ForeignCallNode.java Sun Aug 02 22:55:21 2015 -0700 @@ -138,7 +138,7 @@ (currentStateAfter.stackSize() > 1 && currentStateAfter.stackAt(currentStateAfter.stackSize() - 2) == this)) { // The result of this call is on the top of stack, so roll back to the previous bci. assert bci != BytecodeFrame.UNKNOWN_BCI : this; - newStateDuring = currentStateAfter.duplicateModifiedDuringCall(bci, this.getKind()); + newStateDuring = currentStateAfter.duplicateModifiedDuringCall(bci, this.getStackKind()); } else { newStateDuring = currentStateAfter; }
--- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/extended/UnsafeCastNode.java Sun Aug 02 22:55:04 2015 -0700 +++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/extended/UnsafeCastNode.java Sun Aug 02 22:55:21 2015 -0700 @@ -66,7 +66,7 @@ @Override public Node canonical(CanonicalizerTool tool) { - assert getKind() == Kind.Object && object.getKind() == Kind.Object; + assert getStackKind() == Kind.Object && object.getStackKind() == Kind.Object; ObjectStamp my = (ObjectStamp) stamp(); ObjectStamp other = (ObjectStamp) object.stamp(); @@ -104,7 +104,7 @@ @Override public void generate(NodeLIRBuilderTool generator) { - assert getKind() == Kind.Object && object.getKind() == Kind.Object; + assert getStackKind() == Kind.Object && object.getStackKind() == Kind.Object; /* * The LIR only cares about the kind of an operand, not the actual type of an object. So we * do not have to introduce a new operand.
--- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/extended/UnsafeLoadNode.java Sun Aug 02 22:55:04 2015 -0700 +++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/extended/UnsafeLoadNode.java Sun Aug 02 22:55:21 2015 -0700 @@ -72,7 +72,7 @@ if (entryIndex != -1) { ValueNode entry = tool.getEntry(virtual, entryIndex); Kind entryKind = virtual.entryKind(entryIndex); - if (entry.getKind() == getKind() || entryKind == accessKind()) { + if (entry.getStackKind() == getStackKind() || entryKind == accessKind()) { tool.replaceWith(entry); } }
--- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/extended/UnsafeStoreNode.java Sun Aug 02 22:55:04 2015 -0700 +++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/extended/UnsafeStoreNode.java Sun Aug 02 22:55:21 2015 -0700 @@ -90,7 +90,7 @@ if (entryIndex != -1) { Kind entryKind = virtual.entryKind(entryIndex); ValueNode entry = tool.getEntry(virtual, entryIndex); - if (entry.getKind() == value.getKind() || entryKind == accessKind()) { + if (entry.getStackKind() == value.getStackKind() || entryKind == accessKind()) { tool.setVirtualEntry(virtual, entryIndex, value(), true); tool.delete(); } else {
--- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/java/AtomicReadAndAddNode.java Sun Aug 02 22:55:04 2015 -0700 +++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/java/AtomicReadAndAddNode.java Sun Aug 02 22:55:21 2015 -0700 @@ -46,7 +46,7 @@ protected final LocationIdentity locationIdentity; public AtomicReadAndAddNode(AddressNode address, ValueNode delta, LocationIdentity locationIdentity) { - super(TYPE, StampFactory.forKind(delta.getKind())); + super(TYPE, StampFactory.forKind(delta.getStackKind())); this.address = address; this.delta = delta; this.locationIdentity = locationIdentity;
--- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/java/AtomicReadAndWriteNode.java Sun Aug 02 22:55:04 2015 -0700 +++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/java/AtomicReadAndWriteNode.java Sun Aug 02 22:55:21 2015 -0700 @@ -48,7 +48,7 @@ protected final LocationIdentity locationIdentity; public AtomicReadAndWriteNode(ValueNode object, ValueNode offset, ValueNode newValue, Kind valueKind, LocationIdentity locationIdentity) { - super(TYPE, StampFactory.forKind(newValue.getKind())); + super(TYPE, StampFactory.forKind(newValue.getStackKind())); this.object = object; this.offset = offset; this.newValue = newValue;
--- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/java/InstanceOfDynamicNode.java Sun Aug 02 22:55:04 2015 -0700 +++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/java/InstanceOfDynamicNode.java Sun Aug 02 22:55:21 2015 -0700 @@ -55,7 +55,7 @@ super(TYPE); this.mirror = mirror; this.object = object; - assert mirror.getKind() == Kind.Object : mirror.getKind(); + assert mirror.getStackKind() == Kind.Object : mirror.getStackKind(); } @Override
--- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/java/LoweredCompareAndSwapNode.java Sun Aug 02 22:55:04 2015 -0700 +++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/java/LoweredCompareAndSwapNode.java Sun Aug 02 22:55:21 2015 -0700 @@ -67,7 +67,7 @@ public LoweredCompareAndSwapNode(AddressNode address, LocationIdentity location, ValueNode expectedValue, ValueNode newValue, BarrierType barrierType) { super(TYPE, address, location, StampFactory.forKind(Kind.Boolean.getStackKind()), barrierType); - assert expectedValue.getKind() == newValue.getKind(); + assert expectedValue.getStackKind() == newValue.getStackKind(); this.expectedValue = expectedValue; this.newValue = newValue; }
--- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/java/TypeSwitchNode.java Sun Aug 02 22:55:04 2015 -0700 +++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/java/TypeSwitchNode.java Sun Aug 02 22:55:21 2015 -0700 @@ -71,7 +71,7 @@ @Override public boolean isSorted() { - Kind kind = value().getKind(); + Kind kind = value().getStackKind(); if (kind.isNumericInteger()) { JavaConstant lastKey = null; for (int i = 0; i < keyCount(); i++) {
--- a/graal/com.oracle.graal.phases.common/src/com/oracle/graal/phases/common/ConditionalEliminationPhase.java Sun Aug 02 22:55:04 2015 -0700 +++ b/graal/com.oracle.graal.phases.common/src/com/oracle/graal/phases/common/ConditionalEliminationPhase.java Sun Aug 02 22:55:21 2015 -0700 @@ -194,7 +194,7 @@ // this piece of code handles phis if (!(merge instanceof LoopBeginNode)) { for (PhiNode phi : merge.phis()) { - if (phi instanceof ValuePhiNode && phi.getKind() == Kind.Object) { + if (phi instanceof ValuePhiNode && phi.getStackKind() == Kind.Object) { ValueNode firstValue = phi.valueAt(0); ResolvedJavaType type = getNodeType(firstValue); boolean nonNull = knownNonNull.contains(firstValue); @@ -452,13 +452,13 @@ return null; } IntegerBelowNode below = (IntegerBelowNode) guard.condition(); - if (below.getX().getKind() == Kind.Int && below.getX().isConstant() && !below.getY().isConstant()) { + if (below.getX().getStackKind() == Kind.Int && below.getX().isConstant() && !below.getY().isConstant()) { Stamp stamp = StampTool.unsignedCompare(below.getX().stamp(), below.getY().stamp()); if (stamp != null) { return new GuardedStamp(below.getY(), stamp, guard); } } - if (below.getY().getKind() == Kind.Int && below.getY().isConstant() && !below.getX().isConstant()) { + if (below.getY().getStackKind() == Kind.Int && below.getY().isConstant() && !below.getX().isConstant()) { Stamp stamp = StampTool.unsignedCompare(below.getX().stamp(), below.getY().stamp()); if (stamp != null) { return new GuardedStamp(below.getX(), stamp, guard);
--- a/graal/com.oracle.graal.phases.common/src/com/oracle/graal/phases/common/DeoptimizationGroupingPhase.java Sun Aug 02 22:55:04 2015 -0700 +++ b/graal/com.oracle.graal.phases.common/src/com/oracle/graal/phases/common/DeoptimizationGroupingPhase.java Sun Aug 02 22:55:21 2015 -0700 @@ -58,8 +58,8 @@ EndNode firstEnd = graph.add(new EndNode()); ValueNode actionAndReason = ((AbstractDeoptimizeNode) target).getActionAndReason(context.getMetaAccess()); ValueNode speculation = ((AbstractDeoptimizeNode) target).getSpeculation(context.getMetaAccess()); - reasonActionPhi = graph.addWithoutUnique(new ValuePhiNode(StampFactory.forKind(actionAndReason.getKind()), merge)); - speculationPhi = graph.addWithoutUnique(new ValuePhiNode(StampFactory.forKind(speculation.getKind()), merge)); + reasonActionPhi = graph.addWithoutUnique(new ValuePhiNode(StampFactory.forKind(actionAndReason.getStackKind()), merge)); + speculationPhi = graph.addWithoutUnique(new ValuePhiNode(StampFactory.forKind(speculation.getStackKind()), merge)); merge.addForwardEnd(firstEnd); reasonActionPhi.addInput(actionAndReason); speculationPhi.addInput(speculation);
--- a/graal/com.oracle.graal.phases.common/src/com/oracle/graal/phases/common/inlining/InliningUtil.java Sun Aug 02 22:55:04 2015 -0700 +++ b/graal/com.oracle.graal.phases.common/src/com/oracle/graal/phases/common/inlining/InliningUtil.java Sun Aug 02 22:55:21 2015 -0700 @@ -447,7 +447,7 @@ protected static void processFrameStates(Invoke invoke, StructuredGraph inlineGraph, Map<Node, Node> duplicates, FrameState stateAtExceptionEdge, boolean alwaysDuplicateStateAfter) { FrameState stateAtReturn = invoke.stateAfter(); FrameState outerFrameState = null; - Kind invokeReturnKind = invoke.asNode().getKind(); + Kind invokeReturnKind = invoke.asNode().getStackKind(); for (FrameState original : inlineGraph.getNodes(FrameState.TYPE)) { FrameState frameState = (FrameState) duplicates.get(original); if (frameState != null && frameState.isAlive()) { @@ -463,7 +463,7 @@ boolean alwaysDuplicateStateAfter) { FrameState stateAtReturn = invoke.stateAfter(); - Kind invokeReturnKind = invoke.asNode().getKind(); + Kind invokeReturnKind = invoke.asNode().getStackKind(); if (frameState.bci == BytecodeFrame.AFTER_BCI) { FrameState stateAfterReturn = stateAtReturn; @@ -654,7 +654,7 @@ assert !callTarget.isStatic() : callTarget.targetMethod(); StructuredGraph graph = callTarget.graph(); ValueNode firstParam = callTarget.arguments().get(0); - if (firstParam.getKind() == Kind.Object) { + if (firstParam.getStackKind() == Kind.Object) { Stamp paramStamp = firstParam.stamp(); Stamp stamp = paramStamp.join(StampFactory.declaredNonNull(callTarget.targetMethod().getDeclaringClass())); if (!StampTool.isPointerNonNull(firstParam)) {
--- a/graal/com.oracle.graal.phases.common/src/com/oracle/graal/phases/common/inlining/info/MultiTypeGuardInlineInfo.java Sun Aug 02 22:55:04 2015 -0700 +++ b/graal/com.oracle.graal.phases.common/src/com/oracle/graal/phases/common/inlining/info/MultiTypeGuardInlineInfo.java Sun Aug 02 22:55:21 2015 -0700 @@ -169,7 +169,7 @@ returnMerge.setStateAfter(invoke.stateAfter()); PhiNode returnValuePhi = null; - if (invoke.asNode().getKind() != Kind.Void) { + if (invoke.asNode().getStackKind() != Kind.Void) { returnValuePhi = graph.addWithoutUnique(new ValuePhiNode(invoke.asNode().stamp().unrestricted(), returnMerge)); } @@ -363,7 +363,7 @@ result.asNode().replaceFirstInput(result.callTarget(), callTarget); result.setUseForInlining(useForInlining); - Kind kind = invoke.asNode().getKind(); + Kind kind = invoke.asNode().getStackKind(); if (kind != Kind.Void) { FrameState stateAfter = invoke.stateAfter(); stateAfter = stateAfter.duplicate(stateAfter.bci);
--- a/graal/com.oracle.graal.printer/src/com/oracle/graal/printer/CFGPrinter.java Sun Aug 02 22:55:04 2015 -0700 +++ b/graal/com.oracle.graal.printer/src/com/oracle/graal/printer/CFGPrinter.java Sun Aug 02 22:55:21 2015 -0700 @@ -483,10 +483,10 @@ prefix = "B"; } else if (node instanceof ValueNode) { ValueNode value = (ValueNode) node; - if (value.getKind() == Kind.Illegal) { + if (value.getStackKind() == Kind.Illegal) { prefix = "v"; } else { - prefix = String.valueOf(value.getKind().getTypeChar()); + prefix = String.valueOf(value.getStackKind().getTypeChar()); } } else { prefix = "?";
--- a/graal/com.oracle.graal.replacements.amd64/src/com/oracle/graal/replacements/amd64/AMD64CountLeadingZerosNode.java Sun Aug 02 22:55:04 2015 -0700 +++ b/graal/com.oracle.graal.replacements.amd64/src/com/oracle/graal/replacements/amd64/AMD64CountLeadingZerosNode.java Sun Aug 02 22:55:21 2015 -0700 @@ -42,12 +42,12 @@ public AMD64CountLeadingZerosNode(ValueNode value) { super(TYPE, StampFactory.forInteger(Kind.Int, 0, ((PrimitiveStamp) value.stamp()).getBits()), value); - assert value.getKind() == Kind.Int || value.getKind() == Kind.Long; + assert value.getStackKind() == Kind.Int || value.getStackKind() == Kind.Long; } @Override public boolean inferStamp() { - assert value.getKind() == Kind.Int || value.getKind() == Kind.Long; + assert value.getStackKind() == Kind.Int || value.getStackKind() == Kind.Long; IntegerStamp valueStamp = (IntegerStamp) getValue().stamp(); long mask = CodeUtil.mask(valueStamp.getBits()); // Don't count zeros from the mask in the result. @@ -61,7 +61,7 @@ public static ValueNode tryFold(ValueNode value) { if (value.isConstant()) { JavaConstant c = value.asJavaConstant(); - if (value.getKind() == Kind.Int) { + if (value.getStackKind() == Kind.Int) { return ConstantNode.forInt(Integer.numberOfLeadingZeros(c.asInt())); } else { return ConstantNode.forInt(Long.numberOfLeadingZeros(c.asLong()));
--- a/graal/com.oracle.graal.replacements.amd64/src/com/oracle/graal/replacements/amd64/AMD64CountTrailingZerosNode.java Sun Aug 02 22:55:04 2015 -0700 +++ b/graal/com.oracle.graal.replacements.amd64/src/com/oracle/graal/replacements/amd64/AMD64CountTrailingZerosNode.java Sun Aug 02 22:55:21 2015 -0700 @@ -42,7 +42,7 @@ public AMD64CountTrailingZerosNode(ValueNode value) { super(TYPE, StampFactory.forInteger(Kind.Int, 0, ((PrimitiveStamp) value.stamp()).getBits()), value); - assert value.getKind() == Kind.Int || value.getKind() == Kind.Long; + assert value.getStackKind() == Kind.Int || value.getStackKind() == Kind.Long; } @Override @@ -57,7 +57,7 @@ public static ValueNode tryFold(ValueNode value) { if (value.isConstant()) { JavaConstant c = value.asJavaConstant(); - if (value.getKind() == Kind.Int) { + if (value.getStackKind() == Kind.Int) { return ConstantNode.forInt(Integer.numberOfTrailingZeros(c.asInt())); } else { return ConstantNode.forInt(Long.numberOfTrailingZeros(c.asLong()));
--- a/graal/com.oracle.graal.replacements/src/com/oracle/graal/replacements/DefaultJavaLoweringProvider.java Sun Aug 02 22:55:04 2015 -0700 +++ b/graal/com.oracle.graal.replacements/src/com/oracle/graal/replacements/DefaultJavaLoweringProvider.java Sun Aug 02 22:55:21 2015 -0700 @@ -143,7 +143,7 @@ } protected void lowerLoadFieldNode(LoadFieldNode loadField, LoweringTool tool) { - assert loadField.getKind() != Kind.Illegal; + assert loadField.getStackKind() != Kind.Illegal; StructuredGraph graph = loadField.graph(); ResolvedJavaField field = loadField.field(); ValueNode object = loadField.isStatic() ? staticFieldBase(graph, field) : loadField.object(); @@ -395,7 +395,7 @@ protected void lowerUnsafeStoreNode(UnsafeStoreNode store) { StructuredGraph graph = store.graph(); - boolean compressible = store.value().getKind() == Kind.Object; + boolean compressible = store.value().getStackKind() == Kind.Object; Kind valueKind = store.accessKind(); ValueNode value = implicitStoreConvert(graph, valueKind, store.value(), compressible); AddressNode address = createUnsafeAddress(graph, store.object(), store.offset()); @@ -463,7 +463,7 @@ omittedValues.set(valuePos); } else if (!(value.isConstant() && value.asConstant().isDefaultForKind())) { // Constant.illegal is always the defaultForKind, so it is skipped - Kind valueKind = value.getKind(); + Kind valueKind = value.getStackKind(); Kind entryKind = virtual.entryKind(i); // Truffle requires some leniency in terms of what can be put where: @@ -503,7 +503,7 @@ assert value instanceof VirtualObjectNode; ValueNode allocValue = allocations[commit.getVirtualObjects().indexOf(value)]; if (!(allocValue.isConstant() && allocValue.asConstant().isDefaultForKind())) { - assert virtual.entryKind(i) == Kind.Object && allocValue.getKind() == Kind.Object; + assert virtual.entryKind(i) == Kind.Object && allocValue.getStackKind() == Kind.Object; AddressNode address; BarrierType barrierType; if (virtual instanceof VirtualInstanceNode) { @@ -601,7 +601,7 @@ } protected BarrierType storeBarrierType(ValueNode object, ValueNode value) { - if (value.getKind() == Kind.Object) { + if (value.getStackKind() == Kind.Object) { ResolvedJavaType type = StampTool.typeOrNull(object); if (type != null && !type.isArray()) { return BarrierType.IMPRECISE;
--- a/graal/com.oracle.graal.replacements/src/com/oracle/graal/replacements/GraphKit.java Sun Aug 02 22:55:04 2015 -0700 +++ b/graal/com.oracle.graal.replacements/src/com/oracle/graal/replacements/GraphKit.java Sun Aug 02 22:55:21 2015 -0700 @@ -157,11 +157,11 @@ InvokeNode invoke = append(new InvokeNode(callTarget, bci)); if (frameStateBuilder != null) { - if (invoke.getKind() != Kind.Void) { + if (invoke.getStackKind() != Kind.Void) { frameStateBuilder.push(returnType.getKind(), invoke); } invoke.setStateAfter(frameStateBuilder.create(bci, invoke)); - if (invoke.getKind() != Kind.Void) { + if (invoke.getStackKind() != Kind.Void) { frameStateBuilder.pop(returnType.getKind()); } }
--- a/graal/com.oracle.graal.replacements/src/com/oracle/graal/replacements/NodeIntrinsificationPhase.java Sun Aug 02 22:55:04 2015 -0700 +++ b/graal/com.oracle.graal.replacements/src/com/oracle/graal/replacements/NodeIntrinsificationPhase.java Sun Aug 02 22:55:21 2015 -0700 @@ -432,7 +432,7 @@ } public void cleanUpReturnCheckCast(Node newInstance) { - if (newInstance instanceof ValueNode && (((ValueNode) newInstance).getKind() != Kind.Object || ((ValueNode) newInstance).stamp() == StampFactory.forNodeIntrinsic())) { + if (newInstance instanceof ValueNode && (((ValueNode) newInstance).getStackKind() != Kind.Object || ((ValueNode) newInstance).stamp() == StampFactory.forNodeIntrinsic())) { StructuredGraph graph = (StructuredGraph) newInstance.graph(); for (CheckCastNode checkCastNode : newInstance.usages().filter(CheckCastNode.class).snapshot()) { for (Node checkCastUsage : checkCastNode.usages().snapshot()) {
--- a/graal/com.oracle.graal.replacements/src/com/oracle/graal/replacements/NodeIntrinsificationPlugin.java Sun Aug 02 22:55:04 2015 -0700 +++ b/graal/com.oracle.graal.replacements/src/com/oracle/graal/replacements/NodeIntrinsificationPlugin.java Sun Aug 02 22:55:21 2015 -0700 @@ -183,10 +183,10 @@ } if (returnKind != Kind.Void) { - assert nonValueType || res.getKind().getStackKind() != Kind.Void; + assert nonValueType || res.getStackKind() != Kind.Void; res = b.addPush(returnKind, res); } else { - assert res.getKind().getStackKind() == Kind.Void; + assert res.getStackKind() == Kind.Void; res = b.add(res); }
--- a/graal/com.oracle.graal.replacements/src/com/oracle/graal/replacements/PEGraphDecoder.java Sun Aug 02 22:55:04 2015 -0700 +++ b/graal/com.oracle.graal.replacements/src/com/oracle/graal/replacements/PEGraphDecoder.java Sun Aug 02 22:55:21 2015 -0700 @@ -617,7 +617,7 @@ stateAtReturn = (FrameState) decodeFloatingNode(methodScope.caller, methodScope.callerLoopScope, methodScope.invokeData.stateAfterOrderId); } - Kind invokeReturnKind = methodScope.invokeData.invoke.asNode().getKind(); + Kind invokeReturnKind = methodScope.invokeData.invoke.asNode().getStackKind(); FrameState outerState = stateAtReturn.duplicateModified(methodScope.graph, methodScope.invokeData.invoke.bci(), stateAtReturn.rethrowException(), true, invokeReturnKind, null, null); /*
--- a/graal/com.oracle.graal.replacements/src/com/oracle/graal/replacements/SnippetTemplate.java Sun Aug 02 22:55:04 2015 -0700 +++ b/graal/com.oracle.graal.replacements/src/com/oracle/graal/replacements/SnippetTemplate.java Sun Aug 02 22:55:21 2015 -0700 @@ -921,7 +921,7 @@ if (argument instanceof ValueNode) { replacements.put((ParameterNode) parameter, (ValueNode) argument); } else { - Kind kind = ((ParameterNode) parameter).getKind(); + Kind kind = ((ParameterNode) parameter).getStackKind(); assert argument != null || kind == Kind.Object : this + " cannot accept null for non-object parameter named " + args.info.getParameterName(i); JavaConstant constant = forBoxed(argument, kind); replacements.put((ParameterNode) parameter, ConstantNode.forConstant(constant, metaAccess, replaceeGraph)); @@ -948,7 +948,7 @@ if (value instanceof ValueNode) { replacements.put(param, (ValueNode) value); } else { - JavaConstant constant = forBoxed(value, param.getKind()); + JavaConstant constant = forBoxed(value, param.getStackKind()); ConstantNode element = ConstantNode.forConstant(constant, metaAccess, replaceeGraph); replacements.put(param, element); } @@ -1404,10 +1404,10 @@ buf.append("<constant> ").append(name); } else if (value instanceof ParameterNode) { ParameterNode param = (ParameterNode) value; - buf.append(param.getKind().getJavaName()).append(' ').append(name); + buf.append(param.getStackKind().getJavaName()).append(' ').append(name); } else { ParameterNode[] params = (ParameterNode[]) value; - String kind = params.length == 0 ? "?" : params[0].getKind().getJavaName(); + String kind = params.length == 0 ? "?" : params[0].getStackKind().getJavaName(); buf.append(kind).append('[').append(params.length).append("] ").append(name); } }
--- a/graal/com.oracle.graal.replacements/src/com/oracle/graal/replacements/StandardGraphBuilderPlugins.java Sun Aug 02 22:55:04 2015 -0700 +++ b/graal/com.oracle.graal.replacements/src/com/oracle/graal/replacements/StandardGraphBuilderPlugins.java Sun Aug 02 22:55:21 2015 -0700 @@ -651,7 +651,7 @@ public boolean apply(GraphBuilderContext b, ResolvedJavaMethod targetMethod, Receiver receiver, ValueNode value) { ObjectStamp objectStamp = (ObjectStamp) value.stamp(); if (objectStamp.nonNull()) { - b.addPush(value.getKind(), value); + b.addPush(value.getStackKind(), value); return true; } else if (objectStamp.alwaysNull()) { b.add(new DeoptimizeNode(DeoptimizationAction.None, DeoptimizationReason.NullCheckException)); @@ -660,7 +660,7 @@ IsNullNode isNull = b.add(new IsNullNode(value)); FixedGuardNode fixedGuard = b.add(new FixedGuardNode(isNull, DeoptimizationReason.NullCheckException, DeoptimizationAction.None, true)); Stamp newStamp = objectStamp.improveWith(StampFactory.objectNonNull()); - b.addPush(value.getKind(), new PiNode(value, newStamp, fixedGuard)); + b.addPush(value.getStackKind(), new PiNode(value, newStamp, fixedGuard)); return true; } });
--- a/graal/com.oracle.graal.replacements/src/com/oracle/graal/replacements/WordOperationPlugin.java Sun Aug 02 22:55:04 2015 -0700 +++ b/graal/com.oracle.graal.replacements/src/com/oracle/graal/replacements/WordOperationPlugin.java Sun Aug 02 22:55:21 2015 -0700 @@ -138,13 +138,13 @@ ResolvedJavaType arrayType = StampTool.typeOrNull(array); if (arrayType != null && wordTypes.isWord(arrayType.getComponentType())) { assert elementKind == Kind.Object; - if (value.getKind() != wordTypes.getWordKind()) { + if (value.getStackKind() != wordTypes.getWordKind()) { throw b.bailout("Cannot store a non-word value into a word array: " + arrayType.toJavaName(true)); } b.add(createStoreIndexedNode(array, index, value)); return true; } - if (elementKind == Kind.Object && value.getKind() == wordTypes.getWordKind()) { + if (elementKind == Kind.Object && value.getStackKind() == wordTypes.getWordKind()) { throw b.bailout("Cannot store a word value into a non-word array: " + arrayType.toJavaName(true)); } return false; @@ -157,13 +157,13 @@ @Override public boolean handleCheckCast(GraphBuilderContext b, ValueNode object, ResolvedJavaType type, JavaTypeProfile profile) { if (!wordTypes.isWord(type)) { - if (object.getKind() != Kind.Object) { + if (object.getStackKind() != Kind.Object) { throw b.bailout("Cannot cast a word value to a non-word type: " + type.toJavaName(true)); } return false; } - if (object.getKind() != wordTypes.getWordKind()) { + if (object.getStackKind() != wordTypes.getWordKind()) { throw b.bailout("Cannot cast a non-word value to a word type: " + type.toJavaName(true)); } b.push(Kind.Object, object); @@ -174,7 +174,7 @@ public boolean handleInstanceOf(GraphBuilderContext b, ValueNode object, ResolvedJavaType type, JavaTypeProfile profile) { if (wordTypes.isWord(type)) { throw b.bailout("Cannot use instanceof for word a type: " + type.toJavaName(true)); - } else if (object.getKind() != Kind.Object) { + } else if (object.getStackKind() != Kind.Object) { throw b.bailout("Cannot use instanceof on a word value: " + type.toJavaName(true)); } return false; @@ -307,7 +307,7 @@ } private ValueNode comparisonOp(GraphBuilderContext graph, Condition condition, ValueNode left, ValueNode right) { - assert left.getKind() == wordKind && right.getKind() == wordKind; + assert left.getStackKind() == wordKind && right.getStackKind() == wordKind; // mirroring gets the condition into canonical form boolean mirror = condition.canonicalMirror(); @@ -379,16 +379,16 @@ } public ValueNode convert(GraphBuilderContext b, ValueNode value, Kind toKind, boolean unsigned) { - if (value.getKind() == toKind) { + if (value.getStackKind() == toKind) { return value; } if (toKind == Kind.Int) { - assert value.getKind() == Kind.Long; + assert value.getStackKind() == Kind.Long; return b.add(new NarrowNode(value, 32)); } else { assert toKind == Kind.Long; - assert value.getKind().getStackKind() == Kind.Int; + assert value.getStackKind() == Kind.Int; if (unsigned) { return b.add(new ZeroExtendNode(value, 64)); } else {
--- a/graal/com.oracle.graal.replacements/src/com/oracle/graal/replacements/nodes/BasicArrayCopyNode.java Sun Aug 02 22:55:04 2015 -0700 +++ b/graal/com.oracle.graal.replacements/src/com/oracle/graal/replacements/nodes/BasicArrayCopyNode.java Sun Aug 02 22:55:21 2015 -0700 @@ -243,7 +243,7 @@ } public void computeStateDuring(FrameState currentStateAfter) { - FrameState newStateDuring = currentStateAfter.duplicateModifiedDuringCall(getBci(), asNode().getKind()); + FrameState newStateDuring = currentStateAfter.duplicateModifiedDuringCall(getBci(), asNode().getStackKind()); setStateDuring(newStateDuring); } }
--- a/graal/com.oracle.graal.replacements/src/com/oracle/graal/replacements/nodes/BitCountNode.java Sun Aug 02 22:55:04 2015 -0700 +++ b/graal/com.oracle.graal.replacements/src/com/oracle/graal/replacements/nodes/BitCountNode.java Sun Aug 02 22:55:21 2015 -0700 @@ -40,7 +40,7 @@ public BitCountNode(ValueNode value) { super(TYPE, StampFactory.forInteger(Kind.Int, 0, ((PrimitiveStamp) value.stamp()).getBits()), value); - assert value.getKind() == Kind.Int || value.getKind() == Kind.Long; + assert value.getStackKind() == Kind.Int || value.getStackKind() == Kind.Long; } @Override @@ -55,7 +55,7 @@ public ValueNode canonical(CanonicalizerTool tool, ValueNode forValue) { if (forValue.isConstant()) { JavaConstant c = forValue.asJavaConstant(); - return ConstantNode.forInt(forValue.getKind() == Kind.Int ? Integer.bitCount(c.asInt()) : Long.bitCount(c.asLong())); + return ConstantNode.forInt(forValue.getStackKind() == Kind.Int ? Integer.bitCount(c.asInt()) : Long.bitCount(c.asLong())); } return this; }
--- a/graal/com.oracle.graal.replacements/src/com/oracle/graal/replacements/nodes/BitScanForwardNode.java Sun Aug 02 22:55:04 2015 -0700 +++ b/graal/com.oracle.graal.replacements/src/com/oracle/graal/replacements/nodes/BitScanForwardNode.java Sun Aug 02 22:55:21 2015 -0700 @@ -44,7 +44,7 @@ public BitScanForwardNode(ValueNode value) { super(TYPE, StampFactory.forInteger(Kind.Int, 0, ((PrimitiveStamp) value.stamp()).getBits()), value); - assert value.getKind() == Kind.Int || value.getKind() == Kind.Long; + assert value.getStackKind() == Kind.Int || value.getStackKind() == Kind.Long; } @Override @@ -71,7 +71,7 @@ if (forValue.isConstant()) { JavaConstant c = forValue.asJavaConstant(); if (c.asLong() != 0) { - return ConstantNode.forInt(forValue.getKind() == Kind.Int ? scan(c.asInt()) : scan(c.asLong())); + return ConstantNode.forInt(forValue.getStackKind() == Kind.Int ? scan(c.asInt()) : scan(c.asLong())); } } return this;
--- a/graal/com.oracle.graal.replacements/src/com/oracle/graal/replacements/nodes/BitScanReverseNode.java Sun Aug 02 22:55:04 2015 -0700 +++ b/graal/com.oracle.graal.replacements/src/com/oracle/graal/replacements/nodes/BitScanReverseNode.java Sun Aug 02 22:55:21 2015 -0700 @@ -44,7 +44,7 @@ public BitScanReverseNode(ValueNode value) { super(TYPE, StampFactory.forInteger(Kind.Int, 0, ((PrimitiveStamp) value.stamp()).getBits()), value); - assert value.getKind() == Kind.Int || value.getKind() == Kind.Long; + assert value.getStackKind() == Kind.Int || value.getStackKind() == Kind.Long; } @Override @@ -70,7 +70,7 @@ if (forValue.isConstant()) { JavaConstant c = forValue.asJavaConstant(); if (c.asLong() != 0) { - return ConstantNode.forInt(forValue.getKind() == Kind.Int ? scan(c.asInt()) : scan(c.asLong())); + return ConstantNode.forInt(forValue.getStackKind() == Kind.Int ? scan(c.asInt()) : scan(c.asLong())); } } return this;
--- a/graal/com.oracle.graal.replacements/src/com/oracle/graal/replacements/nodes/MacroNode.java Sun Aug 02 22:55:04 2015 -0700 +++ b/graal/com.oracle.graal.replacements/src/com/oracle/graal/replacements/nodes/MacroNode.java Sun Aug 02 22:55:21 2015 -0700 @@ -205,7 +205,7 @@ InvokeNode invoke = graph().add(new InvokeNode(callTarget, bci)); if (stateAfter() != null) { invoke.setStateAfter(stateAfter().duplicate()); - if (getKind() != Kind.Void) { + if (getStackKind() != Kind.Void) { invoke.stateAfter().replaceFirstInput(this, invoke); } }
--- a/graal/com.oracle.graal.replacements/src/com/oracle/graal/replacements/nodes/ReverseBytesNode.java Sun Aug 02 22:55:04 2015 -0700 +++ b/graal/com.oracle.graal.replacements/src/com/oracle/graal/replacements/nodes/ReverseBytesNode.java Sun Aug 02 22:55:21 2015 -0700 @@ -39,18 +39,18 @@ public static final NodeClass<ReverseBytesNode> TYPE = NodeClass.create(ReverseBytesNode.class); public ReverseBytesNode(ValueNode value) { - super(TYPE, StampFactory.forKind(value.getKind()), value); - assert getKind() == Kind.Int || getKind() == Kind.Long; + super(TYPE, StampFactory.forKind(value.getStackKind()), value); + assert getStackKind() == Kind.Int || getStackKind() == Kind.Long; } @Override public boolean inferStamp() { IntegerStamp valueStamp = (IntegerStamp) getValue().stamp(); Stamp newStamp; - if (getKind() == Kind.Int) { + if (getStackKind() == Kind.Int) { long mask = CodeUtil.mask(Kind.Int.getBitCount()); newStamp = IntegerStamp.stampForMask(valueStamp.getBits(), Integer.reverse((int) valueStamp.downMask()) & mask, Integer.reverse((int) valueStamp.upMask()) & mask); - } else if (getKind() == Kind.Long) { + } else if (getStackKind() == Kind.Long) { newStamp = IntegerStamp.stampForMask(valueStamp.getBits(), Long.reverse(valueStamp.downMask()), Long.reverse(valueStamp.upMask())); } else { return false; @@ -62,8 +62,8 @@ public ValueNode canonical(CanonicalizerTool tool, ValueNode forValue) { if (forValue.isConstant()) { JavaConstant c = forValue.asJavaConstant(); - long reversed = getKind() == Kind.Int ? Integer.reverseBytes(c.asInt()) : Long.reverseBytes(c.asLong()); - return ConstantNode.forIntegerKind(getKind(), reversed); + long reversed = getStackKind() == Kind.Int ? Integer.reverseBytes(c.asInt()) : Long.reverseBytes(c.asLong()); + return ConstantNode.forIntegerKind(getStackKind(), reversed); } return this; }
--- a/graal/com.oracle.graal.replacements/src/com/oracle/graal/replacements/nodes/arithmetic/IntegerMulHighNode.java Sun Aug 02 22:55:04 2015 -0700 +++ b/graal/com.oracle.graal.replacements/src/com/oracle/graal/replacements/nodes/arithmetic/IntegerMulHighNode.java Sun Aug 02 22:55:21 2015 -0700 @@ -55,7 +55,7 @@ IntegerStamp xStamp = (IntegerStamp) forX.stamp(); IntegerStamp yStamp = (IntegerStamp) forY.stamp(); - Kind kind = getKind(); + Kind kind = getStackKind(); assert kind == Kind.Int || kind == Kind.Long; long[] xExtremes = {xStamp.lowerBound(), xStamp.upperBound()}; long[] yExtremes = {yStamp.lowerBound(), yStamp.upperBound()}; @@ -73,13 +73,13 @@ @Override public boolean inferStamp() { - return updateStamp(processExtremes(getX(), getY(), (min, max) -> StampFactory.forInteger(getKind(), min, max))); + return updateStamp(processExtremes(getX(), getY(), (min, max) -> StampFactory.forInteger(getStackKind(), min, max))); } @SuppressWarnings("cast") @Override public ValueNode canonical(CanonicalizerTool tool, ValueNode forX, ValueNode forY) { - return processExtremes(forX, forY, (min, max) -> min == (long) max ? ConstantNode.forIntegerKind(getKind(), min) : this); + return processExtremes(forX, forY, (min, max) -> min == (long) max ? ConstantNode.forIntegerKind(getStackKind(), min) : this); } @Override
--- a/graal/com.oracle.graal.replacements/src/com/oracle/graal/replacements/nodes/arithmetic/UnsignedMulHighNode.java Sun Aug 02 22:55:04 2015 -0700 +++ b/graal/com.oracle.graal.replacements/src/com/oracle/graal/replacements/nodes/arithmetic/UnsignedMulHighNode.java Sun Aug 02 22:55:21 2015 -0700 @@ -58,7 +58,7 @@ IntegerStamp xStamp = (IntegerStamp) forX.stamp(); IntegerStamp yStamp = (IntegerStamp) forY.stamp(); - Kind kind = getKind(); + Kind kind = getStackKind(); assert kind == Kind.Int || kind == Kind.Long; long[] xExtremes = {xStamp.lowerBound(), xStamp.upperBound()}; long[] yExtremes = {yStamp.lowerBound(), yStamp.upperBound()}; @@ -78,13 +78,13 @@ @Override public boolean inferStamp() { // if min is negative, then the value can reach into the unsigned range - return updateStamp(processExtremes(getX(), getY(), (min, max) -> (min == (long) max || min >= 0) ? StampFactory.forInteger(getKind(), min, max) : StampFactory.forKind(getKind()))); + return updateStamp(processExtremes(getX(), getY(), (min, max) -> (min == (long) max || min >= 0) ? StampFactory.forInteger(getStackKind(), min, max) : StampFactory.forKind(getStackKind()))); } @SuppressWarnings("cast") @Override public ValueNode canonical(CanonicalizerTool tool, ValueNode forX, ValueNode forY) { - return processExtremes(forX, forY, (min, max) -> min == (long) max ? ConstantNode.forIntegerKind(getKind(), min) : this); + return processExtremes(forX, forY, (min, max) -> min == (long) max ? ConstantNode.forIntegerKind(getStackKind(), min) : this); } @Override
--- a/graal/com.oracle.graal.truffle.hotspot/src/com/oracle/graal/truffle/hotspot/nfi/NativeCallStubGraphBuilder.java Sun Aug 02 22:55:04 2015 -0700 +++ b/graal/com.oracle.graal.truffle.hotspot/src/com/oracle/graal/truffle/hotspot/nfi/NativeCallStubGraphBuilder.java Sun Aug 02 22:55:21 2015 -0700 @@ -82,12 +82,12 @@ // box result BoxNode boxedResult; - if (callNode.getKind() != Kind.Void) { - if (callNode.getKind() == Kind.Object) { + if (callNode.getStackKind() != Kind.Void) { + if (callNode.getStackKind() == Kind.Object) { throw new IllegalArgumentException("Return type not supported: " + returnType.getName()); } - ResolvedJavaType type = providers.getMetaAccess().lookupJavaType(callNode.getKind().toBoxedJavaClass()); - boxedResult = g.add(new BoxNode(callNode, type, callNode.getKind())); + ResolvedJavaType type = providers.getMetaAccess().lookupJavaType(callNode.getStackKind().toBoxedJavaClass()); + boxedResult = g.add(new BoxNode(callNode, type, callNode.getStackKind())); } else { boxedResult = g.add(new BoxNode(ConstantNode.forLong(0, g), providers.getMetaAccess().lookupJavaType(Long.class), Kind.Long)); }
--- a/graal/com.oracle.graal.virtual/src/com/oracle/graal/virtual/phases/ea/PEReadEliminationClosure.java Sun Aug 02 22:55:04 2015 -0700 +++ b/graal/com.oracle.graal.virtual/src/com/oracle/graal/virtual/phases/ea/PEReadEliminationClosure.java Sun Aug 02 22:55:21 2015 -0700 @@ -301,7 +301,7 @@ } } for (PhiNode phi : getPhis()) { - if (phi.getKind() == Kind.Object) { + if (phi.getStackKind() == Kind.Object) { for (Map.Entry<ReadCacheEntry, ValueNode> entry : states.get(0).readCache.entrySet()) { if (entry.getKey().object == getPhiValueAt(phi, 0)) { mergeReadCachePhi(phi, entry.getKey().identity, entry.getKey().index, states);
--- a/graal/com.oracle.graal.virtual/src/com/oracle/graal/virtual/phases/ea/PartialEscapeClosure.java Sun Aug 02 22:55:04 2015 -0700 +++ b/graal/com.oracle.graal.virtual/src/com/oracle/graal/virtual/phases/ea/PartialEscapeClosure.java Sun Aug 02 22:55:21 2015 -0700 @@ -663,7 +663,7 @@ int valueIndex = 0; ensureVirtual &= objectState.getEnsureVirtualized(); while (valueIndex < entryCount) { - Kind otherKind = entries[valueIndex].getKind(); + Kind otherKind = entries[valueIndex].getStackKind(); Kind entryKind = virtual.entryKind(valueIndex); if (entryKind == Kind.Int && otherKind.needsTwoSlots()) { if (twoSlotKinds == null) { @@ -692,7 +692,7 @@ int object = getObject.apply(i); ObjectState objectState = states[i].getObjectState(object); ValueNode value = objectState.getEntry(valueIndex); - Kind valueKind = value.getKind(); + Kind valueKind = value.getStackKind(); if (valueKind != twoSlotKinds[valueIndex]) { ValueNode nextValue = objectState.getEntry(valueIndex + 1); if (value.isConstant() && value.asConstant().equals(JavaConstant.INT_0) && nextValue.isConstant() && nextValue.asConstant().equals(JavaConstant.INT_0)) {
--- a/graal/com.oracle.graal.virtual/src/com/oracle/graal/virtual/phases/ea/ReadEliminationClosure.java Sun Aug 02 22:55:04 2015 -0700 +++ b/graal/com.oracle.graal.virtual/src/com/oracle/graal/virtual/phases/ea/ReadEliminationClosure.java Sun Aug 02 22:55:21 2015 -0700 @@ -251,7 +251,7 @@ } } for (PhiNode phi : getPhis()) { - if (phi.getKind() == Kind.Object) { + if (phi.getStackKind() == Kind.Object) { for (Map.Entry<CacheEntry<?>, ValueNode> entry : states.get(0).readCache.entrySet()) { if (entry.getKey().object == getPhiValueAt(phi, 0)) { mergeReadCachePhi(phi, entry.getKey(), states);
--- a/graal/com.oracle.graal.virtual/src/com/oracle/graal/virtual/phases/ea/VirtualizerToolImpl.java Sun Aug 02 22:55:04 2015 -0700 +++ b/graal/com.oracle.graal.virtual/src/com/oracle/graal/virtual/phases/ea/VirtualizerToolImpl.java Sun Aug 02 22:55:21 2015 -0700 @@ -93,7 +93,7 @@ newValue = null; } else { newValue = closure.getAliasAndResolve(state, value); - assert unsafe || obj.getEntry(index) == null || obj.getEntry(index).getKind() == newValue.getKind() || (isObjectEntry(obj.getEntry(index)) && isObjectEntry(newValue)); + assert unsafe || obj.getEntry(index) == null || obj.getEntry(index).getStackKind() == newValue.getStackKind() || (isObjectEntry(obj.getEntry(index)) && isObjectEntry(newValue)); } state.setEntry(virtual.getObjectId(), index, newValue); } @@ -108,7 +108,7 @@ } private static boolean isObjectEntry(ValueNode value) { - return value.getKind() == Kind.Object || value instanceof VirtualObjectNode; + return value.getStackKind() == Kind.Object || value instanceof VirtualObjectNode; } @Override
--- a/graal/com.oracle.graal.word/src/com/oracle/graal/word/nodes/WordCastNode.java Sun Aug 02 22:55:04 2015 -0700 +++ b/graal/com.oracle.graal.word/src/com/oracle/graal/word/nodes/WordCastNode.java Sun Aug 02 22:55:21 2015 -0700 @@ -47,7 +47,7 @@ public final boolean trackedPointer; public static WordCastNode wordToObject(ValueNode input, Kind wordKind) { - assert input.getKind() == wordKind; + assert input.getStackKind() == wordKind; return new WordCastNode(StampFactory.object(), input); }