# HG changeset patch # User Lukas Stadler # Date 1403688053 -7200 # Node ID df6f2365b1530c60e897e85d92bb17dad78746da # Parent 2a1f3a8f76f103c8a24cdd1da9049763d0810a83 rename of x() to getX(), y() to getY() and object() to getValue() diff -r 2a1f3a8f76f1 -r df6f2365b153 graal/com.oracle.graal.compiler.amd64/src/com/oracle/graal/compiler/amd64/AMD64NodeLIRBuilder.java --- a/graal/com.oracle.graal.compiler.amd64/src/com/oracle/graal/compiler/amd64/AMD64NodeLIRBuilder.java Wed Jun 25 11:20:50 2014 +0200 +++ b/graal/com.oracle.graal.compiler.amd64/src/com/oracle/graal/compiler/amd64/AMD64NodeLIRBuilder.java Wed Jun 25 11:20:53 2014 +0200 @@ -136,7 +136,7 @@ // emitCompareBranchMemory expects the memory on the right, so mirror the condition if // that's not true. It might be mirrored again the actual compare is emitted but that's // ok. - Condition finalCondition = uncast(compare.x()) == access ? cond.mirror() : cond; + Condition finalCondition = uncast(compare.getX()) == access ? cond.mirror() : cond; return new ComplexMatchResult() { public Value evaluate(NodeLIRBuilder builder) { LabelRef trueLabel = getLIRBlock(ifNode.trueSuccessor()); @@ -364,8 +364,8 @@ @MatchRule("(Or (LeftShift=lshift value Constant) (UnsignedRightShift=rshift value Constant))") public ComplexMatchResult rotateLeftConstant(LeftShiftNode lshift, UnsignedRightShiftNode rshift) { - if ((lshift.getShiftAmountMask() & (lshift.y().asConstant().asInt() + rshift.y().asConstant().asInt())) == 0) { - return builder -> getLIRGeneratorTool().emitRol(operand(lshift.x()), operand(lshift.y())); + if ((lshift.getShiftAmountMask() & (lshift.getY().asConstant().asInt() + rshift.getY().asConstant().asInt())) == 0) { + return builder -> getLIRGeneratorTool().emitRol(operand(lshift.getX()), operand(lshift.getY())); } return null; } diff -r 2a1f3a8f76f1 -r df6f2365b153 graal/com.oracle.graal.compiler.test/src/com/oracle/graal/compiler/test/CompareCanonicalizerTest.java --- a/graal/com.oracle.graal.compiler.test/src/com/oracle/graal/compiler/test/CompareCanonicalizerTest.java Wed Jun 25 11:20:50 2014 +0200 +++ b/graal/com.oracle.graal.compiler.test/src/com/oracle/graal/compiler/test/CompareCanonicalizerTest.java Wed Jun 25 11:20:53 2014 +0200 @@ -103,7 +103,7 @@ IntegerTestNode test = (IntegerTestNode) conditional.condition(); ParameterNode param0 = graph.getParameter(0); ParameterNode param1 = graph.getParameter(1); - assertTrue((test.x() == param0 && test.y() == param1) || (test.x() == param1 && test.y() == param0)); + assertTrue((test.getX() == param0 && test.getY() == param1) || (test.getX() == param1 && test.getY() == param0)); } } diff -r 2a1f3a8f76f1 -r df6f2365b153 graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/gen/NodeLIRBuilder.java --- a/graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/gen/NodeLIRBuilder.java Wed Jun 25 11:20:50 2014 +0200 +++ b/graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/gen/NodeLIRBuilder.java Wed Jun 25 11:20:53 2014 +0200 @@ -408,17 +408,17 @@ } private void emitNullCheckBranch(IsNullNode node, LabelRef trueSuccessor, LabelRef falseSuccessor, double trueSuccessorProbability) { - PlatformKind kind = gen.getLIRKind(node.object().stamp()).getPlatformKind(); - gen.emitCompareBranch(kind, operand(node.object()), kind.getDefaultValue(), Condition.EQ, false, trueSuccessor, falseSuccessor, trueSuccessorProbability); + PlatformKind kind = gen.getLIRKind(node.getValue().stamp()).getPlatformKind(); + gen.emitCompareBranch(kind, operand(node.getValue()), kind.getDefaultValue(), Condition.EQ, false, trueSuccessor, falseSuccessor, trueSuccessorProbability); } public void emitCompareBranch(CompareNode compare, LabelRef trueSuccessor, LabelRef falseSuccessor, double trueSuccessorProbability) { - PlatformKind kind = gen.getLIRKind(compare.x().stamp()).getPlatformKind(); - gen.emitCompareBranch(kind, operand(compare.x()), operand(compare.y()), compare.condition(), compare.unorderedIsTrue(), trueSuccessor, falseSuccessor, trueSuccessorProbability); + PlatformKind kind = gen.getLIRKind(compare.getX().stamp()).getPlatformKind(); + gen.emitCompareBranch(kind, operand(compare.getX()), operand(compare.getY()), compare.condition(), compare.unorderedIsTrue(), trueSuccessor, falseSuccessor, trueSuccessorProbability); } public void emitIntegerTestBranch(IntegerTestNode test, LabelRef trueSuccessor, LabelRef falseSuccessor, double trueSuccessorProbability) { - gen.emitIntegerTestBranch(operand(test.x()), operand(test.y()), trueSuccessor, falseSuccessor, trueSuccessorProbability); + gen.emitIntegerTestBranch(operand(test.getX()), operand(test.getY()), trueSuccessor, falseSuccessor, trueSuccessorProbability); } public void emitConstantBranch(boolean value, LabelRef trueSuccessorBlock, LabelRef falseSuccessorBlock) { @@ -436,17 +436,17 @@ public Variable emitConditional(LogicNode node, Value trueValue, Value falseValue) { if (node instanceof IsNullNode) { IsNullNode isNullNode = (IsNullNode) node; - PlatformKind kind = gen.getLIRKind(isNullNode.object().stamp()).getPlatformKind(); - return gen.emitConditionalMove(kind, operand(isNullNode.object()), kind.getDefaultValue(), Condition.EQ, false, trueValue, falseValue); + PlatformKind kind = gen.getLIRKind(isNullNode.getValue().stamp()).getPlatformKind(); + return gen.emitConditionalMove(kind, operand(isNullNode.getValue()), kind.getDefaultValue(), Condition.EQ, false, trueValue, falseValue); } else if (node instanceof CompareNode) { CompareNode compare = (CompareNode) node; - PlatformKind kind = gen.getLIRKind(compare.x().stamp()).getPlatformKind(); - return gen.emitConditionalMove(kind, operand(compare.x()), operand(compare.y()), compare.condition(), compare.unorderedIsTrue(), trueValue, falseValue); + PlatformKind kind = gen.getLIRKind(compare.getX().stamp()).getPlatformKind(); + return gen.emitConditionalMove(kind, operand(compare.getX()), operand(compare.getY()), compare.condition(), compare.unorderedIsTrue(), trueValue, falseValue); } else if (node instanceof LogicConstantNode) { return gen.emitMove(((LogicConstantNode) node).getValue() ? trueValue : falseValue); } else if (node instanceof IntegerTestNode) { IntegerTestNode test = (IntegerTestNode) node; - return gen.emitIntegerTestMove(operand(test.x()), operand(test.y()), trueValue, falseValue); + return gen.emitIntegerTestMove(operand(test.getX()), operand(test.getY()), trueValue, falseValue); } else { throw GraalInternalError.unimplemented(node.toString()); } diff -r 2a1f3a8f76f1 -r df6f2365b153 graal/com.oracle.graal.hotspot.amd64/src/com/oracle/graal/hotspot/amd64/AMD64HotSpotNodeLIRBuilder.java --- a/graal/com.oracle.graal.hotspot.amd64/src/com/oracle/graal/hotspot/amd64/AMD64HotSpotNodeLIRBuilder.java Wed Jun 25 11:20:50 2014 +0200 +++ b/graal/com.oracle.graal.hotspot.amd64/src/com/oracle/graal/hotspot/amd64/AMD64HotSpotNodeLIRBuilder.java Wed Jun 25 11:20:53 2014 +0200 @@ -72,10 +72,10 @@ Value value = gen.load(operand(valueNode)); AMD64AddressValue address = makeCompressedAddress(compress, location); Condition cond = compare.condition(); - if (access == filterCompression(compare.x())) { + if (access == filterCompression(compare.getX())) { cond = cond.mirror(); } else { - assert access == filterCompression(compare.y()); + assert access == filterCompression(compare.getY()); } LabelRef trueLabel = getLIRBlock(ifNode.trueSuccessor()); @@ -253,7 +253,7 @@ @MatchRule("(If (FloatLessThan=compare value (Read=access (Compression=compress object) ConstantLocation=location)))") public ComplexMatchResult ifCompareCompressedMemory(IfNode root, CompareNode compare, CompressionNode compress, ValueNode value, ConstantLocationNode location, Access access) { if (canFormCompressedMemory(compress, location)) { - PlatformKind cmpKind = gen.getLIRKind(compare.x().stamp()).getPlatformKind(); + PlatformKind cmpKind = gen.getLIRKind(compare.getX().stamp()).getPlatformKind(); if (cmpKind instanceof Kind) { Kind kind = (Kind) cmpKind; return builder -> { diff -r 2a1f3a8f76f1 -r df6f2365b153 graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/replacements/InstanceOfSnippets.java --- a/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/replacements/InstanceOfSnippets.java Wed Jun 25 11:20:50 2014 +0200 +++ b/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/replacements/InstanceOfSnippets.java Wed Jun 25 11:20:53 2014 +0200 @@ -223,7 +223,7 @@ protected Arguments makeArguments(InstanceOfUsageReplacer replacer, LoweringTool tool) { if (replacer.instanceOf instanceof InstanceOfNode) { InstanceOfNode instanceOf = (InstanceOfNode) replacer.instanceOf; - ValueNode object = instanceOf.object(); + ValueNode object = instanceOf.getValue(); TypeCheckHints hintInfo = new TypeCheckHints(instanceOf.type(), instanceOf.profile(), tool.assumptions(), TypeCheckMinProfileHitProbability.getValue(), TypeCheckMaxHints.getValue()); final HotSpotResolvedObjectType type = (HotSpotResolvedObjectType) instanceOf.type(); ConstantNode hub = ConstantNode.forConstant(type.klass(), providers.getMetaAccess(), instanceOf.graph()); diff -r 2a1f3a8f76f1 -r df6f2365b153 graal/com.oracle.graal.loop/src/com/oracle/graal/loop/DerivedOffsetInductionVariable.java --- a/graal/com.oracle.graal.loop/src/com/oracle/graal/loop/DerivedOffsetInductionVariable.java Wed Jun 25 11:20:50 2014 +0200 +++ b/graal/com.oracle.graal.loop/src/com/oracle/graal/loop/DerivedOffsetInductionVariable.java Wed Jun 25 11:20:53 2014 +0200 @@ -72,7 +72,7 @@ @Override public long constantStride() { - if (value instanceof IntegerSubNode && base.valueNode() == value.y()) { + if (value instanceof IntegerSubNode && base.valueNode() == value.getY()) { return -base.constantStride(); } return base.constantStride(); @@ -85,7 +85,7 @@ @Override public ValueNode strideNode() { - if (value instanceof IntegerSubNode && base.valueNode() == value.y()) { + if (value instanceof IntegerSubNode && base.valueNode() == value.getY()) { return graph().unique(new NegateNode(base.strideNode())); } return base.strideNode(); @@ -116,10 +116,10 @@ return b + o; } if (value instanceof IntegerSubNode) { - if (base.valueNode() == value.x()) { + if (base.valueNode() == value.getX()) { return b - o; } else { - assert base.valueNode() == value.y(); + assert base.valueNode() == value.getY(); return o - b; } } @@ -131,10 +131,10 @@ return IntegerArithmeticNode.add(graph(), b, o); } if (value instanceof IntegerSubNode) { - if (base.valueNode() == value.x()) { + if (base.valueNode() == value.getX()) { return IntegerArithmeticNode.sub(graph(), b, o); } else { - assert base.valueNode() == value.y(); + assert base.valueNode() == value.getY(); return IntegerArithmeticNode.sub(graph(), o, b); } } diff -r 2a1f3a8f76f1 -r df6f2365b153 graal/com.oracle.graal.loop/src/com/oracle/graal/loop/InductionVariables.java --- a/graal/com.oracle.graal.loop/src/com/oracle/graal/loop/InductionVariables.java Wed Jun 25 11:20:50 2014 +0200 +++ b/graal/com.oracle.graal.loop/src/com/oracle/graal/loop/InductionVariables.java Wed Jun 25 11:20:53 2014 +0200 @@ -95,10 +95,10 @@ private ValueNode addSub(ValueNode op, ValueNode base) { if (op instanceof IntegerAddNode || op instanceof IntegerSubNode) { IntegerArithmeticNode aritOp = (IntegerArithmeticNode) op; - if (aritOp.x() == base && loop.isOutsideLoop(aritOp.y())) { - return aritOp.y(); - } else if (aritOp.y() == base && loop.isOutsideLoop(aritOp.x())) { - return aritOp.x(); + if (aritOp.getX() == base && loop.isOutsideLoop(aritOp.getY())) { + return aritOp.getY(); + } else if (aritOp.getY() == base && loop.isOutsideLoop(aritOp.getX())) { + return aritOp.getX(); } } return null; @@ -107,16 +107,16 @@ private ValueNode mul(ValueNode op, ValueNode base) { if (op instanceof IntegerMulNode) { IntegerMulNode mul = (IntegerMulNode) op; - if (mul.x() == base && loop.isOutsideLoop(mul.y())) { - return mul.y(); - } else if (mul.y() == base && loop.isOutsideLoop(mul.x())) { - return mul.x(); + if (mul.getX() == base && loop.isOutsideLoop(mul.getY())) { + return mul.getY(); + } else if (mul.getY() == base && loop.isOutsideLoop(mul.getX())) { + return mul.getX(); } } if (op instanceof LeftShiftNode) { LeftShiftNode shift = (LeftShiftNode) op; - if (shift.x() == base && shift.y().isConstant()) { - return ConstantNode.forInt(1 << shift.y().asConstant().asInt(), base.graph()); + if (shift.getX() == base && shift.getY().isConstant()) { + return ConstantNode.forInt(1 << shift.getY().asConstant().asInt(), base.graph()); } } return null; diff -r 2a1f3a8f76f1 -r df6f2365b153 graal/com.oracle.graal.loop/src/com/oracle/graal/loop/LoopEx.java --- a/graal/com.oracle.graal.loop/src/com/oracle/graal/loop/LoopEx.java Wed Jun 25 11:20:50 2014 +0200 +++ b/graal/com.oracle.graal.loop/src/com/oracle/graal/loop/LoopEx.java Wed Jun 25 11:20:53 2014 +0200 @@ -177,17 +177,17 @@ Condition condition = null; InductionVariable iv = null; ValueNode limit = null; - if (isOutsideLoop(lessThan.x())) { - iv = getInductionVariables().get(lessThan.y()); + if (isOutsideLoop(lessThan.getX())) { + iv = getInductionVariables().get(lessThan.getY()); if (iv != null) { condition = lessThan.condition().mirror(); - limit = lessThan.x(); + limit = lessThan.getX(); } - } else if (isOutsideLoop(lessThan.y())) { - iv = getInductionVariables().get(lessThan.x()); + } else if (isOutsideLoop(lessThan.getY())) { + iv = getInductionVariables().get(lessThan.getX()); if (iv != null) { condition = lessThan.condition(); - limit = lessThan.y(); + limit = lessThan.getY(); } } if (condition == null) { diff -r 2a1f3a8f76f1 -r df6f2365b153 graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/BinaryOpLogicNode.java --- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/BinaryOpLogicNode.java Wed Jun 25 11:20:50 2014 +0200 +++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/BinaryOpLogicNode.java Wed Jun 25 11:20:53 2014 +0200 @@ -33,11 +33,11 @@ @Input private ValueNode x; @Input private ValueNode y; - public ValueNode x() { + public ValueNode getX() { return x; } - public ValueNode y() { + public ValueNode getY() { return y; } @@ -67,7 +67,7 @@ @Override public Node canonical(CanonicalizerTool tool) { - switch (evaluate(tool.getConstantReflection(), x(), y())) { + switch (evaluate(tool.getConstantReflection(), getX(), getY())) { case FALSE: return LogicConstantNode.contradiction(graph()); case TRUE: diff -r 2a1f3a8f76f1 -r df6f2365b153 graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/IfNode.java --- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/IfNode.java Wed Jun 25 11:20:50 2014 +0200 +++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/IfNode.java Wed Jun 25 11:20:53 2014 +0200 @@ -259,7 +259,7 @@ assert trueSuccessor().usages().isEmpty() && falseSuccessor().usages().isEmpty(); if (condition() instanceof IntegerLessThanNode) { IntegerLessThanNode lessThan = (IntegerLessThanNode) condition(); - Constant y = lessThan.y().stamp().asConstant(); + Constant y = lessThan.getY().stamp().asConstant(); if (y != null && y.asLong() == 0 && falseSuccessor().next() instanceof IfNode) { IfNode ifNode2 = (IfNode) falseSuccessor().next(); if (ifNode2.condition() instanceof IntegerLessThanNode) { @@ -271,24 +271,24 @@ * Convert x >= 0 && x < positive which is represented as !(x < 0) && x < * into an unsigned compare. */ - if (lessThan2.x() == lessThan.x() && lessThan2.y().stamp() instanceof IntegerStamp && ((IntegerStamp) lessThan2.y().stamp()).isPositive() && + if (lessThan2.getX() == lessThan.getX() && lessThan2.getY().stamp() instanceof IntegerStamp && ((IntegerStamp) lessThan2.getY().stamp()).isPositive() && sameDestination(trueSuccessor(), ifNode2.falseSuccessor)) { - below = graph().unique(new IntegerBelowThanNode(lessThan2.x(), lessThan2.y())); + below = graph().unique(new IntegerBelowThanNode(lessThan2.getX(), lessThan2.getY())); // swap direction BeginNode tmp = falseSucc; falseSucc = trueSucc; trueSucc = tmp; - } else if (lessThan2.y() == lessThan.x() && sameDestination(trueSuccessor(), ifNode2.trueSuccessor)) { + } else if (lessThan2.getY() == lessThan.getX() && sameDestination(trueSuccessor(), ifNode2.trueSuccessor)) { /* * Convert x >= 0 && x <= positive which is represented as !(x < 0) && * !( > x), into x <| positive + 1. This can only be done for * constants since there isn't a IntegerBelowEqualThanNode but that doesn't * appear to be interesting. */ - Constant positive = lessThan2.x().asConstant(); + Constant positive = lessThan2.getX().asConstant(); if (positive != null && positive.asLong() > 0 && positive.asLong() < positive.getKind().getMaxValue()) { ConstantNode newLimit = ConstantNode.forIntegerKind(positive.getKind(), positive.asLong() + 1, graph()); - below = graph().unique(new IntegerBelowThanNode(lessThan.x(), newLimit)); + below = graph().unique(new IntegerBelowThanNode(lessThan.getX(), newLimit)); } } if (below != null) { @@ -355,7 +355,7 @@ InstanceOfNode instanceOfA = (InstanceOfNode) a; if (b instanceof IsNullNode) { IsNullNode isNullNode = (IsNullNode) b; - if (isNullNode.object() == instanceOfA.object()) { + if (isNullNode.getValue() == instanceOfA.getValue()) { if (instanceOfA.profile() != null && instanceOfA.profile().getNullSeen() != TriState.FALSE) { instanceOfA.setProfile(new JavaTypeProfile(TriState.FALSE, instanceOfA.profile().getNotRecordedProbability(), instanceOfA.profile().getTypes())); } @@ -364,7 +364,7 @@ } } else if (b instanceof InstanceOfNode) { InstanceOfNode instanceOfB = (InstanceOfNode) b; - if (instanceOfA.object() == instanceOfB.object() && !instanceOfA.type().isInterface() && !instanceOfB.type().isInterface() && + if (instanceOfA.getValue() == instanceOfB.getValue() && !instanceOfA.type().isInterface() && !instanceOfB.type().isInterface() && !instanceOfA.type().isAssignableFrom(instanceOfB.type()) && !instanceOfB.type().isAssignableFrom(instanceOfA.type())) { // Two instanceof on the same value with mutually exclusive types. JavaTypeProfile profileA = instanceOfA.profile(); @@ -425,9 +425,9 @@ } Condition comparableCondition = null; Condition conditionB = compareB.condition(); - if (compareB.x() == compareA.x() && compareB.y() == compareA.y()) { + if (compareB.getX() == compareA.getX() && compareB.getY() == compareA.getY()) { comparableCondition = conditionB; - } else if (compareB.x() == compareA.y() && compareB.y() == compareA.x()) { + } else if (compareB.getX() == compareA.getY() && compareB.getY() == compareA.getX()) { comparableCondition = conditionB.mirror(); } @@ -440,13 +440,13 @@ } } else if (conditionA == Condition.EQ && conditionB == Condition.EQ) { boolean canSwap = false; - if ((compareA.x() == compareB.x() && valuesDistinct(constantReflection, compareA.y(), compareB.y()))) { + if ((compareA.getX() == compareB.getX() && valuesDistinct(constantReflection, compareA.getY(), compareB.getY()))) { canSwap = true; - } else if ((compareA.x() == compareB.y() && valuesDistinct(constantReflection, compareA.y(), compareB.x()))) { + } else if ((compareA.getX() == compareB.getY() && valuesDistinct(constantReflection, compareA.getY(), compareB.getX()))) { canSwap = true; - } else if ((compareA.y() == compareB.x() && valuesDistinct(constantReflection, compareA.x(), compareB.y()))) { + } else if ((compareA.getY() == compareB.getX() && valuesDistinct(constantReflection, compareA.getX(), compareB.getY()))) { canSwap = true; - } else if ((compareA.y() == compareB.y() && valuesDistinct(constantReflection, compareA.x(), compareB.x()))) { + } else if ((compareA.getY() == compareB.getY() && valuesDistinct(constantReflection, compareA.getX(), compareB.getX()))) { canSwap = true; } @@ -645,7 +645,7 @@ return false; } Node singleUsage = mergeUsages.first(); - if (!(singleUsage instanceof ValuePhiNode) || (singleUsage != compare.x() && singleUsage != compare.y())) { + if (!(singleUsage instanceof ValuePhiNode) || (singleUsage != compare.getX() && singleUsage != compare.getY())) { return false; } @@ -664,8 +664,8 @@ List mergePredecessors = merge.cfgPredecessors().snapshot(); assert phi.valueCount() == merge.forwardEndCount(); - Constant[] xs = constantValues(compare.x(), merge, false); - Constant[] ys = constantValues(compare.y(), merge, false); + Constant[] xs = constantValues(compare.getX(), merge, false); + Constant[] ys = constantValues(compare.getY(), merge, false); if (xs == null || ys == null) { return false; } diff -r 2a1f3a8f76f1 -r df6f2365b153 graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/LoopBeginNode.java --- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/LoopBeginNode.java Wed Jun 25 11:20:50 2014 +0200 +++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/LoopBeginNode.java Wed Jun 25 11:20:53 2014 +0200 @@ -243,10 +243,10 @@ long increment = NO_INCREMENT; if (input != null && input instanceof IntegerAddNode) { IntegerAddNode add = (IntegerAddNode) input; - if (add.x() == phi && add.y().isConstant()) { - increment = add.y().asConstant().asLong(); - } else if (add.y() == phi && add.x().isConstant()) { - increment = add.x().asConstant().asLong(); + if (add.getX() == phi && add.getY().isConstant()) { + increment = add.getY().asConstant().asLong(); + } else if (add.getY() == phi && add.getX().isConstant()) { + increment = add.getX().asConstant().asLong(); } } else if (input == phi) { increment = 0; diff -r 2a1f3a8f76f1 -r df6f2365b153 graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/UnaryOpLogicNode.java --- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/UnaryOpLogicNode.java Wed Jun 25 11:20:50 2014 +0200 +++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/UnaryOpLogicNode.java Wed Jun 25 11:20:53 2014 +0200 @@ -27,20 +27,15 @@ public abstract class UnaryOpLogicNode extends LogicNode implements LIRLowerable { - @Input private ValueNode object; + @Input private ValueNode value; - public ValueNode object() { - return object; + public ValueNode getValue() { + return value; } - protected void setX(ValueNode object) { - updateUsages(this.object, object); - this.object = object; - } - - public UnaryOpLogicNode(ValueNode object) { - assert object != null; - this.object = object; + public UnaryOpLogicNode(ValueNode value) { + assert value != null; + this.value = value; } public abstract TriState evaluate(ValueNode forObject); diff -r 2a1f3a8f76f1 -r df6f2365b153 graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/calc/AndNode.java --- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/calc/AndNode.java Wed Jun 25 11:20:50 2014 +0200 +++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/calc/AndNode.java Wed Jun 25 11:20:53 2014 +0200 @@ -40,7 +40,7 @@ @Override public boolean inferStamp() { - return updateStamp(StampTool.and(x().stamp(), y().stamp())); + return updateStamp(StampTool.and(getX().stamp(), getY().stamp())); } @Override @@ -51,35 +51,35 @@ @Override public Node canonical(CanonicalizerTool tool) { - if (x() == y()) { - return x(); + if (getX() == getY()) { + return getX(); } - if (x().isConstant() && !y().isConstant()) { - return graph().unique(new AndNode(stamp(), y(), x())); + if (getX().isConstant() && !getY().isConstant()) { + return graph().unique(new AndNode(stamp(), getY(), getX())); } - if (x().isConstant()) { - return ConstantNode.forPrimitive(stamp(), evalConst(x().asConstant(), y().asConstant()), graph()); - } else if (y().isConstant()) { - long rawY = y().asConstant().asLong(); + if (getX().isConstant()) { + return ConstantNode.forPrimitive(stamp(), evalConst(getX().asConstant(), getY().asConstant()), graph()); + } else if (getY().isConstant()) { + long rawY = getY().asConstant().asLong(); long mask = IntegerStamp.defaultMask(PrimitiveStamp.getBits(stamp())); if ((rawY & mask) == mask) { - return x(); + return getX(); } if ((rawY & mask) == 0) { return ConstantNode.forIntegerStamp(stamp(), 0, graph()); } - if (x() instanceof SignExtendNode) { - SignExtendNode ext = (SignExtendNode) x(); + if (getX() instanceof SignExtendNode) { + SignExtendNode ext = (SignExtendNode) getX(); if (rawY == ((1L << ext.getInputBits()) - 1)) { ValueNode result = graph().unique(new ZeroExtendNode(ext.getValue(), ext.getResultBits())); return result; } } - if (x().stamp() instanceof IntegerStamp) { - IntegerStamp xStamp = (IntegerStamp) x().stamp(); + if (getX().stamp() instanceof IntegerStamp) { + IntegerStamp xStamp = (IntegerStamp) getX().stamp(); if (((xStamp.upMask() | xStamp.downMask()) & ~rawY) == 0) { // No bits are set which are outside the mask, so the mask will have no effect. - return x(); + return getX(); } } @@ -90,6 +90,6 @@ @Override public void generate(NodeMappableLIRBuilder builder, ArithmeticLIRGenerator gen) { - builder.setResult(this, gen.emitAnd(builder.operand(x()), builder.operand(y()))); + builder.setResult(this, gen.emitAnd(builder.operand(getX()), builder.operand(getY()))); } } diff -r 2a1f3a8f76f1 -r df6f2365b153 graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/calc/BinaryNode.java --- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/calc/BinaryNode.java Wed Jun 25 11:20:50 2014 +0200 +++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/calc/BinaryNode.java Wed Jun 25 11:20:53 2014 +0200 @@ -35,11 +35,11 @@ @Input private ValueNode x; @Input private ValueNode y; - public ValueNode x() { + public ValueNode getX() { return x; } - public ValueNode y() { + public ValueNode getY() { return y; } @@ -63,9 +63,9 @@ public ValueNode getValue(BinaryNode binary) { switch (this) { case x: - return binary.x(); + return binary.getX(); case y: - return binary.y(); + return binary.getY(); default: throw GraalInternalError.shouldNotReachHere(); } @@ -74,9 +74,9 @@ public ValueNode getOtherValue(BinaryNode binary) { switch (this) { case x: - return binary.y(); + return binary.getY(); case y: - return binary.x(); + return binary.getX(); default: throw GraalInternalError.shouldNotReachHere(); } @@ -124,8 +124,8 @@ } public static ReassociateMatch findReassociate(BinaryNode binary, NodePredicate criterion) { - boolean resultX = criterion.apply(binary.x()); - boolean resultY = criterion.apply(binary.y()); + boolean resultX = criterion.apply(binary.getX()); + boolean resultY = criterion.apply(binary.getY()); if (resultX && !resultY) { return ReassociateMatch.x; } diff -r 2a1f3a8f76f1 -r df6f2365b153 graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/calc/CompareNode.java --- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/calc/CompareNode.java Wed Jun 25 11:20:50 2014 +0200 +++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/calc/CompareNode.java Wed Jun 25 11:20:53 2014 +0200 @@ -104,17 +104,17 @@ if (result != this) { return result; } - if (x().isConstant()) { - if ((result = canonicalizeSymmetricConstant(tool, x().asConstant(), y(), true)) != this) { + if (getX().isConstant()) { + if ((result = canonicalizeSymmetricConstant(tool, getX().asConstant(), getY(), true)) != this) { return result; } - } else if (y().isConstant()) { - if ((result = canonicalizeSymmetricConstant(tool, y().asConstant(), x(), false)) != this) { + } else if (getY().isConstant()) { + if ((result = canonicalizeSymmetricConstant(tool, getY().asConstant(), getX(), false)) != this) { return result; } - } else if (x() instanceof ConvertNode && y() instanceof ConvertNode) { - ConvertNode convertX = (ConvertNode) x(); - ConvertNode convertY = (ConvertNode) y(); + } else if (getX() instanceof ConvertNode && getY() instanceof ConvertNode) { + ConvertNode convertX = (ConvertNode) getX(); + ConvertNode convertY = (ConvertNode) getY(); if (convertX.preservesOrder(condition()) && convertY.preservesOrder(condition()) && convertX.getValue().stamp().isCompatible(convertY.getValue().stamp())) { return graph().unique(duplicateModified(convertX.getValue(), convertY.getValue())); } diff -r 2a1f3a8f76f1 -r df6f2365b153 graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/calc/ConditionalNode.java --- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/calc/ConditionalNode.java Wed Jun 25 11:20:50 2014 +0200 +++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/calc/ConditionalNode.java Wed Jun 25 11:20:53 2014 +0200 @@ -82,11 +82,11 @@ // this optimizes the case where a value that can only be 0 or 1 is materialized to 0 or 1 if (trueValue().isConstant() && falseValue().isConstant() && condition instanceof IntegerEqualsNode) { IntegerEqualsNode equals = (IntegerEqualsNode) condition; - if (equals.y().isConstant() && equals.y().asConstant().equals(Constant.INT_0) && equals.x().stamp() instanceof IntegerStamp) { - IntegerStamp equalsXStamp = (IntegerStamp) equals.x().stamp(); + if (equals.getY().isConstant() && equals.getY().asConstant().equals(Constant.INT_0) && equals.getX().stamp() instanceof IntegerStamp) { + IntegerStamp equalsXStamp = (IntegerStamp) equals.getX().stamp(); if (equalsXStamp.upMask() == 1) { if (trueValue().asConstant().equals(Constant.INT_0) && falseValue().asConstant().equals(Constant.INT_1)) { - return IntegerConvertNode.convertUnsigned(equals.x(), stamp()); + return IntegerConvertNode.convertUnsigned(equals.getX(), stamp()); } } } @@ -102,7 +102,7 @@ if (condition instanceof CompareNode && ((CompareNode) condition).condition() == Condition.EQ) { // optimize the pattern (x == y) ? x : y CompareNode compare = (CompareNode) condition; - if ((compare.x() == trueValue() && compare.y() == falseValue()) || (compare.x() == falseValue() && compare.y() == trueValue())) { + if ((compare.getX() == trueValue() && compare.getY() == falseValue()) || (compare.getX() == falseValue() && compare.getY() == trueValue())) { return falseValue(); } } diff -r 2a1f3a8f76f1 -r df6f2365b153 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 Wed Jun 25 11:20:50 2014 +0200 +++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/calc/FloatAddNode.java Wed Jun 25 11:20:53 2014 +0200 @@ -50,11 +50,11 @@ @Override public Node canonical(CanonicalizerTool tool) { - if (x().isConstant() && !y().isConstant()) { - return graph().unique(new FloatAddNode(stamp(), y(), x(), isStrictFP())); + if (getX().isConstant() && !getY().isConstant()) { + return graph().unique(new FloatAddNode(stamp(), getY(), getX(), isStrictFP())); } - if (x().isConstant()) { - return ConstantNode.forPrimitive(evalConst(x().asConstant(), y().asConstant()), graph()); + if (getX().isConstant()) { + return ConstantNode.forPrimitive(evalConst(getX().asConstant(), getY().asConstant()), graph()); } // Constant 0.0 can't be eliminated since it can affect the sign of the result. return this; @@ -62,9 +62,9 @@ @Override public void generate(NodeMappableLIRBuilder builder, ArithmeticLIRGenerator gen) { - Value op1 = builder.operand(x()); - Value op2 = builder.operand(y()); - if (!y().isConstant() && !livesLonger(this, y(), builder)) { + Value op1 = builder.operand(getX()); + Value op2 = builder.operand(getY()); + if (!getY().isConstant() && !livesLonger(this, getY(), builder)) { Value op = op1; op1 = op2; op2 = op; diff -r 2a1f3a8f76f1 -r df6f2365b153 graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/calc/FloatDivNode.java --- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/calc/FloatDivNode.java Wed Jun 25 11:20:50 2014 +0200 +++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/calc/FloatDivNode.java Wed Jun 25 11:20:53 2014 +0200 @@ -50,14 +50,14 @@ @Override public Node canonical(CanonicalizerTool tool) { - if (x().isConstant() && y().isConstant()) { - return ConstantNode.forPrimitive(evalConst(x().asConstant(), y().asConstant()), graph()); + if (getX().isConstant() && getY().isConstant()) { + return ConstantNode.forPrimitive(evalConst(getX().asConstant(), getY().asConstant()), graph()); } return this; } @Override public void generate(NodeMappableLIRBuilder builder, ArithmeticLIRGenerator gen) { - builder.setResult(this, gen.emitDiv(builder.operand(x()), builder.operand(y()), null)); + builder.setResult(this, gen.emitDiv(builder.operand(getX()), builder.operand(getY()), null)); } } diff -r 2a1f3a8f76f1 -r df6f2365b153 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 Wed Jun 25 11:20:50 2014 +0200 +++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/calc/FloatMulNode.java Wed Jun 25 11:20:53 2014 +0200 @@ -50,20 +50,20 @@ @Override public Node canonical(CanonicalizerTool tool) { - if (x().isConstant() && !y().isConstant()) { - return graph().unique(new FloatMulNode(stamp(), y(), x(), isStrictFP())); + if (getX().isConstant() && !getY().isConstant()) { + return graph().unique(new FloatMulNode(stamp(), getY(), getX(), isStrictFP())); } - if (x().isConstant()) { - return ConstantNode.forPrimitive(evalConst(x().asConstant(), y().asConstant()), graph()); + if (getX().isConstant()) { + return ConstantNode.forPrimitive(evalConst(getX().asConstant(), getY().asConstant()), graph()); } return this; } @Override public void generate(NodeMappableLIRBuilder builder, ArithmeticLIRGenerator gen) { - Value op1 = builder.operand(x()); - Value op2 = builder.operand(y()); - if (!y().isConstant() && !FloatAddNode.livesLonger(this, y(), builder)) { + Value op1 = builder.operand(getX()); + Value op2 = builder.operand(getY()); + if (!getY().isConstant() && !FloatAddNode.livesLonger(this, getY(), builder)) { Value op = op1; op1 = op2; op2 = op; diff -r 2a1f3a8f76f1 -r df6f2365b153 graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/calc/FloatRemNode.java --- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/calc/FloatRemNode.java Wed Jun 25 11:20:50 2014 +0200 +++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/calc/FloatRemNode.java Wed Jun 25 11:20:53 2014 +0200 @@ -50,8 +50,8 @@ @Override public Node canonical(CanonicalizerTool tool) { - if (x().isConstant() && y().isConstant()) { - return ConstantNode.forPrimitive(evalConst(x().asConstant(), y().asConstant()), graph()); + if (getX().isConstant() && getY().isConstant()) { + return ConstantNode.forPrimitive(evalConst(getX().asConstant(), getY().asConstant()), graph()); } return this; } @@ -63,6 +63,6 @@ @Override public void generate(NodeMappableLIRBuilder builder, ArithmeticLIRGenerator gen) { - builder.setResult(this, gen.emitRem(builder.operand(x()), builder.operand(y()), null)); + builder.setResult(this, gen.emitRem(builder.operand(getX()), builder.operand(getY()), null)); } } diff -r 2a1f3a8f76f1 -r df6f2365b153 graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/calc/FloatSubNode.java --- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/calc/FloatSubNode.java Wed Jun 25 11:20:50 2014 +0200 +++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/calc/FloatSubNode.java Wed Jun 25 11:20:53 2014 +0200 @@ -50,11 +50,11 @@ @Override public Node canonical(CanonicalizerTool tool) { - if (x() == y()) { + if (getX() == getY()) { return ConstantNode.forFloatingStamp(stamp(), 0.0f, graph()); } - if (x().isConstant() && y().isConstant()) { - return ConstantNode.forPrimitive(evalConst(x().asConstant(), y().asConstant()), graph()); + if (getX().isConstant() && getY().isConstant()) { + return ConstantNode.forPrimitive(evalConst(getX().asConstant(), getY().asConstant()), graph()); } // Constant 0.0 can't be eliminated since it can affect the sign of the result. return this; @@ -62,6 +62,6 @@ @Override public void generate(NodeMappableLIRBuilder builder, ArithmeticLIRGenerator gen) { - builder.setResult(this, gen.emitSub(builder.operand(x()), builder.operand(y()))); + builder.setResult(this, gen.emitSub(builder.operand(getX()), builder.operand(getY()))); } } diff -r 2a1f3a8f76f1 -r df6f2365b153 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 Wed Jun 25 11:20:50 2014 +0200 +++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/calc/IntegerAddNode.java Wed Jun 25 11:20:53 2014 +0200 @@ -40,7 +40,7 @@ @Override public boolean inferStamp() { - return updateStamp(StampTool.add(x().stamp(), y().stamp())); + return updateStamp(StampTool.add(getX().stamp(), getY().stamp())); } @Override @@ -51,29 +51,29 @@ @Override public Node canonical(CanonicalizerTool tool) { - if (x().isConstant() && !y().isConstant()) { - return graph().unique(new IntegerAddNode(stamp(), y(), x())); + if (getX().isConstant() && !getY().isConstant()) { + return graph().unique(new IntegerAddNode(stamp(), getY(), getX())); } - if (x() instanceof IntegerSubNode) { - IntegerSubNode sub = (IntegerSubNode) x(); - if (sub.y() == y()) { + if (getX() instanceof IntegerSubNode) { + IntegerSubNode sub = (IntegerSubNode) getX(); + if (sub.getY() == getY()) { // (a - b) + b - return sub.x(); + return sub.getX(); } } - if (y() instanceof IntegerSubNode) { - IntegerSubNode sub = (IntegerSubNode) y(); - if (sub.y() == x()) { + if (getY() instanceof IntegerSubNode) { + IntegerSubNode sub = (IntegerSubNode) getY(); + if (sub.getY() == getX()) { // b + (a - b) - return sub.x(); + return sub.getX(); } } - if (x().isConstant()) { - return ConstantNode.forPrimitive(evalConst(x().asConstant(), y().asConstant()), graph()); - } else if (y().isConstant()) { - long c = y().asConstant().asLong(); + if (getX().isConstant()) { + return ConstantNode.forPrimitive(evalConst(getX().asConstant(), getY().asConstant()), graph()); + } else if (getY().isConstant()) { + long c = getY().asConstant().asLong(); if (c == 0) { - return x(); + return getX(); } // canonicalize expressions like "(a + 1) + 2" BinaryNode reassociated = BinaryNode.reassociate(this, ValueNode.isConstantPredicate()); @@ -81,20 +81,20 @@ return reassociated; } } - if (x() instanceof NegateNode) { - return IntegerArithmeticNode.sub(graph(), y(), ((NegateNode) x()).getValue()); - } else if (y() instanceof NegateNode) { - return IntegerArithmeticNode.sub(graph(), x(), ((NegateNode) y()).getValue()); + if (getX() instanceof NegateNode) { + return IntegerArithmeticNode.sub(graph(), getY(), ((NegateNode) getX()).getValue()); + } else if (getY() instanceof NegateNode) { + return IntegerArithmeticNode.sub(graph(), getX(), ((NegateNode) getY()).getValue()); } return this; } @Override public void generate(NodeMappableLIRBuilder builder, ArithmeticLIRGenerator gen) { - Value op1 = builder.operand(x()); - assert op1 != null : x() + ", this=" + this; - Value op2 = builder.operand(y()); - if (!y().isConstant() && !FloatAddNode.livesLonger(this, y(), builder)) { + Value op1 = builder.operand(getX()); + assert op1 != null : getX() + ", this=" + this; + Value op2 = builder.operand(getY()); + if (!getY().isConstant() && !FloatAddNode.livesLonger(this, getY(), builder)) { Value op = op1; op1 = op2; op2 = op; diff -r 2a1f3a8f76f1 -r df6f2365b153 graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/calc/IntegerBelowThanNode.java --- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/calc/IntegerBelowThanNode.java Wed Jun 25 11:20:50 2014 +0200 +++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/calc/IntegerBelowThanNode.java Wed Jun 25 11:20:53 2014 +0200 @@ -80,9 +80,9 @@ if (result != this) { return result; } - if (x().isConstant() && x().asConstant().asLong() == 0) { + if (getX().isConstant() && getX().asConstant().asLong() == 0) { // 0 |<| y is the same as 0 != y - return graph().unique(new LogicNegationNode(CompareNode.createCompareNode(graph(), Condition.EQ, x(), y()))); + return graph().unique(new LogicNegationNode(CompareNode.createCompareNode(graph(), Condition.EQ, getX(), getY()))); } return this; } diff -r 2a1f3a8f76f1 -r df6f2365b153 graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/calc/IntegerDivNode.java --- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/calc/IntegerDivNode.java Wed Jun 25 11:20:50 2014 +0200 +++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/calc/IntegerDivNode.java Wed Jun 25 11:20:53 2014 +0200 @@ -82,11 +82,11 @@ // Convert the expression ((a - a % b) / b) into (a / b). if (x() instanceof IntegerSubNode) { IntegerSubNode integerSubNode = (IntegerSubNode) x(); - if (integerSubNode.y() instanceof IntegerRemNode) { - IntegerRemNode integerRemNode = (IntegerRemNode) integerSubNode.y(); - if (integerSubNode.stamp().isCompatible(this.stamp()) && integerRemNode.stamp().isCompatible(this.stamp()) && integerSubNode.x() == integerRemNode.x() && + if (integerSubNode.getY() instanceof IntegerRemNode) { + IntegerRemNode integerRemNode = (IntegerRemNode) integerSubNode.getY(); + if (integerSubNode.stamp().isCompatible(this.stamp()) && integerRemNode.stamp().isCompatible(this.stamp()) && integerSubNode.getX() == integerRemNode.x() && this.y() == integerRemNode.y()) { - return graph().add(new IntegerDivNode(stamp(), integerSubNode.x(), this.y())); + return graph().add(new IntegerDivNode(stamp(), integerSubNode.getX(), this.y())); } } } diff -r 2a1f3a8f76f1 -r df6f2365b153 graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/calc/IntegerEqualsNode.java --- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/calc/IntegerEqualsNode.java Wed Jun 25 11:20:50 2014 +0200 +++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/calc/IntegerEqualsNode.java Wed Jun 25 11:20:53 2014 +0200 @@ -60,10 +60,10 @@ @Override protected LogicNode optimizeNormalizeCmp(Constant constant, NormalizeCompareNode normalizeNode, boolean mirrored) { if (constant.getKind() == Kind.Int && constant.asInt() == 0) { - ValueNode a = mirrored ? normalizeNode.y() : normalizeNode.x(); - ValueNode b = mirrored ? normalizeNode.x() : normalizeNode.y(); + ValueNode a = mirrored ? normalizeNode.getY() : normalizeNode.getX(); + ValueNode b = mirrored ? normalizeNode.getX() : normalizeNode.getY(); - if (normalizeNode.x().getKind() == Kind.Double || normalizeNode.x().getKind() == Kind.Float) { + if (normalizeNode.getX().getKind() == Kind.Double || normalizeNode.getX().getKind() == Kind.Float) { return graph().unique(new FloatEqualsNode(a, b)); } else { return graph().unique(new IntegerEqualsNode(a, b)); @@ -97,42 +97,42 @@ if (constant.asLong() == 0) { if (nonConstant instanceof AndNode) { AndNode andNode = (AndNode) nonConstant; - return graph().unique(new IntegerTestNode(andNode.x(), andNode.y())); + return graph().unique(new IntegerTestNode(andNode.getX(), andNode.getY())); } else if (nonConstant instanceof ShiftNode) { if (nonConstant instanceof LeftShiftNode) { LeftShiftNode shift = (LeftShiftNode) nonConstant; - if (shift.y().isConstant()) { + if (shift.getY().isConstant()) { int mask = shift.getShiftAmountMask(); - int amount = shift.y().asConstant().asInt() & mask; - if (shift.x().getKind() == Kind.Int) { - return graph().unique(new IntegerTestNode(shift.x(), ConstantNode.forInt(-1 >>> amount, graph()))); + int amount = shift.getY().asConstant().asInt() & mask; + if (shift.getX().getKind() == Kind.Int) { + return graph().unique(new IntegerTestNode(shift.getX(), ConstantNode.forInt(-1 >>> amount, graph()))); } else { - assert shift.x().getKind() == Kind.Long; - return graph().unique(new IntegerTestNode(shift.x(), ConstantNode.forLong(-1L >>> amount, graph()))); + assert shift.getX().getKind() == Kind.Long; + return graph().unique(new IntegerTestNode(shift.getX(), ConstantNode.forLong(-1L >>> amount, graph()))); } } } else if (nonConstant instanceof RightShiftNode) { RightShiftNode shift = (RightShiftNode) nonConstant; - if (shift.y().isConstant() && ((IntegerStamp) shift.x().stamp()).isPositive()) { + if (shift.getY().isConstant() && ((IntegerStamp) shift.getX().stamp()).isPositive()) { int mask = shift.getShiftAmountMask(); - int amount = shift.y().asConstant().asInt() & mask; - if (shift.x().getKind() == Kind.Int) { - return graph().unique(new IntegerTestNode(shift.x(), ConstantNode.forInt(-1 << amount, graph()))); + int amount = shift.getY().asConstant().asInt() & mask; + if (shift.getX().getKind() == Kind.Int) { + return graph().unique(new IntegerTestNode(shift.getX(), ConstantNode.forInt(-1 << amount, graph()))); } else { - assert shift.x().getKind() == Kind.Long; - return graph().unique(new IntegerTestNode(shift.x(), ConstantNode.forLong(-1L << amount, graph()))); + assert shift.getX().getKind() == Kind.Long; + return graph().unique(new IntegerTestNode(shift.getX(), ConstantNode.forLong(-1L << amount, graph()))); } } } else if (nonConstant instanceof UnsignedRightShiftNode) { UnsignedRightShiftNode shift = (UnsignedRightShiftNode) nonConstant; - if (shift.y().isConstant()) { + if (shift.getY().isConstant()) { int mask = shift.getShiftAmountMask(); - int amount = shift.y().asConstant().asInt() & mask; - if (shift.x().getKind() == Kind.Int) { - return graph().unique(new IntegerTestNode(shift.x(), ConstantNode.forInt(-1 << amount, graph()))); + int amount = shift.getY().asConstant().asInt() & mask; + if (shift.getX().getKind() == Kind.Int) { + return graph().unique(new IntegerTestNode(shift.getX(), ConstantNode.forInt(-1 << amount, graph()))); } else { - assert shift.x().getKind() == Kind.Long; - return graph().unique(new IntegerTestNode(shift.x(), ConstantNode.forLong(-1L << amount, graph()))); + assert shift.getX().getKind() == Kind.Long; + return graph().unique(new IntegerTestNode(shift.getX(), ConstantNode.forLong(-1L << amount, graph()))); } } } diff -r 2a1f3a8f76f1 -r df6f2365b153 graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/calc/IntegerLessThanNode.java --- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/calc/IntegerLessThanNode.java Wed Jun 25 11:20:50 2014 +0200 +++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/calc/IntegerLessThanNode.java Wed Jun 25 11:20:53 2014 +0200 @@ -61,10 +61,10 @@ protected LogicNode optimizeNormalizeCmp(Constant constant, NormalizeCompareNode normalizeNode, boolean mirrored) { assert condition() == Condition.LT; if (constant.getKind() == Kind.Int && constant.asInt() == 0) { - ValueNode a = mirrored ? normalizeNode.y() : normalizeNode.x(); - ValueNode b = mirrored ? normalizeNode.x() : normalizeNode.y(); + ValueNode a = mirrored ? normalizeNode.getY() : normalizeNode.getX(); + ValueNode b = mirrored ? normalizeNode.getX() : normalizeNode.getY(); - if (normalizeNode.x().getKind() == Kind.Double || normalizeNode.x().getKind() == Kind.Float) { + if (normalizeNode.getX().getKind() == Kind.Double || normalizeNode.getX().getKind() == Kind.Float) { return graph().unique(new FloatLessThanNode(a, b, mirrored ^ normalizeNode.isUnorderedLess)); } else { return graph().unique(new IntegerLessThanNode(a, b)); @@ -95,9 +95,9 @@ if (result != this) { return result; } - if (x().stamp() instanceof IntegerStamp && y().stamp() instanceof IntegerStamp) { - if (IntegerStamp.sameSign((IntegerStamp) x().stamp(), (IntegerStamp) y().stamp())) { - return graph().unique(new IntegerBelowThanNode(x(), y())); + if (getX().stamp() instanceof IntegerStamp && getY().stamp() instanceof IntegerStamp) { + if (IntegerStamp.sameSign((IntegerStamp) getX().stamp(), (IntegerStamp) getY().stamp())) { + return graph().unique(new IntegerBelowThanNode(getX(), getY())); } } return this; diff -r 2a1f3a8f76f1 -r df6f2365b153 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 Wed Jun 25 11:20:50 2014 +0200 +++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/calc/IntegerMulNode.java Wed Jun 25 11:20:53 2014 +0200 @@ -46,22 +46,22 @@ @Override public Node canonical(CanonicalizerTool tool) { - if (x().isConstant() && !y().isConstant()) { - return graph().unique(new IntegerMulNode(stamp(), y(), x())); + if (getX().isConstant() && !getY().isConstant()) { + return graph().unique(new IntegerMulNode(stamp(), getY(), getX())); } - if (x().isConstant()) { - return ConstantNode.forPrimitive(evalConst(x().asConstant(), y().asConstant()), graph()); - } else if (y().isConstant()) { - long c = y().asConstant().asLong(); + if (getX().isConstant()) { + return ConstantNode.forPrimitive(evalConst(getX().asConstant(), getY().asConstant()), graph()); + } else if (getY().isConstant()) { + long c = getY().asConstant().asLong(); if (c == 1) { - return x(); + return getX(); } if (c == 0) { return ConstantNode.forIntegerStamp(stamp(), 0, graph()); } long abs = Math.abs(c); if (abs > 0 && CodeUtil.isPowerOf2(abs)) { - LeftShiftNode shift = graph().unique(new LeftShiftNode(stamp().unrestricted(), x(), ConstantNode.forInt(CodeUtil.log2(abs), graph()))); + LeftShiftNode shift = graph().unique(new LeftShiftNode(stamp().unrestricted(), getX(), ConstantNode.forInt(CodeUtil.log2(abs), graph()))); if (c < 0) { return graph().unique(new NegateNode(shift)); } else { @@ -76,9 +76,9 @@ @Override public void generate(NodeMappableLIRBuilder builder, ArithmeticLIRGenerator gen) { - Value op1 = builder.operand(x()); - Value op2 = builder.operand(y()); - if (!y().isConstant() && !FloatAddNode.livesLonger(this, y(), builder)) { + Value op1 = builder.operand(getX()); + Value op2 = builder.operand(getY()); + if (!getY().isConstant() && !FloatAddNode.livesLonger(this, getY(), builder)) { Value op = op1; op1 = op2; op2 = op; diff -r 2a1f3a8f76f1 -r df6f2365b153 graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/calc/IntegerSubNode.java --- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/calc/IntegerSubNode.java Wed Jun 25 11:20:50 2014 +0200 +++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/calc/IntegerSubNode.java Wed Jun 25 11:20:53 2014 +0200 @@ -40,7 +40,7 @@ @Override public boolean inferStamp() { - return updateStamp(StampTool.sub(x().stamp(), y().stamp())); + return updateStamp(StampTool.sub(getX().stamp(), getY().stamp())); } @Override @@ -51,74 +51,74 @@ @Override public Node canonical(CanonicalizerTool tool) { - if (x() == y()) { + if (getX() == getY()) { return ConstantNode.forIntegerStamp(stamp(), 0, graph()); } - if (x() instanceof IntegerAddNode) { - IntegerAddNode x = (IntegerAddNode) x(); - if (x.y() == y()) { + if (getX() instanceof IntegerAddNode) { + IntegerAddNode x = (IntegerAddNode) getX(); + if (x.getY() == getY()) { // (a + b) - b - return x.x(); + return x.getX(); } - if (x.x() == y()) { + if (x.getX() == getY()) { // (a + b) - a - return x.y(); + return x.getY(); } - } else if (x() instanceof IntegerSubNode) { - IntegerSubNode x = (IntegerSubNode) x(); - if (x.x() == y()) { + } else if (getX() instanceof IntegerSubNode) { + IntegerSubNode x = (IntegerSubNode) getX(); + if (x.getX() == getY()) { // (a - b) - a - return graph().unique(new NegateNode(x.y())); + return graph().unique(new NegateNode(x.getY())); } } - if (y() instanceof IntegerAddNode) { - IntegerAddNode y = (IntegerAddNode) y(); - if (y.x() == x()) { + if (getY() instanceof IntegerAddNode) { + IntegerAddNode y = (IntegerAddNode) getY(); + if (y.getX() == getX()) { // a - (a + b) - return graph().unique(new NegateNode(y.y())); + return graph().unique(new NegateNode(y.getY())); } - if (y.y() == x()) { + if (y.getY() == getX()) { // b - (a + b) - return graph().unique(new NegateNode(y.x())); + return graph().unique(new NegateNode(y.getX())); } - } else if (y() instanceof IntegerSubNode) { - IntegerSubNode y = (IntegerSubNode) y(); - if (y.x() == x()) { + } else if (getY() instanceof IntegerSubNode) { + IntegerSubNode y = (IntegerSubNode) getY(); + if (y.getX() == getX()) { // a - (a - b) - return y.y(); + return y.getY(); } } - if (x().isConstant() && y().isConstant()) { - return ConstantNode.forPrimitive(evalConst(x().asConstant(), y().asConstant()), graph()); - } else if (y().isConstant()) { - long c = y().asConstant().asLong(); + if (getX().isConstant() && getY().isConstant()) { + return ConstantNode.forPrimitive(evalConst(getX().asConstant(), getY().asConstant()), graph()); + } else if (getY().isConstant()) { + long c = getY().asConstant().asLong(); if (c == 0) { - return x(); + return getX(); } BinaryNode reassociated = BinaryNode.reassociate(this, ValueNode.isConstantPredicate()); if (reassociated != this) { return reassociated; } - if (c < 0 || ((IntegerStamp) StampFactory.forKind(y().getKind())).contains(-c)) { + if (c < 0 || ((IntegerStamp) StampFactory.forKind(getY().getKind())).contains(-c)) { // Adding a negative is more friendly to the backend since adds are // commutative, so prefer add when it fits. - return IntegerArithmeticNode.add(graph(), x(), ConstantNode.forIntegerStamp(stamp(), -c, graph())); + return IntegerArithmeticNode.add(graph(), getX(), ConstantNode.forIntegerStamp(stamp(), -c, graph())); } - } else if (x().isConstant()) { - long c = x().asConstant().asLong(); + } else if (getX().isConstant()) { + long c = getX().asConstant().asLong(); if (c == 0) { - return graph().unique(new NegateNode(y())); + return graph().unique(new NegateNode(getY())); } return BinaryNode.reassociate(this, ValueNode.isConstantPredicate()); } - if (y() instanceof NegateNode) { - return IntegerArithmeticNode.add(graph(), x(), ((NegateNode) y()).getValue()); + if (getY() instanceof NegateNode) { + return IntegerArithmeticNode.add(graph(), getX(), ((NegateNode) getY()).getValue()); } return this; } @Override public void generate(NodeMappableLIRBuilder builder, ArithmeticLIRGenerator gen) { - builder.setResult(this, gen.emitSub(builder.operand(x()), builder.operand(y()))); + builder.setResult(this, gen.emitSub(builder.operand(getX()), builder.operand(getY()))); } } diff -r 2a1f3a8f76f1 -r df6f2365b153 graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/calc/IntegerTestNode.java --- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/calc/IntegerTestNode.java Wed Jun 25 11:20:50 2014 +0200 +++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/calc/IntegerTestNode.java Wed Jun 25 11:20:53 2014 +0200 @@ -49,7 +49,7 @@ if (forX.isConstant() && forY.isConstant()) { return TriState.get((forX.asConstant().asLong() & forY.asConstant().asLong()) == 0); } - if (x().stamp() instanceof IntegerStamp && y().stamp() instanceof IntegerStamp) { + if (getX().stamp() instanceof IntegerStamp && getY().stamp() instanceof IntegerStamp) { IntegerStamp xStamp = (IntegerStamp) forX.stamp(); IntegerStamp yStamp = (IntegerStamp) forY.stamp(); if ((xStamp.upMask() & yStamp.upMask()) == 0) { diff -r 2a1f3a8f76f1 -r df6f2365b153 graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/calc/IsNullNode.java --- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/calc/IsNullNode.java Wed Jun 25 11:20:50 2014 +0200 +++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/calc/IsNullNode.java Wed Jun 25 11:20:53 2014 +0200 @@ -52,14 +52,14 @@ @Override public boolean verify() { - assertTrue(object() != null, "is null input must not be null"); - assertTrue(object().stamp() instanceof AbstractObjectStamp, "is null input must be an object"); + assertTrue(getValue() != null, "is null input must not be null"); + assertTrue(getValue().stamp() instanceof AbstractObjectStamp, "is null input must be an object"); return super.verify(); } @Override public Node canonical(CanonicalizerTool tool) { - switch (evaluate(object())) { + switch (evaluate(getValue())) { case FALSE: return LogicConstantNode.contradiction(graph()); case TRUE: @@ -83,7 +83,7 @@ @Override public void virtualize(VirtualizerTool tool) { - if (tool.getObjectState(object()) != null) { + if (tool.getObjectState(getValue()) != null) { tool.replaceWithValue(LogicConstantNode.contradiction(graph())); } } diff -r 2a1f3a8f76f1 -r df6f2365b153 graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/calc/LeftShiftNode.java --- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/calc/LeftShiftNode.java Wed Jun 25 11:20:50 2014 +0200 +++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/calc/LeftShiftNode.java Wed Jun 25 11:20:53 2014 +0200 @@ -40,7 +40,7 @@ @Override public boolean inferStamp() { - return updateStamp(StampTool.leftShift(x().stamp(), y().stamp())); + return updateStamp(StampTool.leftShift(getX().stamp(), getY().stamp())); } @Override @@ -56,38 +56,38 @@ @Override public Node canonical(CanonicalizerTool tool) { - if (x().isConstant() && y().isConstant()) { - return ConstantNode.forPrimitive(evalConst(x().asConstant(), y().asConstant()), graph()); - } else if (y().isConstant()) { - int amount = y().asConstant().asInt(); + if (getX().isConstant() && getY().isConstant()) { + return ConstantNode.forPrimitive(evalConst(getX().asConstant(), getY().asConstant()), graph()); + } else if (getY().isConstant()) { + int amount = getY().asConstant().asInt(); int originalAmout = amount; int mask = getShiftAmountMask(); amount &= mask; if (amount == 0) { - return x(); + return getX(); } - if (x() instanceof ShiftNode) { - ShiftNode other = (ShiftNode) x(); - if (other.y().isConstant()) { - int otherAmount = other.y().asConstant().asInt() & mask; + if (getX() instanceof ShiftNode) { + ShiftNode other = (ShiftNode) getX(); + if (other.getY().isConstant()) { + int otherAmount = other.getY().asConstant().asInt() & mask; if (other instanceof LeftShiftNode) { int total = amount + otherAmount; if (total != (total & mask)) { return ConstantNode.forIntegerKind(getKind(), 0, graph()); } - return graph().unique(new LeftShiftNode(stamp(), other.x(), ConstantNode.forInt(total, graph()))); + return graph().unique(new LeftShiftNode(stamp(), other.getX(), ConstantNode.forInt(total, graph()))); } else if ((other instanceof RightShiftNode || other instanceof UnsignedRightShiftNode) && otherAmount == amount) { if (getKind() == Kind.Long) { - return graph().unique(new AndNode(stamp(), other.x(), ConstantNode.forLong(-1L << amount, graph()))); + return graph().unique(new AndNode(stamp(), other.getX(), ConstantNode.forLong(-1L << amount, graph()))); } else { assert getKind() == Kind.Int; - return graph().unique(new AndNode(stamp(), other.x(), ConstantNode.forInt(-1 << amount, graph()))); + return graph().unique(new AndNode(stamp(), other.getX(), ConstantNode.forInt(-1 << amount, graph()))); } } } } if (originalAmout != amount) { - return graph().unique(new LeftShiftNode(stamp(), x(), ConstantNode.forInt(amount, graph()))); + return graph().unique(new LeftShiftNode(stamp(), getX(), ConstantNode.forInt(amount, graph()))); } } return this; @@ -95,6 +95,6 @@ @Override public void generate(NodeMappableLIRBuilder builder, ArithmeticLIRGenerator gen) { - builder.setResult(this, gen.emitShl(builder.operand(x()), builder.operand(y()))); + builder.setResult(this, gen.emitShl(builder.operand(getX()), builder.operand(getY()))); } } diff -r 2a1f3a8f76f1 -r df6f2365b153 graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/calc/NegateNode.java --- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/calc/NegateNode.java Wed Jun 25 11:20:50 2014 +0200 +++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/calc/NegateNode.java Wed Jun 25 11:20:53 2014 +0200 @@ -77,7 +77,7 @@ } if (getValue() instanceof IntegerSubNode) { IntegerSubNode sub = (IntegerSubNode) getValue(); - return IntegerArithmeticNode.sub(graph(), sub.y(), sub.x()); + return IntegerArithmeticNode.sub(graph(), sub.getY(), sub.getX()); } return this; } diff -r 2a1f3a8f76f1 -r df6f2365b153 graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/calc/NormalizeCompareNode.java --- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/calc/NormalizeCompareNode.java Wed Jun 25 11:20:50 2014 +0200 +++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/calc/NormalizeCompareNode.java Wed Jun 25 11:20:53 2014 +0200 @@ -53,12 +53,12 @@ public void lower(LoweringTool tool) { LogicNode equalComp; LogicNode lessComp; - if (x().stamp() instanceof FloatStamp) { - equalComp = graph().unique(new FloatEqualsNode(x(), y())); - lessComp = graph().unique(new FloatLessThanNode(x(), y(), isUnorderedLess)); + if (getX().stamp() instanceof FloatStamp) { + equalComp = graph().unique(new FloatEqualsNode(getX(), getY())); + lessComp = graph().unique(new FloatLessThanNode(getX(), getY(), isUnorderedLess)); } else { - equalComp = graph().unique(new IntegerEqualsNode(x(), y())); - lessComp = graph().unique(new IntegerLessThanNode(x(), y())); + equalComp = graph().unique(new IntegerEqualsNode(getX(), getY())); + lessComp = graph().unique(new IntegerLessThanNode(getX(), getY())); } ConditionalNode equalValue = graph().unique(new ConditionalNode(equalComp, ConstantNode.forInt(0, graph()), ConstantNode.forInt(1, graph()))); diff -r 2a1f3a8f76f1 -r df6f2365b153 graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/calc/ObjectEqualsNode.java --- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/calc/ObjectEqualsNode.java Wed Jun 25 11:20:50 2014 +0200 +++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/calc/ObjectEqualsNode.java Wed Jun 25 11:20:53 2014 +0200 @@ -74,10 +74,10 @@ if (result != this) { return result; } - if (StampTool.isObjectAlwaysNull(x())) { - return graph().unique(new IsNullNode(y())); - } else if (StampTool.isObjectAlwaysNull(y())) { - return graph().unique(new IsNullNode(x())); + if (StampTool.isObjectAlwaysNull(getX())) { + return graph().unique(new IsNullNode(getY())); + } else if (StampTool.isObjectAlwaysNull(getY())) { + return graph().unique(new IsNullNode(getX())); } return this; } @@ -103,15 +103,15 @@ @Override public void virtualize(VirtualizerTool tool) { - State stateX = tool.getObjectState(x()); - State stateY = tool.getObjectState(y()); + State stateX = tool.getObjectState(getX()); + State stateY = tool.getObjectState(getY()); boolean xVirtual = stateX != null && stateX.getState() == EscapeState.Virtual; boolean yVirtual = stateY != null && stateY.getState() == EscapeState.Virtual; if (xVirtual && !yVirtual) { - virtualizeNonVirtualComparison(stateX, stateY != null ? stateY.getMaterializedValue() : y(), tool); + virtualizeNonVirtualComparison(stateX, stateY != null ? stateY.getMaterializedValue() : getY(), tool); } else if (!xVirtual && yVirtual) { - virtualizeNonVirtualComparison(stateY, stateX != null ? stateX.getMaterializedValue() : x(), tool); + virtualizeNonVirtualComparison(stateY, stateX != null ? stateX.getMaterializedValue() : getX(), tool); } else if (xVirtual && yVirtual) { boolean xIdentity = stateX.getVirtualObject().hasIdentity(); boolean yIdentity = stateY.getVirtualObject().hasIdentity(); diff -r 2a1f3a8f76f1 -r df6f2365b153 graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/calc/OrNode.java --- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/calc/OrNode.java Wed Jun 25 11:20:50 2014 +0200 +++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/calc/OrNode.java Wed Jun 25 11:20:53 2014 +0200 @@ -40,7 +40,7 @@ @Override public boolean inferStamp() { - return updateStamp(StampTool.or(x().stamp(), y().stamp())); + return updateStamp(StampTool.or(getX().stamp(), getY().stamp())); } @Override @@ -51,22 +51,22 @@ @Override public Node canonical(CanonicalizerTool tool) { - if (x() == y()) { - return x(); + if (getX() == getY()) { + return getX(); } - if (x().isConstant() && !y().isConstant()) { - return graph().unique(new OrNode(stamp(), y(), x())); + if (getX().isConstant() && !getY().isConstant()) { + return graph().unique(new OrNode(stamp(), getY(), getX())); } - if (x().isConstant()) { - return ConstantNode.forPrimitive(stamp(), evalConst(x().asConstant(), y().asConstant()), graph()); - } else if (y().isConstant()) { - long rawY = y().asConstant().asLong(); + if (getX().isConstant()) { + return ConstantNode.forPrimitive(stamp(), evalConst(getX().asConstant(), getY().asConstant()), graph()); + } else if (getY().isConstant()) { + long rawY = getY().asConstant().asLong(); long mask = IntegerStamp.defaultMask(PrimitiveStamp.getBits(stamp())); if ((rawY & mask) == mask) { return ConstantNode.forIntegerStamp(stamp(), mask, graph()); } if ((rawY & mask) == 0) { - return x(); + return getX(); } return BinaryNode.reassociate(this, ValueNode.isConstantPredicate()); } @@ -75,6 +75,6 @@ @Override public void generate(NodeMappableLIRBuilder builder, ArithmeticLIRGenerator gen) { - builder.setResult(this, gen.emitOr(builder.operand(x()), builder.operand(y()))); + builder.setResult(this, gen.emitOr(builder.operand(getX()), builder.operand(getY()))); } } diff -r 2a1f3a8f76f1 -r df6f2365b153 graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/calc/RightShiftNode.java --- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/calc/RightShiftNode.java Wed Jun 25 11:20:50 2014 +0200 +++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/calc/RightShiftNode.java Wed Jun 25 11:20:53 2014 +0200 @@ -50,28 +50,28 @@ @Override public Node canonical(CanonicalizerTool tool) { - if (x().stamp() instanceof IntegerStamp && ((IntegerStamp) x().stamp()).isPositive()) { - return graph().unique(new UnsignedRightShiftNode(stamp(), x(), y())); + if (getX().stamp() instanceof IntegerStamp && ((IntegerStamp) getX().stamp()).isPositive()) { + return graph().unique(new UnsignedRightShiftNode(stamp(), getX(), getY())); } - if (x().isConstant() && y().isConstant()) { - return ConstantNode.forPrimitive(evalConst(x().asConstant(), y().asConstant()), graph()); - } else if (y().isConstant()) { - int amount = y().asConstant().asInt(); + if (getX().isConstant() && getY().isConstant()) { + return ConstantNode.forPrimitive(evalConst(getX().asConstant(), getY().asConstant()), graph()); + } else if (getY().isConstant()) { + int amount = getY().asConstant().asInt(); int originalAmout = amount; int mask = getShiftAmountMask(); amount &= mask; if (amount == 0) { - return x(); + return getX(); } - if (x() instanceof ShiftNode) { - ShiftNode other = (ShiftNode) x(); - if (other.y().isConstant()) { - int otherAmount = other.y().asConstant().asInt() & mask; + if (getX() instanceof ShiftNode) { + ShiftNode other = (ShiftNode) getX(); + if (other.getY().isConstant()) { + int otherAmount = other.getY().asConstant().asInt() & mask; if (other instanceof RightShiftNode) { int total = amount + otherAmount; if (total != (total & mask)) { - assert other.x().stamp() instanceof IntegerStamp; - IntegerStamp istamp = (IntegerStamp) other.x().stamp(); + assert other.getX().stamp() instanceof IntegerStamp; + IntegerStamp istamp = (IntegerStamp) other.getX().stamp(); if (istamp.isPositive()) { return ConstantNode.forIntegerKind(getKind(), 0, graph()); @@ -85,14 +85,14 @@ * full shift for this kind */ assert total >= mask; - return graph().unique(new RightShiftNode(stamp(), other.x(), ConstantNode.forInt(mask, graph()))); + return graph().unique(new RightShiftNode(stamp(), other.getX(), ConstantNode.forInt(mask, graph()))); } - return graph().unique(new RightShiftNode(stamp(), other.x(), ConstantNode.forInt(total, graph()))); + return graph().unique(new RightShiftNode(stamp(), other.getX(), ConstantNode.forInt(total, graph()))); } } } if (originalAmout != amount) { - return graph().unique(new RightShiftNode(stamp(), x(), ConstantNode.forInt(amount, graph()))); + return graph().unique(new RightShiftNode(stamp(), getX(), ConstantNode.forInt(amount, graph()))); } } return this; @@ -100,6 +100,6 @@ @Override public void generate(NodeMappableLIRBuilder builder, ArithmeticLIRGenerator gen) { - builder.setResult(this, gen.emitShr(builder.operand(x()), builder.operand(y()))); + builder.setResult(this, gen.emitShr(builder.operand(getX()), builder.operand(getY()))); } } diff -r 2a1f3a8f76f1 -r df6f2365b153 graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/calc/UnsignedRightShiftNode.java --- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/calc/UnsignedRightShiftNode.java Wed Jun 25 11:20:50 2014 +0200 +++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/calc/UnsignedRightShiftNode.java Wed Jun 25 11:20:53 2014 +0200 @@ -40,7 +40,7 @@ @Override public boolean inferStamp() { - return updateStamp(StampTool.unsignedRightShift(x().stamp(), y().stamp())); + return updateStamp(StampTool.unsignedRightShift(getX().stamp(), getY().stamp())); } @Override @@ -56,38 +56,38 @@ @Override public Node canonical(CanonicalizerTool tool) { - if (x().isConstant() && y().isConstant()) { - return ConstantNode.forPrimitive(evalConst(x().asConstant(), y().asConstant()), graph()); - } else if (y().isConstant()) { - int amount = y().asConstant().asInt(); + if (getX().isConstant() && getY().isConstant()) { + return ConstantNode.forPrimitive(evalConst(getX().asConstant(), getY().asConstant()), graph()); + } else if (getY().isConstant()) { + int amount = getY().asConstant().asInt(); int originalAmout = amount; int mask = getShiftAmountMask(); amount &= mask; if (amount == 0) { - return x(); + return getX(); } - if (x() instanceof ShiftNode) { - ShiftNode other = (ShiftNode) x(); - if (other.y().isConstant()) { - int otherAmount = other.y().asConstant().asInt() & mask; + if (getX() instanceof ShiftNode) { + ShiftNode other = (ShiftNode) getX(); + if (other.getY().isConstant()) { + int otherAmount = other.getY().asConstant().asInt() & mask; if (other instanceof UnsignedRightShiftNode) { int total = amount + otherAmount; if (total != (total & mask)) { return ConstantNode.forIntegerKind(getKind(), 0, graph()); } - return graph().unique(new UnsignedRightShiftNode(stamp(), other.x(), ConstantNode.forInt(total, graph()))); + return graph().unique(new UnsignedRightShiftNode(stamp(), other.getX(), ConstantNode.forInt(total, graph()))); } else if (other instanceof LeftShiftNode && otherAmount == amount) { if (getKind() == Kind.Long) { - return graph().unique(new AndNode(stamp(), other.x(), ConstantNode.forLong(-1L >>> amount, graph()))); + return graph().unique(new AndNode(stamp(), other.getX(), ConstantNode.forLong(-1L >>> amount, graph()))); } else { assert getKind() == Kind.Int; - return graph().unique(new AndNode(stamp(), other.x(), ConstantNode.forInt(-1 >>> amount, graph()))); + return graph().unique(new AndNode(stamp(), other.getX(), ConstantNode.forInt(-1 >>> amount, graph()))); } } } } if (originalAmout != amount) { - return graph().unique(new UnsignedRightShiftNode(stamp(), x(), ConstantNode.forInt(amount, graph()))); + return graph().unique(new UnsignedRightShiftNode(stamp(), getX(), ConstantNode.forInt(amount, graph()))); } } return this; @@ -95,6 +95,6 @@ @Override public void generate(NodeMappableLIRBuilder builder, ArithmeticLIRGenerator gen) { - builder.setResult(this, gen.emitUShr(builder.operand(x()), builder.operand(y()))); + builder.setResult(this, gen.emitUShr(builder.operand(getX()), builder.operand(getY()))); } } diff -r 2a1f3a8f76f1 -r df6f2365b153 graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/calc/XorNode.java --- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/calc/XorNode.java Wed Jun 25 11:20:50 2014 +0200 +++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/calc/XorNode.java Wed Jun 25 11:20:53 2014 +0200 @@ -40,7 +40,7 @@ @Override public boolean inferStamp() { - return updateStamp(StampTool.xor(x().stamp(), y().stamp())); + return updateStamp(StampTool.xor(getX().stamp(), getY().stamp())); } @Override @@ -51,21 +51,21 @@ @Override public Node canonical(CanonicalizerTool tool) { - if (x() == y()) { + if (getX() == getY()) { return ConstantNode.forIntegerStamp(stamp(), 0, graph()); } - if (x().isConstant() && !y().isConstant()) { - return graph().unique(new XorNode(stamp(), y(), x())); + if (getX().isConstant() && !getY().isConstant()) { + return graph().unique(new XorNode(stamp(), getY(), getX())); } - if (x().isConstant()) { - return ConstantNode.forPrimitive(stamp(), evalConst(x().asConstant(), y().asConstant()), graph()); - } else if (y().isConstant()) { - long rawY = y().asConstant().asLong(); + if (getX().isConstant()) { + return ConstantNode.forPrimitive(stamp(), evalConst(getX().asConstant(), getY().asConstant()), graph()); + } else if (getY().isConstant()) { + long rawY = getY().asConstant().asLong(); long mask = IntegerStamp.defaultMask(PrimitiveStamp.getBits(stamp())); if ((rawY & mask) == 0) { - return x(); + return getX(); } else if ((rawY & mask) == mask) { - return graph().unique(new NotNode(x())); + return graph().unique(new NotNode(getX())); } return BinaryNode.reassociate(this, ValueNode.isConstantPredicate()); } @@ -74,6 +74,6 @@ @Override public void generate(NodeMappableLIRBuilder builder, ArithmeticLIRGenerator gen) { - builder.setResult(this, gen.emitXor(builder.operand(x()), builder.operand(y()))); + builder.setResult(this, gen.emitXor(builder.operand(getX()), builder.operand(getY()))); } } diff -r 2a1f3a8f76f1 -r df6f2365b153 graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/extended/BranchProbabilityNode.java --- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/extended/BranchProbabilityNode.java Wed Jun 25 11:20:50 2014 +0200 +++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/extended/BranchProbabilityNode.java Wed Jun 25 11:20:53 2014 +0200 @@ -78,9 +78,9 @@ boolean couldSet = false; for (IntegerEqualsNode node : this.usages().filter(IntegerEqualsNode.class)) { if (node.condition() == Condition.EQ) { - ValueNode other = node.x(); - if (node.x() == this) { - other = node.y(); + ValueNode other = node.getX(); + if (node.getX() == this) { + other = node.getY(); } if (other.isConstant()) { double probabilityToSet = probabilityValue; diff -r 2a1f3a8f76f1 -r df6f2365b153 graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/java/InstanceOfNode.java --- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/java/InstanceOfNode.java Wed Jun 25 11:20:50 2014 +0200 +++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/java/InstanceOfNode.java Wed Jun 25 11:20:53 2014 +0200 @@ -59,13 +59,13 @@ @Override public Node canonical(CanonicalizerTool tool) { - switch (evaluate(object())) { + switch (evaluate(getValue())) { case FALSE: return LogicConstantNode.contradiction(graph()); case TRUE: return LogicConstantNode.tautology(graph()); case UNKNOWN: - Stamp stamp = object().stamp(); + Stamp stamp = getValue().stamp(); if (stamp instanceof ObjectStamp) { ObjectStamp objectStamp = (ObjectStamp) stamp; ResolvedJavaType stampType = objectStamp.type(); @@ -73,7 +73,7 @@ if (!objectStamp.nonNull()) { // the instanceof matches if the object is non-null, so return true // depending on the null-ness. - IsNullNode isNull = graph().unique(new IsNullNode(object())); + IsNullNode isNull = graph().unique(new IsNullNode(getValue())); return graph().unique(new LogicNegationNode(isNull)); } } @@ -138,7 +138,7 @@ @Override public void virtualize(VirtualizerTool tool) { - State state = tool.getObjectState(object()); + State state = tool.getObjectState(getValue()); if (state != null) { tool.replaceWithValue(LogicConstantNode.forBoolean(type().isAssignableFrom(state.getVirtualObject().type()), graph())); } diff -r 2a1f3a8f76f1 -r df6f2365b153 graal/com.oracle.graal.phases.common/src/com/oracle/graal/phases/common/ConditionalEliminationPhase.java --- a/graal/com.oracle.graal.phases.common/src/com/oracle/graal/phases/common/ConditionalEliminationPhase.java Wed Jun 25 11:20:50 2014 +0200 +++ b/graal/com.oracle.graal.phases.common/src/com/oracle/graal/phases/common/ConditionalEliminationPhase.java Wed Jun 25 11:20:53 2014 +0200 @@ -373,16 +373,16 @@ if (isTrue && condition instanceof InstanceOfNode) { InstanceOfNode instanceOf = (InstanceOfNode) condition; - ValueNode object = instanceOf.object(); + ValueNode object = instanceOf.getValue(); state.addNullness(false, object); state.addType(instanceOf.type(), object); } else if (condition instanceof IsNullNode) { IsNullNode nullCheck = (IsNullNode) condition; - state.addNullness(isTrue, nullCheck.object()); + state.addNullness(isTrue, nullCheck.getValue()); } else if (condition instanceof ObjectEqualsNode) { ObjectEqualsNode equals = (ObjectEqualsNode) condition; - ValueNode x = equals.x(); - ValueNode y = equals.y(); + ValueNode x = equals.getX(); + ValueNode y = equals.getY(); if (isTrue) { if (state.isNull(x) && !state.isNull(y)) { metricObjectEqualsRegistered.increment(); @@ -452,16 +452,16 @@ return null; } IntegerBelowThanNode below = (IntegerBelowThanNode) guard.condition(); - if (below.x().getKind() == Kind.Int && below.x().isConstant() && !below.y().isConstant()) { - Stamp stamp = StampTool.unsignedCompare(below.x().stamp(), below.y().stamp()); + if (below.getX().getKind() == 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.y(), stamp, guard); + return new GuardedStamp(below.getY(), stamp, guard); } } - if (below.y().getKind() == Kind.Int && below.y().isConstant() && !below.x().isConstant()) { - Stamp stamp = StampTool.unsignedCompare(below.x().stamp(), below.y().stamp()); + if (below.getY().getKind() == 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.x(), stamp, guard); + return new GuardedStamp(below.getX(), stamp, guard); } } } @@ -522,13 +522,13 @@ GuardNode existingGuard = null; if (guard.condition() instanceof IntegerBelowThanNode) { IntegerBelowThanNode below = (IntegerBelowThanNode) guard.condition(); - IntegerStamp xStamp = (IntegerStamp) below.x().stamp(); - IntegerStamp yStamp = (IntegerStamp) below.y().stamp(); - GuardedStamp cstamp = state.valueConstraints.get(below.x()); + IntegerStamp xStamp = (IntegerStamp) below.getX().stamp(); + IntegerStamp yStamp = (IntegerStamp) below.getY().stamp(); + GuardedStamp cstamp = state.valueConstraints.get(below.getX()); if (cstamp != null) { xStamp = (IntegerStamp) cstamp.getStamp(); } else { - cstamp = state.valueConstraints.get(below.y()); + cstamp = state.valueConstraints.get(below.getY()); if (cstamp != null) { yStamp = (IntegerStamp) cstamp.getStamp(); } @@ -552,10 +552,10 @@ } } else if (guard.condition() instanceof IntegerEqualsNode && guard.negated()) { IntegerEqualsNode equals = (IntegerEqualsNode) guard.condition(); - GuardedStamp cstamp = state.valueConstraints.get(equals.y()); - if (cstamp != null && equals.x().isConstant()) { + GuardedStamp cstamp = state.valueConstraints.get(equals.getY()); + if (cstamp != null && equals.getX().isConstant()) { IntegerStamp stamp = (IntegerStamp) cstamp.getStamp(); - if (!stamp.contains(equals.x().asConstant().asLong())) { + if (!stamp.contains(equals.getX().asConstant().asLong())) { // x != n is true if n is outside the range of the stamp existingGuard = cstamp.getGuard(); Debug.log("existing guard %s %1s proves !%1s", existingGuard, existingGuard.condition(), guard.condition()); @@ -620,7 +620,7 @@ } else { if (condition instanceof InstanceOfNode) { InstanceOfNode instanceOf = (InstanceOfNode) condition; - ValueNode object = instanceOf.object(); + ValueNode object = instanceOf.getValue(); if (state.isNull(object)) { metricInstanceOfRemoved.increment(); return falseValue; @@ -633,7 +633,7 @@ } } else if (condition instanceof IsNullNode) { IsNullNode isNull = (IsNullNode) condition; - ValueNode object = isNull.object(); + ValueNode object = isNull.getValue(); if (state.isNull(object)) { metricNullCheckRemoved.increment(); return trueValue; @@ -643,8 +643,8 @@ } } else if (condition instanceof ObjectEqualsNode) { ObjectEqualsNode equals = (ObjectEqualsNode) condition; - ValueNode x = equals.x(); - ValueNode y = equals.y(); + ValueNode x = equals.getX(); + ValueNode y = equals.getY(); if (state.isNull(x) && state.isNonNull(y) || state.isNonNull(x) && state.isNull(y)) { metricObjectEqualsRemoved.increment(); return falseValue; diff -r 2a1f3a8f76f1 -r df6f2365b153 graal/com.oracle.graal.phases.common/src/com/oracle/graal/phases/common/ConvertDeoptimizeToGuardPhase.java --- a/graal/com.oracle.graal.phases.common/src/com/oracle/graal/phases/common/ConvertDeoptimizeToGuardPhase.java Wed Jun 25 11:20:50 2014 +0200 +++ b/graal/com.oracle.graal.phases.common/src/com/oracle/graal/phases/common/ConvertDeoptimizeToGuardPhase.java Wed Jun 25 11:20:53 2014 +0200 @@ -71,11 +71,11 @@ CompareNode compare = (CompareNode) fixedGuard.condition(); List mergePredecessors = merge.cfgPredecessors().snapshot(); - Constant[] xs = IfNode.constantValues(compare.x(), merge, true); + Constant[] xs = IfNode.constantValues(compare.getX(), merge, true); if (xs == null) { continue; } - Constant[] ys = IfNode.constantValues(compare.y(), merge, true); + Constant[] ys = IfNode.constantValues(compare.getY(), merge, true); if (ys == null) { continue; } diff -r 2a1f3a8f76f1 -r df6f2365b153 graal/com.oracle.graal.phases.common/src/com/oracle/graal/phases/common/GuardLoweringPhase.java --- a/graal/com.oracle.graal.phases.common/src/com/oracle/graal/phases/common/GuardLoweringPhase.java Wed Jun 25 11:20:50 2014 +0200 +++ b/graal/com.oracle.graal.phases.common/src/com/oracle/graal/phases/common/GuardLoweringPhase.java Wed Jun 25 11:20:53 2014 +0200 @@ -117,7 +117,7 @@ private void processGuard(Node node) { GuardNode guard = (GuardNode) node; if (guard.negated() && guard.condition() instanceof IsNullNode && (guard.getSpeculation() == null || guard.getSpeculation().equals(Constant.NULL_OBJECT))) { - ValueNode obj = ((IsNullNode) guard.condition()).object(); + ValueNode obj = ((IsNullNode) guard.condition()).getValue(); nullGuarded.put(obj, guard); } } diff -r 2a1f3a8f76f1 -r df6f2365b153 graal/com.oracle.graal.phases.common/src/com/oracle/graal/phases/common/UseTrappingNullChecksPhase.java --- a/graal/com.oracle.graal.phases.common/src/com/oracle/graal/phases/common/UseTrappingNullChecksPhase.java Wed Jun 25 11:20:50 2014 +0200 +++ b/graal/com.oracle.graal.phases.common/src/com/oracle/graal/phases/common/UseTrappingNullChecksPhase.java Wed Jun 25 11:20:53 2014 +0200 @@ -157,7 +157,7 @@ IsNullNode isNullNode = (IsNullNode) condition; BeginNode nonTrappingContinuation = ifNode.falseSuccessor(); BeginNode trappingContinuation = ifNode.trueSuccessor(); - NullCheckNode trappingNullCheck = deopt.graph().add(new NullCheckNode(isNullNode.object())); + NullCheckNode trappingNullCheck = deopt.graph().add(new NullCheckNode(isNullNode.getValue())); trappingNullCheck.setStateBefore(deopt.stateBefore()); deopt.graph().replaceSplit(ifNode, trappingNullCheck, nonTrappingContinuation); diff -r 2a1f3a8f76f1 -r df6f2365b153 graal/com.oracle.graal.phases.common/src/com/oracle/graal/phases/common/cfs/CastCheckExtractor.java --- a/graal/com.oracle.graal.phases.common/src/com/oracle/graal/phases/common/cfs/CastCheckExtractor.java Wed Jun 25 11:20:50 2014 +0200 +++ b/graal/com.oracle.graal.phases.common/src/com/oracle/graal/phases/common/cfs/CastCheckExtractor.java Wed Jun 25 11:20:53 2014 +0200 @@ -45,7 +45,7 @@ private static CastCheckExtractor extractCastCheckInfo(LogicNode x, LogicNode y) { if (x instanceof IsNullNode) { IsNullNode isNull = (IsNullNode) x; - ValueNode subject = isNull.object(); + ValueNode subject = isNull.getValue(); if (isInstanceOfCheckOn(y, subject)) { InstanceOfNode iOf = (InstanceOfNode) y; return new CastCheckExtractor(iOf.type(), subject); @@ -82,6 +82,6 @@ return false; } InstanceOfNode io = (InstanceOfNode) cond; - return io.object() == subject; + return io.getValue() == subject; } } diff -r 2a1f3a8f76f1 -r df6f2365b153 graal/com.oracle.graal.phases.common/src/com/oracle/graal/phases/common/cfs/EquationalReasoner.java --- a/graal/com.oracle.graal.phases.common/src/com/oracle/graal/phases/common/cfs/EquationalReasoner.java Wed Jun 25 11:20:50 2014 +0200 +++ b/graal/com.oracle.graal.phases.common/src/com/oracle/graal/phases/common/cfs/EquationalReasoner.java Wed Jun 25 11:20:53 2014 +0200 @@ -469,7 +469,7 @@ * */ private LogicNode baseCaseInstanceOfNode(InstanceOfNode instanceOf) { - ValueNode scrutinee = GraphUtil.unproxify(instanceOf.object()); + ValueNode scrutinee = GraphUtil.unproxify(instanceOf.getValue()); if (!FlowUtil.hasLegalObjectStamp(scrutinee)) { return instanceOf; } @@ -494,7 +494,7 @@ * */ private FloatingNode baseCaseIsNullNode(IsNullNode isNu) { - ValueNode object = isNu.object(); + ValueNode object = isNu.getValue(); if (!FlowUtil.hasLegalObjectStamp(object)) { return isNu; } @@ -513,11 +513,11 @@ * otherwise the unmodified argument. */ private LogicNode baseCaseObjectEqualsNode(ObjectEqualsNode equals) { - if (!FlowUtil.hasLegalObjectStamp(equals.x()) || !FlowUtil.hasLegalObjectStamp(equals.y())) { + if (!FlowUtil.hasLegalObjectStamp(equals.getX()) || !FlowUtil.hasLegalObjectStamp(equals.getY())) { return equals; } - ValueNode x = GraphUtil.unproxify(equals.x()); - ValueNode y = GraphUtil.unproxify(equals.y()); + ValueNode x = GraphUtil.unproxify(equals.getX()); + ValueNode y = GraphUtil.unproxify(equals.getY()); if (state.isNull(x) && state.isNonNull(y) || state.isNonNull(x) && state.isNull(y)) { metricObjectEqualsRemoved.increment(); return falseConstant; diff -r 2a1f3a8f76f1 -r df6f2365b153 graal/com.oracle.graal.phases.common/src/com/oracle/graal/phases/common/cfs/GuardingPiReduction.java --- a/graal/com.oracle.graal.phases.common/src/com/oracle/graal/phases/common/cfs/GuardingPiReduction.java Wed Jun 25 11:20:50 2014 +0200 +++ b/graal/com.oracle.graal.phases.common/src/com/oracle/graal/phases/common/cfs/GuardingPiReduction.java Wed Jun 25 11:20:53 2014 +0200 @@ -359,7 +359,7 @@ return false; } IsNullNode isNull = (IsNullNode) cond; - return isNull.object() == subject; + return isNull.getValue() == subject; } /** diff -r 2a1f3a8f76f1 -r df6f2365b153 graal/com.oracle.graal.phases.common/src/com/oracle/graal/phases/common/cfs/State.java --- a/graal/com.oracle.graal.phases.common/src/com/oracle/graal/phases/common/cfs/State.java Wed Jun 25 11:20:50 2014 +0200 +++ b/graal/com.oracle.graal.phases.common/src/com/oracle/graal/phases/common/cfs/State.java Wed Jun 25 11:20:53 2014 +0200 @@ -677,7 +677,7 @@ addFactInstanceOf(isTrue, (InstanceOfNode) condition, anchor); } else if (condition instanceof IsNullNode) { IsNullNode nullCheck = (IsNullNode) condition; - addNullness(isTrue, nullCheck.object(), anchor); + addNullness(isTrue, nullCheck.getValue(), anchor); } else if (condition instanceof ObjectEqualsNode) { addFactObjectEqualsNode(isTrue, (ObjectEqualsNode) condition, anchor); } else { @@ -692,7 +692,7 @@ * */ private void addFactInstanceOf(boolean isTrue, InstanceOfNode instanceOf, GuardingNode anchor) { - ValueNode object = instanceOf.object(); + ValueNode object = instanceOf.getValue(); if (isTrue) { if (knownNotToPassInstanceOf(object, instanceOf.type())) { impossiblePath(); @@ -710,15 +710,15 @@ } private void addFactObjectEqualsNode(boolean isTrue, ObjectEqualsNode equals, GuardingNode anchor) { - if (isDependencyTainted(equals.x(), anchor)) { + if (isDependencyTainted(equals.getX(), anchor)) { return; } - if (isDependencyTainted(equals.y(), anchor)) { + if (isDependencyTainted(equals.getY(), anchor)) { return; } assert anchor instanceof FixedNode; - ValueNode x = GraphUtil.unproxify(equals.x()); - ValueNode y = GraphUtil.unproxify(equals.y()); + ValueNode x = GraphUtil.unproxify(equals.getX()); + ValueNode y = GraphUtil.unproxify(equals.getY()); if (isTrue) { if (isNull(x) && isNonNull(y)) { impossiblePath(); @@ -730,12 +730,12 @@ } if (isNull(x) || isNull(y)) { metricObjectEqualsRegistered.increment(); - addNullness(true, equals.x(), anchor); - addNullness(true, equals.y(), anchor); + addNullness(true, equals.getX(), anchor); + addNullness(true, equals.getY(), anchor); } else if (isNonNull(x) || isNonNull(y)) { metricObjectEqualsRegistered.increment(); - addNullness(false, equals.x(), anchor); - addNullness(false, equals.y(), anchor); + addNullness(false, equals.getX(), anchor); + addNullness(false, equals.getY(), anchor); } Witness wx = typeInfo(x); Witness wy = typeInfo(y); @@ -748,8 +748,8 @@ if (best != null) { assert !best.isInterface(); // type tightening is enough, nullness already taken care of - trackCC(equals.x(), best, anchor); - trackCC(equals.y(), best, anchor); + trackCC(equals.getX(), best, anchor); + trackCC(equals.getY(), best, anchor); } } else if (wx == null) { typeRefinements.put(x, new Witness(wy)); @@ -759,10 +759,10 @@ } else { if (isNull(x) && !isNonNull(y)) { metricObjectEqualsRegistered.increment(); - addNullness(false, equals.y(), anchor); + addNullness(false, equals.getY(), anchor); } else if (!isNonNull(x) && isNull(y)) { metricObjectEqualsRegistered.increment(); - addNullness(false, equals.x(), anchor); + addNullness(false, equals.getX(), anchor); } } } @@ -911,20 +911,20 @@ private Evidence outcomeIsNullNode(boolean isTrue, IsNullNode isNullNode) { if (isTrue) { // grab an anchor attesting nullness - final GuardingNode replacement = nonTrivialNullAnchor(isNullNode.object()); + final GuardingNode replacement = nonTrivialNullAnchor(isNullNode.getValue()); if (replacement != null) { return new Evidence(replacement); } - if (isNonNull(isNullNode.object())) { + if (isNonNull(isNullNode.getValue())) { return Evidence.COUNTEREXAMPLE; } } else { // grab an anchor attesting non-nullness - final Witness w = typeInfo(isNullNode.object()); + final Witness w = typeInfo(isNullNode.getValue()); if (w != null && w.isNonNull()) { return new Evidence(w.guard()); } - if (isNull(isNullNode.object())) { + if (isNull(isNullNode.getValue())) { return Evidence.COUNTEREXAMPLE; } } @@ -936,9 +936,9 @@ * Utility method for {@link #outcome(boolean, com.oracle.graal.nodes.LogicNode)} */ private Evidence outcomeInstanceOfNode(boolean isTrue, InstanceOfNode iOf) { - final Witness w = typeInfo(iOf.object()); + final Witness w = typeInfo(iOf.getValue()); if (isTrue) { - if (isNull(iOf.object())) { + if (isNull(iOf.getValue())) { return Evidence.COUNTEREXAMPLE; } // grab an anchor attesting instanceof @@ -957,7 +957,7 @@ } else { // grab an anchor attesting not-instanceof // (1 of 2) attempt determining nullness - final GuardingNode nullGuard = nonTrivialNullAnchor(iOf.object()); + final GuardingNode nullGuard = nonTrivialNullAnchor(iOf.getValue()); if (nullGuard != null) { return new Evidence(nullGuard); } diff -r 2a1f3a8f76f1 -r df6f2365b153 graal/com.oracle.graal.phases/src/com/oracle/graal/phases/verify/VerifyUsageWithEquals.java --- a/graal/com.oracle.graal.phases/src/com/oracle/graal/phases/verify/VerifyUsageWithEquals.java Wed Jun 25 11:20:50 2014 +0200 +++ b/graal/com.oracle.graal.phases/src/com/oracle/graal/phases/verify/VerifyUsageWithEquals.java Wed Jun 25 11:20:53 2014 +0200 @@ -67,8 +67,8 @@ protected boolean verify(StructuredGraph graph, PhaseContext context) { for (ObjectEqualsNode cn : graph.getNodes().filter(ObjectEqualsNode.class)) { // bail out if we compare an object of type klass with == or != (except null checks) - if (checkUsage(cn.x(), cn.y(), context.getMetaAccess()) && checkUsage(cn.y(), cn.x(), context.getMetaAccess())) { - throw new VerificationError("Verification of " + klass.getName() + " usage failed: Comparing " + cn.x() + " and " + cn.y() + " in " + graph.method() + + if (checkUsage(cn.getX(), cn.getY(), context.getMetaAccess()) && checkUsage(cn.getY(), cn.getX(), context.getMetaAccess())) { + throw new VerificationError("Verification of " + klass.getName() + " usage failed: Comparing " + cn.getX() + " and " + cn.getY() + " in " + graph.method() + " must use .equals() for object equality, not '==' or '!='"); } } diff -r 2a1f3a8f76f1 -r df6f2365b153 graal/com.oracle.graal.replacements.test/src/com/oracle/graal/replacements/test/InstanceOfTest.java --- a/graal/com.oracle.graal.replacements.test/src/com/oracle/graal/replacements/test/InstanceOfTest.java Wed Jun 25 11:20:50 2014 +0200 +++ b/graal/com.oracle.graal.replacements.test/src/com/oracle/graal/replacements/test/InstanceOfTest.java Wed Jun 25 11:20:53 2014 +0200 @@ -50,7 +50,7 @@ protected void replaceProfile(StructuredGraph graph, JavaTypeProfile profile) { InstanceOfNode ion = graph.getNodes().filter(InstanceOfNode.class).first(); if (ion != null) { - InstanceOfNode ionNew = graph.unique(new InstanceOfNode(ion.type(), ion.object(), profile)); + InstanceOfNode ionNew = graph.unique(new InstanceOfNode(ion.type(), ion.getValue(), profile)); graph.replaceFloating(ion, ionNew); } } diff -r 2a1f3a8f76f1 -r df6f2365b153 graal/com.oracle.graal.replacements/src/com/oracle/graal/replacements/DefaultJavaLoweringProvider.java --- a/graal/com.oracle.graal.replacements/src/com/oracle/graal/replacements/DefaultJavaLoweringProvider.java Wed Jun 25 11:20:50 2014 +0200 +++ b/graal/com.oracle.graal.replacements/src/com/oracle/graal/replacements/DefaultJavaLoweringProvider.java Wed Jun 25 11:20:53 2014 +0200 @@ -589,16 +589,16 @@ } if (offset instanceof IntegerAddNode) { IntegerAddNode integerAddNode = (IntegerAddNode) offset; - if (integerAddNode.y() instanceof ConstantNode) { - displacement = integerAddNode.y().asConstant().asLong(); - offset = integerAddNode.x(); + if (integerAddNode.getY() instanceof ConstantNode) { + displacement = integerAddNode.getY().asConstant().asLong(); + offset = integerAddNode.getX(); } } if (offset instanceof LeftShiftNode) { LeftShiftNode leftShiftNode = (LeftShiftNode) offset; - if (leftShiftNode.y() instanceof ConstantNode) { - long shift = leftShiftNode.y().asConstant().asLong(); + if (leftShiftNode.getY() instanceof ConstantNode) { + long shift = leftShiftNode.getY().asConstant().asLong(); if (shift >= 1 && shift <= 3) { if (shift == 1) { indexScaling = 2; @@ -607,7 +607,7 @@ } else { indexScaling = 8; } - offset = leftShiftNode.x(); + offset = leftShiftNode.getX(); } } } diff -r 2a1f3a8f76f1 -r df6f2365b153 graal/com.oracle.graal.replacements/src/com/oracle/graal/replacements/InstanceOfSnippetsTemplates.java --- a/graal/com.oracle.graal.replacements/src/com/oracle/graal/replacements/InstanceOfSnippetsTemplates.java Wed Jun 25 11:20:50 2014 +0200 +++ b/graal/com.oracle.graal.replacements/src/com/oracle/graal/replacements/InstanceOfSnippetsTemplates.java Wed Jun 25 11:20:53 2014 +0200 @@ -141,7 +141,7 @@ assert testValue.isConstant(); return LogicConstantNode.forBoolean(result.asConstant().equals(testValue.asConstant()), result.graph()); } - if (condition == null || condition.y() != testValue) { + if (condition == null || condition.getY() != testValue) { // Re-use previously generated condition if the trueValue for the test is the same condition = createCompareNode(result.graph(), Condition.EQ, result, testValue); } diff -r 2a1f3a8f76f1 -r df6f2365b153 graal/com.oracle.graal.truffle/src/com/oracle/graal/truffle/nodes/arithmetic/IntegerAddExactNode.java --- a/graal/com.oracle.graal.truffle/src/com/oracle/graal/truffle/nodes/arithmetic/IntegerAddExactNode.java Wed Jun 25 11:20:50 2014 +0200 +++ b/graal/com.oracle.graal.truffle/src/com/oracle/graal/truffle/nodes/arithmetic/IntegerAddExactNode.java Wed Jun 25 11:20:53 2014 +0200 @@ -46,17 +46,17 @@ @Override public boolean inferStamp() { // TODO Should probably use a specialised version which understands that it can't overflow - return updateStamp(StampTool.add(x().stamp(), y().stamp())); + return updateStamp(StampTool.add(getX().stamp(), getY().stamp())); } @Override public Node canonical(CanonicalizerTool tool) { - if (x().isConstant() && !y().isConstant()) { - return graph().unique(new IntegerAddExactNode(y(), x())); + if (getX().isConstant() && !getY().isConstant()) { + return graph().unique(new IntegerAddExactNode(getY(), getX())); } - if (x().isConstant()) { - Constant xConst = x().asConstant(); - Constant yConst = y().asConstant(); + if (getX().isConstant()) { + Constant xConst = getX().asConstant(); + Constant yConst = getY().asConstant(); assert xConst.getKind() == yConst.getKind(); try { if (xConst.getKind() == Kind.Int) { @@ -68,10 +68,10 @@ } catch (ArithmeticException ex) { // The operation will result in an overflow exception, so do not canonicalize. } - } else if (y().isConstant()) { - long c = y().asConstant().asLong(); + } else if (getY().isConstant()) { + long c = getY().asConstant().asLong(); if (c == 0) { - return x(); + return getX(); } } return this; @@ -79,7 +79,7 @@ @Override public IntegerExactArithmeticSplitNode createSplit(BeginNode next, BeginNode deopt) { - return graph().add(new IntegerAddExactSplitNode(stamp(), x(), y(), next, deopt)); + return graph().add(new IntegerAddExactSplitNode(stamp(), getX(), getY(), next, deopt)); } @Override diff -r 2a1f3a8f76f1 -r df6f2365b153 graal/com.oracle.graal.truffle/src/com/oracle/graal/truffle/nodes/arithmetic/IntegerMulExactNode.java --- a/graal/com.oracle.graal.truffle/src/com/oracle/graal/truffle/nodes/arithmetic/IntegerMulExactNode.java Wed Jun 25 11:20:50 2014 +0200 +++ b/graal/com.oracle.graal.truffle/src/com/oracle/graal/truffle/nodes/arithmetic/IntegerMulExactNode.java Wed Jun 25 11:20:53 2014 +0200 @@ -44,12 +44,12 @@ @Override public Node canonical(CanonicalizerTool tool) { - if (x().isConstant() && !y().isConstant()) { - return graph().unique(new IntegerMulExactNode(y(), x())); + if (getX().isConstant() && !getY().isConstant()) { + return graph().unique(new IntegerMulExactNode(getY(), getX())); } - if (x().isConstant()) { - Constant xConst = x().asConstant(); - Constant yConst = y().asConstant(); + if (getX().isConstant()) { + Constant xConst = getX().asConstant(); + Constant yConst = getY().asConstant(); assert xConst.getKind() == yConst.getKind(); try { if (xConst.getKind() == Kind.Int) { @@ -61,10 +61,10 @@ } catch (ArithmeticException ex) { // The operation will result in an overflow exception, so do not canonicalize. } - } else if (y().isConstant()) { - long c = y().asConstant().asLong(); + } else if (getY().isConstant()) { + long c = getY().asConstant().asLong(); if (c == 1) { - return x(); + return getX(); } if (c == 0) { return ConstantNode.forIntegerStamp(stamp(), 0, graph()); @@ -75,7 +75,7 @@ @Override public IntegerExactArithmeticSplitNode createSplit(BeginNode next, BeginNode deopt) { - return graph().add(new IntegerMulExactSplitNode(stamp(), x(), y(), next, deopt)); + return graph().add(new IntegerMulExactSplitNode(stamp(), getX(), getY(), next, deopt)); } @Override diff -r 2a1f3a8f76f1 -r df6f2365b153 graal/com.oracle.graal.truffle/src/com/oracle/graal/truffle/nodes/arithmetic/IntegerMulHighNode.java --- a/graal/com.oracle.graal.truffle/src/com/oracle/graal/truffle/nodes/arithmetic/IntegerMulHighNode.java Wed Jun 25 11:20:50 2014 +0200 +++ b/graal/com.oracle.graal.truffle/src/com/oracle/graal/truffle/nodes/arithmetic/IntegerMulHighNode.java Wed Jun 25 11:20:53 2014 +0200 @@ -58,8 +58,8 @@ @Override public boolean inferStamp() { - IntegerStamp xStamp = (IntegerStamp) x().stamp(); - IntegerStamp yStamp = (IntegerStamp) y().stamp(); + IntegerStamp xStamp = (IntegerStamp) getX().stamp(); + IntegerStamp yStamp = (IntegerStamp) getY().stamp(); Kind kind = getKind(); assert kind == Kind.Int || kind == Kind.Long; @@ -79,8 +79,8 @@ @Override public void generate(NodeMappableLIRBuilder builder, ArithmeticLIRGenerator gen) { - Value a = builder.operand(x()); - Value b = builder.operand(y()); + Value a = builder.operand(getX()); + Value b = builder.operand(getY()); builder.setResult(this, gen.emitMulHigh(a, b)); } diff -r 2a1f3a8f76f1 -r df6f2365b153 graal/com.oracle.graal.truffle/src/com/oracle/graal/truffle/nodes/arithmetic/IntegerSubExactNode.java --- a/graal/com.oracle.graal.truffle/src/com/oracle/graal/truffle/nodes/arithmetic/IntegerSubExactNode.java Wed Jun 25 11:20:50 2014 +0200 +++ b/graal/com.oracle.graal.truffle/src/com/oracle/graal/truffle/nodes/arithmetic/IntegerSubExactNode.java Wed Jun 25 11:20:53 2014 +0200 @@ -46,17 +46,17 @@ @Override public boolean inferStamp() { // TODO Should probably use a specialised version which understands that it can't overflow - return updateStamp(StampTool.sub(x().stamp(), y().stamp())); + return updateStamp(StampTool.sub(getX().stamp(), getY().stamp())); } @Override public Node canonical(CanonicalizerTool tool) { - if (x() == y()) { + if (getX() == getY()) { return ConstantNode.forIntegerStamp(stamp(), 0, graph()); } - if (x().isConstant() && y().isConstant()) { - Constant xConst = x().asConstant(); - Constant yConst = y().asConstant(); + if (getX().isConstant() && getY().isConstant()) { + Constant xConst = getX().asConstant(); + Constant yConst = getY().asConstant(); assert xConst.getKind() == yConst.getKind(); try { if (xConst.getKind() == Kind.Int) { @@ -68,10 +68,10 @@ } catch (ArithmeticException ex) { // The operation will result in an overflow exception, so do not canonicalize. } - } else if (y().isConstant()) { - long c = y().asConstant().asLong(); + } else if (getY().isConstant()) { + long c = getY().asConstant().asLong(); if (c == 0) { - return x(); + return getX(); } } return this; @@ -79,7 +79,7 @@ @Override public IntegerExactArithmeticSplitNode createSplit(BeginNode next, BeginNode deopt) { - return graph().add(new IntegerSubExactSplitNode(stamp(), x(), y(), next, deopt)); + return graph().add(new IntegerSubExactSplitNode(stamp(), getX(), getY(), next, deopt)); } @Override diff -r 2a1f3a8f76f1 -r df6f2365b153 graal/com.oracle.graal.truffle/src/com/oracle/graal/truffle/nodes/arithmetic/UnsignedMulHighNode.java --- a/graal/com.oracle.graal.truffle/src/com/oracle/graal/truffle/nodes/arithmetic/UnsignedMulHighNode.java Wed Jun 25 11:20:50 2014 +0200 +++ b/graal/com.oracle.graal.truffle/src/com/oracle/graal/truffle/nodes/arithmetic/UnsignedMulHighNode.java Wed Jun 25 11:20:53 2014 +0200 @@ -58,8 +58,8 @@ @Override public void generate(NodeMappableLIRBuilder builder, ArithmeticLIRGenerator gen) { - Value a = builder.operand(x()); - Value b = builder.operand(y()); + Value a = builder.operand(getX()); + Value b = builder.operand(getY()); builder.setResult(this, gen.emitUMulHigh(a, b)); } diff -r 2a1f3a8f76f1 -r df6f2365b153 graal/com.oracle.graal.word/src/com/oracle/graal/word/phases/WordTypeVerificationPhase.java --- a/graal/com.oracle.graal.word/src/com/oracle/graal/word/phases/WordTypeVerificationPhase.java Wed Jun 25 11:20:50 2014 +0200 +++ b/graal/com.oracle.graal.word/src/com/oracle/graal/word/phases/WordTypeVerificationPhase.java Wed Jun 25 11:20:53 2014 +0200 @@ -86,8 +86,8 @@ MethodCallTargetNode callTarget = (MethodCallTargetNode) usage; verifyInvoke(node, callTarget); } else if (usage instanceof ObjectEqualsNode) { - verify(!isWord(node) || ((ObjectEqualsNode) usage).x() != node, node, usage, "cannot use word type in comparison"); - verify(!isWord(node) || ((ObjectEqualsNode) usage).y() != node, node, usage, "cannot use word type in comparison"); + verify(!isWord(node) || ((ObjectEqualsNode) usage).getX() != node, node, usage, "cannot use word type in comparison"); + verify(!isWord(node) || ((ObjectEqualsNode) usage).getY() != node, node, usage, "cannot use word type in comparison"); } else if (usage instanceof ArrayLengthNode) { verify(!isWord(node) || ((ArrayLengthNode) usage).array() != node, node, usage, "cannot get array length from word value"); } else if (usage instanceof ValuePhiNode) {