comparison graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/java/CompareAndSwapNode.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 77981382473e
comparison
equal deleted inserted replaced
16918:b03a16cc5245 16919:0fe4732e5181
45 45
46 private final Kind valueKind; 46 private final Kind valueKind;
47 private final LocationIdentity locationIdentity; 47 private final LocationIdentity locationIdentity;
48 48
49 public static CompareAndSwapNode create(ValueNode object, ValueNode offset, ValueNode expected, ValueNode newValue, Kind valueKind, LocationIdentity locationIdentity) { 49 public static CompareAndSwapNode create(ValueNode object, ValueNode offset, ValueNode expected, ValueNode newValue, Kind valueKind, LocationIdentity locationIdentity) {
50 return new CompareAndSwapNodeGen(object, offset, expected, newValue, valueKind, locationIdentity); 50 return USE_GENERATED_NODES ? new CompareAndSwapNodeGen(object, offset, expected, newValue, valueKind, locationIdentity) : new CompareAndSwapNode(object, offset, expected, newValue, valueKind, locationIdentity);
51 } 51 }
52 52
53 CompareAndSwapNode(ValueNode object, ValueNode offset, ValueNode expected, ValueNode newValue, Kind valueKind, LocationIdentity locationIdentity) { 53 CompareAndSwapNode(ValueNode object, ValueNode offset, ValueNode expected, ValueNode newValue, Kind valueKind, LocationIdentity locationIdentity) {
54 super(StampFactory.forKind(Kind.Boolean.getStackKind())); 54 super(StampFactory.forKind(Kind.Boolean.getStackKind()));
55 assert expected.stamp().isCompatible(newValue.stamp()); 55 assert expected.stamp().isCompatible(newValue.stamp());