Mercurial > hg > graal-jvmci-8
comparison graal/com.oracle.max.cri/src/com/oracle/max/cri/xir/XirArgument.java @ 5538:e18ba36bfebc
Renamed RiConstant => Constant.
author | Thomas Wuerthinger <thomas.wuerthinger@oracle.com> |
---|---|
date | Fri, 08 Jun 2012 23:41:02 +0200 |
parents | dc71b06d09f8 |
children |
comparison
equal
deleted
inserted
replaced
5537:80371cc2256d | 5538:e18ba36bfebc |
---|---|
24 | 24 |
25 import com.oracle.graal.api.meta.*; | 25 import com.oracle.graal.api.meta.*; |
26 | 26 |
27 /** | 27 /** |
28 * Represents an argument to an {@link XirSnippet}. | 28 * Represents an argument to an {@link XirSnippet}. |
29 * Currently, this is a <i>union </i> type; it is either a {@link RiConstant} or an {@code Object}. | 29 * Currently, this is a <i>union </i> type; it is either a {@link Constant} or an {@code Object}. |
30 */ | 30 */ |
31 public final class XirArgument { | 31 public final class XirArgument { |
32 | 32 |
33 public final RiConstant constant; | 33 public final Constant constant; |
34 public final Object object; | 34 public final Object object; |
35 | 35 |
36 private XirArgument(RiConstant value) { | 36 private XirArgument(Constant value) { |
37 this.constant = value; | 37 this.constant = value; |
38 this.object = null; | 38 this.object = null; |
39 } | 39 } |
40 | 40 |
41 private XirArgument(Object o) { | 41 private XirArgument(Object o) { |
46 public static XirArgument forInternalObject(Object o) { | 46 public static XirArgument forInternalObject(Object o) { |
47 return new XirArgument(o); | 47 return new XirArgument(o); |
48 } | 48 } |
49 | 49 |
50 public static XirArgument forInt(int x) { | 50 public static XirArgument forInt(int x) { |
51 return new XirArgument(RiConstant.forInt(x)); | 51 return new XirArgument(Constant.forInt(x)); |
52 } | 52 } |
53 | 53 |
54 public static XirArgument forLong(long x) { | 54 public static XirArgument forLong(long x) { |
55 return new XirArgument(RiConstant.forLong(x)); | 55 return new XirArgument(Constant.forLong(x)); |
56 } | 56 } |
57 | 57 |
58 public static XirArgument forObject(Object o) { | 58 public static XirArgument forObject(Object o) { |
59 return new XirArgument(RiConstant.forObject(o)); | 59 return new XirArgument(Constant.forObject(o)); |
60 } | 60 } |
61 | 61 |
62 @Override | 62 @Override |
63 public String toString() { | 63 public String toString() { |
64 if (constant != null) { | 64 if (constant != null) { |