@@ -126,18 +126,20 @@ public static ValueNode create(ValueNode object, ValueNode guard) {
126126 return new PiNode (object , stamp , guard );
127127 }
128128
129- public static final int INTRINSIFY_OP_NON_NULL = 1 ;
130- public static final int INTRINSIFY_OP_POSITIVE_INT = 2 ;
129+ public enum IntrinsifyOp {
130+ NON_NULL ,
131+ POSITIVE_INT
132+ }
131133
132- public static boolean intrinsify (GraphBuilderContext b , ValueNode input , ValueNode guard , int intrinsifyOp ) {
134+ public static boolean intrinsify (GraphBuilderContext b , ValueNode input , ValueNode guard , IntrinsifyOp intrinsifyOp ) {
133135 Stamp piStamp ;
134136 JavaKind pushKind ;
135137 switch (intrinsifyOp ) {
136- case INTRINSIFY_OP_NON_NULL :
138+ case NON_NULL :
137139 piStamp = AbstractPointerStamp .pointerNonNull (input .stamp (NodeView .DEFAULT ));
138140 pushKind = JavaKind .Object ;
139141 break ;
140- case INTRINSIFY_OP_POSITIVE_INT :
142+ case POSITIVE_INT :
141143 piStamp = StampFactory .positiveInt ();
142144 pushKind = JavaKind .Int ;
143145 break ;
@@ -324,33 +326,33 @@ public static Class<?> asNonNullObject(Object object) {
324326 * {@code guard}
325327 */
326328 public static int piCastPositive (int value , GuardingNode guard ) {
327- return intrinsified (value , guard , INTRINSIFY_OP_POSITIVE_INT );
329+ return intrinsified (value , guard , IntrinsifyOp . POSITIVE_INT );
328330 }
329331
330332 @ NodeIntrinsic
331- private static native int intrinsified (int value , GuardingNode guard , @ ConstantNodeParameter int intrinsifyOp );
333+ private static native int intrinsified (int value , GuardingNode guard , @ ConstantNodeParameter IntrinsifyOp intrinsifyOp );
332334
333335 /**
334336 * Changes the stamp of an object and ensures the newly stamped value is non-null and does not
335337 * float above a given guard.
336338 */
337339 public static Object piCastNonNull (Object object , GuardingNode guard ) {
338- return intrinsified (object , guard , INTRINSIFY_OP_NON_NULL );
340+ return intrinsified (object , guard , IntrinsifyOp . NON_NULL );
339341 }
340342
341343 @ NodeIntrinsic
342- private static native Object intrinsified (Object object , GuardingNode guard , @ ConstantNodeParameter int intrinsifyOp );
344+ private static native Object intrinsified (Object object , GuardingNode guard , @ ConstantNodeParameter IntrinsifyOp intrinsifyOp );
343345
344346 /**
345347 * Changes the stamp of an object and ensures the newly stamped value is non-null and does not
346348 * float above a given guard.
347349 */
348350 public static Class <?> piCastNonNullClass (Class <?> type , GuardingNode guard ) {
349- return intrinsified (type , guard , INTRINSIFY_OP_NON_NULL );
351+ return intrinsified (type , guard , IntrinsifyOp . NON_NULL );
350352 }
351353
352354 @ NodeIntrinsic
353- private static native Class <?> intrinsified (Class <?> object , GuardingNode guard , @ ConstantNodeParameter int intrinsifyOp );
355+ private static native Class <?> intrinsified (Class <?> object , GuardingNode guard , @ ConstantNodeParameter IntrinsifyOp intrinsifyOp );
354356
355357 /**
356358 * Changes the stamp of an object to represent a given type and to indicate that the object is
0 commit comments