comparison graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/GuardingPiNode.java @ 16919:0fe4732e5181

made use of generated Node classes predicated on value of graal.useGeneratedNodes system property (default is false)
author Doug Simon <doug.simon@oracle.com>
date Mon, 25 Aug 2014 13:45:12 +0200
parents f90dcdbbb75e
children ffb974bef674
comparison
equal deleted inserted replaced
16918:b03a16cc5245 16919:0fe4732e5181
67 67
68 /** 68 /**
69 * Constructor for {@link #guardingNonNull(Object)} node intrinsic. 69 * Constructor for {@link #guardingNonNull(Object)} node intrinsic.
70 */ 70 */
71 public static GuardingPiNode create(ValueNode object) { 71 public static GuardingPiNode create(ValueNode object) {
72 return new GuardingPiNodeGen(object); 72 return USE_GENERATED_NODES ? new GuardingPiNodeGen(object) : new GuardingPiNode(object);
73 } 73 }
74 74
75 GuardingPiNode(ValueNode object) { 75 GuardingPiNode(ValueNode object) {
76 this(object, object.graph().unique(IsNullNode.create(object)), true, DeoptimizationReason.NullCheckException, DeoptimizationAction.None, object.stamp().join(StampFactory.objectNonNull())); 76 this(object, object.graph().unique(IsNullNode.create(object)), true, DeoptimizationReason.NullCheckException, DeoptimizationAction.None, object.stamp().join(StampFactory.objectNonNull()));
77 } 77 }
83 * @param condition the condition to test 83 * @param condition the condition to test
84 * @param negateCondition the guard succeeds if {@code condition != negateCondition} 84 * @param negateCondition the guard succeeds if {@code condition != negateCondition}
85 * @param stamp the refined type of the object if the guard succeeds 85 * @param stamp the refined type of the object if the guard succeeds
86 */ 86 */
87 public static GuardingPiNode create(ValueNode object, ValueNode condition, boolean negateCondition, DeoptimizationReason reason, DeoptimizationAction action, Stamp stamp) { 87 public static GuardingPiNode create(ValueNode object, ValueNode condition, boolean negateCondition, DeoptimizationReason reason, DeoptimizationAction action, Stamp stamp) {
88 return new GuardingPiNodeGen(object, condition, negateCondition, reason, action, stamp); 88 return USE_GENERATED_NODES ? new GuardingPiNodeGen(object, condition, negateCondition, reason, action, stamp) : new GuardingPiNode(object, condition, negateCondition, reason, action, stamp);
89 } 89 }
90 90
91 protected GuardingPiNode(ValueNode object, ValueNode condition, boolean negateCondition, DeoptimizationReason reason, DeoptimizationAction action, Stamp stamp) { 91 protected GuardingPiNode(ValueNode object, ValueNode condition, boolean negateCondition, DeoptimizationReason reason, DeoptimizationAction action, Stamp stamp) {
92 super(stamp); 92 super(stamp);
93 assert stamp != null; 93 assert stamp != null;