comparison graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/PiNode.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 30c8d110b281
children 61d3cb8e1280
comparison
equal deleted inserted replaced
19402:a306749d3e86 19403:7e2c87dae93e
1 /* 1 /*
2 * Copyright (c) 2012, 2014, Oracle and/or its affiliates. All rights reserved. 2 * Copyright (c) 2012, 2015, Oracle and/or its affiliates. All rights reserved.
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 * 4 *
5 * This code is free software; you can redistribute it and/or modify it 5 * This code is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License version 2 only, as 6 * under the terms of the GNU General Public License version 2 only, as
7 * published by the Free Software Foundation. 7 * published by the Free Software Foundation.
42 * restriction enforced by the anchor, will go away. 42 * restriction enforced by the anchor, will go away.
43 */ 43 */
44 @NodeInfo 44 @NodeInfo
45 public class PiNode extends FloatingGuardedNode implements LIRLowerable, Virtualizable, IterableNodeType, Canonicalizable, ValueProxy { 45 public class PiNode extends FloatingGuardedNode implements LIRLowerable, Virtualizable, IterableNodeType, Canonicalizable, ValueProxy {
46 46
47 public static final NodeClass TYPE = NodeClass.get(PiNode.class);
47 @Input ValueNode object; 48 @Input ValueNode object;
48 protected final Stamp piStamp; 49 protected final Stamp piStamp;
49 50
50 public ValueNode object() { 51 public ValueNode object() {
51 return object; 52 return object;
52 } 53 }
53 54
55 protected PiNode(NodeClass c, ValueNode object, Stamp stamp) {
56 super(c, stamp, null);
57 this.object = object;
58 this.piStamp = stamp;
59 }
60
54 public PiNode(ValueNode object, Stamp stamp) { 61 public PiNode(ValueNode object, Stamp stamp) {
55 this(object, stamp, null); 62 this(object, stamp, null);
56 } 63 }
57 64
58 public PiNode(ValueNode object, Stamp stamp, ValueNode anchor) { 65 public PiNode(ValueNode object, Stamp stamp, ValueNode anchor) {
59 super(stamp, (GuardingNode) anchor); 66 super(TYPE, stamp, (GuardingNode) anchor);
60 this.object = object; 67 this.object = object;
61 this.piStamp = stamp; 68 this.piStamp = stamp;
62 } 69 }
63 70
64 public PiNode(ValueNode object, ResolvedJavaType toType, boolean exactType, boolean nonNull) { 71 public PiNode(ValueNode object, ResolvedJavaType toType, boolean exactType, boolean nonNull) {