comparison graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/java/LoadIndexedNode.java @ 22604:b00cc0475f31

Update jvmci import: Refactoring: Rename Kind to JavaKind.
author Roland Schatz <roland.schatz@oracle.com>
date Tue, 08 Sep 2015 19:57:39 +0200
parents 681c04ce9db2
children 05183a084a08
comparison
equal deleted inserted replaced
22603:6d339ba0edc5 22604:b00cc0475f31
46 * 46 *
47 * @param array the instruction producing the array 47 * @param array the instruction producing the array
48 * @param index the instruction producing the index 48 * @param index the instruction producing the index
49 * @param elementKind the element type 49 * @param elementKind the element type
50 */ 50 */
51 public LoadIndexedNode(ValueNode array, ValueNode index, Kind elementKind) { 51 public LoadIndexedNode(ValueNode array, ValueNode index, JavaKind elementKind) {
52 this(TYPE, createStamp(array, elementKind), array, index, elementKind); 52 this(TYPE, createStamp(array, elementKind), array, index, elementKind);
53 } 53 }
54 54
55 public static ValueNode create(ValueNode array, ValueNode index, Kind elementKind, MetaAccessProvider metaAccess, ConstantReflectionProvider constantReflection) { 55 public static ValueNode create(ValueNode array, ValueNode index, JavaKind elementKind, MetaAccessProvider metaAccess, ConstantReflectionProvider constantReflection) {
56 ValueNode constant = tryConstantFold(array, index, metaAccess, constantReflection); 56 ValueNode constant = tryConstantFold(array, index, metaAccess, constantReflection);
57 if (constant != null) { 57 if (constant != null) {
58 return constant; 58 return constant;
59 } 59 }
60 return new LoadIndexedNode(array, index, elementKind); 60 return new LoadIndexedNode(array, index, elementKind);
61 } 61 }
62 62
63 protected LoadIndexedNode(NodeClass<? extends LoadIndexedNode> c, Stamp stamp, ValueNode array, ValueNode index, Kind elementKind) { 63 protected LoadIndexedNode(NodeClass<? extends LoadIndexedNode> c, Stamp stamp, ValueNode array, ValueNode index, JavaKind elementKind) {
64 super(c, stamp, array, index, elementKind); 64 super(c, stamp, array, index, elementKind);
65 } 65 }
66 66
67 private static Stamp createStamp(ValueNode array, Kind kind) { 67 private static Stamp createStamp(ValueNode array, JavaKind kind) {
68 ResolvedJavaType type = StampTool.typeOrNull(array); 68 ResolvedJavaType type = StampTool.typeOrNull(array);
69 if (kind == Kind.Object && type != null) { 69 if (kind == JavaKind.Object && type != null) {
70 return StampFactory.declaredTrusted(type.getComponentType()); 70 return StampFactory.declaredTrusted(type.getComponentType());
71 } else { 71 } else {
72 return StampFactory.forKind(kind); 72 return StampFactory.forKind(kind);
73 } 73 }
74 } 74 }