< prev index next >

src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/ConstantNode.java

Print this page

        

*** 52,61 **** --- 52,62 ---- import jdk.vm.ci.meta.ConstantReflectionProvider; import jdk.vm.ci.meta.JavaConstant; import jdk.vm.ci.meta.JavaKind; import jdk.vm.ci.meta.MetaAccessProvider; import jdk.vm.ci.meta.PrimitiveConstant; + import jdk.vm.ci.meta.ResolvedJavaType; /** * The {@code ConstantNode} represents a {@link Constant constant}. */ @NodeInfo(nameTemplate = "C({p#rawvalue}) {p#stampKind}", cycles = CYCLES_0, size = SIZE_1)
*** 97,106 **** --- 98,111 ---- } else { this.isDefaultStable = isDefaultStable; } } + public ConstantNode(@InjectedNodeParameter Stamp stamp, @InjectedNodeParameter ConstantReflectionProvider constantReflection, @ConstantNodeParameter ResolvedJavaType type) { + this(constantReflection.asJavaClass(type), stamp); + } + /** * @return the constant value represented by this node */ public Constant getValue() { return value;
*** 544,549 **** --- 549,557 ---- if (length == null) { return null; } return ConstantNode.forInt(length); } + + @NodeIntrinsic + public static native Class<?> forClass(@ConstantNodeParameter ResolvedJavaType type); }
< prev index next >