Mercurial > hg > graal-compiler
comparison graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/java/CompareAndSwapNode.java @ 19403:7e2c87dae93e
Create static final NodeClass field named TYPE in Node subclasses.
author | Thomas Wuerthinger <thomas.wuerthinger@oracle.com> |
---|---|
date | Mon, 16 Feb 2015 15:43:03 +0100 |
parents | ec0733b5a90a |
children | 61d3cb8e1280 |
comparison
equal
deleted
inserted
replaced
19402:a306749d3e86 | 19403:7e2c87dae93e |
---|---|
24 | 24 |
25 import static com.oracle.graal.compiler.common.UnsafeAccess.*; | 25 import static com.oracle.graal.compiler.common.UnsafeAccess.*; |
26 | 26 |
27 import com.oracle.graal.api.meta.*; | 27 import com.oracle.graal.api.meta.*; |
28 import com.oracle.graal.compiler.common.type.*; | 28 import com.oracle.graal.compiler.common.type.*; |
29 import com.oracle.graal.graph.*; | |
29 import com.oracle.graal.nodeinfo.*; | 30 import com.oracle.graal.nodeinfo.*; |
30 import com.oracle.graal.nodes.*; | 31 import com.oracle.graal.nodes.*; |
31 import com.oracle.graal.nodes.extended.*; | 32 import com.oracle.graal.nodes.extended.*; |
32 import com.oracle.graal.nodes.spi.*; | 33 import com.oracle.graal.nodes.spi.*; |
33 | 34 |
36 * value matched the expected value. | 37 * value matched the expected value. |
37 */ | 38 */ |
38 @NodeInfo(allowedUsageTypes = {InputType.Memory}) | 39 @NodeInfo(allowedUsageTypes = {InputType.Memory}) |
39 public final class CompareAndSwapNode extends AbstractMemoryCheckpoint implements Lowerable, MemoryCheckpoint.Single { | 40 public final class CompareAndSwapNode extends AbstractMemoryCheckpoint implements Lowerable, MemoryCheckpoint.Single { |
40 | 41 |
42 public static final NodeClass TYPE = NodeClass.get(CompareAndSwapNode.class); | |
41 @Input ValueNode object; | 43 @Input ValueNode object; |
42 @Input ValueNode offset; | 44 @Input ValueNode offset; |
43 @Input ValueNode expected; | 45 @Input ValueNode expected; |
44 @Input ValueNode newValue; | 46 @Input ValueNode newValue; |
45 | 47 |
46 protected final Kind valueKind; | 48 protected final Kind valueKind; |
47 protected final LocationIdentity locationIdentity; | 49 protected final LocationIdentity locationIdentity; |
48 | 50 |
49 public CompareAndSwapNode(ValueNode object, ValueNode offset, ValueNode expected, ValueNode newValue, Kind valueKind, LocationIdentity locationIdentity) { | 51 public CompareAndSwapNode(ValueNode object, ValueNode offset, ValueNode expected, ValueNode newValue, Kind valueKind, LocationIdentity locationIdentity) { |
50 super(StampFactory.forKind(Kind.Boolean.getStackKind())); | 52 super(TYPE, StampFactory.forKind(Kind.Boolean.getStackKind())); |
51 assert expected.stamp().isCompatible(newValue.stamp()); | 53 assert expected.stamp().isCompatible(newValue.stamp()); |
52 this.object = object; | 54 this.object = object; |
53 this.offset = offset; | 55 this.offset = offset; |
54 this.expected = expected; | 56 this.expected = expected; |
55 this.newValue = newValue; | 57 this.newValue = newValue; |