5757 size = SIZE_UNKNOWN , sizeRationale = SIZE_UNKNOWN_RATIONALE )
5858// @formatter:on
5959@ NodeIntrinsicFactory
60- public class InvokeJavaMethodNode extends DeoptimizingFixedWithNextNode implements Invokable , Lowerable {
61- public static final NodeClass <InvokeJavaMethodNode > TYPE = NodeClass .create (InvokeJavaMethodNode .class );
60+ public class InvokeStaticJavaMethodNode extends DeoptimizingFixedWithNextNode implements Invokable , Lowerable {
61+ public static final NodeClass <InvokeStaticJavaMethodNode > TYPE = NodeClass .create (InvokeStaticJavaMethodNode .class );
6262
6363 /**
6464 * Enables passing a method (to be invoked by this node) as a constant within an intrinsic
6565 * context. This is required when the specific method to invoke is known, but the corresponding
6666 * {@link ResolvedJavaMethod} instance is not available at the time of
67- * {@link InvokeJavaMethodNode } creation. See
67+ * {@link InvokeStaticJavaMethodNode } creation. See
6868 * {@code HotSpotTruffleSafepointLoweringSnippet#pollSnippet} for usage details.
6969 */
7070 public static final class MethodReference {
@@ -96,7 +96,7 @@ public String getName() {
9696 private MethodReference methodReference ;
9797
9898 @ SuppressWarnings ("this-escape" )
99- protected InvokeJavaMethodNode (NodeClass <? extends InvokeJavaMethodNode > c , ResolvedJavaMethod targetMethod , ResolvedJavaMethod callerMethod ,
99+ protected InvokeStaticJavaMethodNode (NodeClass <? extends InvokeStaticJavaMethodNode > c , ResolvedJavaMethod targetMethod , ResolvedJavaMethod callerMethod ,
100100 StampPair returnStamp , int bci , ValueNode ... args ) {
101101 super (c , returnStamp .getTrustedStamp ());
102102 this .arguments = new NodeInputList <>(this , args );
@@ -108,31 +108,31 @@ protected InvokeJavaMethodNode(NodeClass<? extends InvokeJavaMethodNode> c, Reso
108108 }
109109
110110 @ SuppressWarnings ("unused" )
111- public static InvokeJavaMethodNode create (MethodReference wrapper , ResolvedJavaMethod callerMethod , int bci , ValueNode ... args ) {
111+ public static InvokeStaticJavaMethodNode create (MethodReference wrapper , ResolvedJavaMethod callerMethod , int bci , ValueNode ... args ) {
112112 verifyTargetMethod (wrapper .targetMethod );
113113 ResolvedJavaMethod targetMethod = wrapper .targetMethod ;
114114 JavaKind returnKind = targetMethod .getSignature ().getReturnKind ();
115- return new InvokeJavaMethodNode (TYPE , targetMethod , callerMethod , StampPair .createSingle (StampFactory .forKind (returnKind )), bci , args );
115+ return new InvokeStaticJavaMethodNode (TYPE , targetMethod , callerMethod , StampPair .createSingle (StampFactory .forKind (returnKind )), bci , args );
116116 }
117117
118- public static InvokeJavaMethodNode create (GraphBuilderContext b , ResolvedJavaMethod targetMethod , int bci , ValueNode ... args ) {
118+ public static InvokeStaticJavaMethodNode create (GraphBuilderContext b , ResolvedJavaMethod targetMethod , int bci , ValueNode ... args ) {
119119 Signature signature = targetMethod .getSignature ();
120120 JavaType returnType = signature .getReturnType (null );
121121 StructuredGraph graph = b .getGraph ();
122122 StampPair returnStamp = StampFactory .forDeclaredType (graph .getAssumptions (), returnType , false );
123123 return create (b , targetMethod , b .getMethod (), returnStamp , bci , args );
124124 }
125125
126- private static InvokeJavaMethodNode createWithoutTargetMethod (GraphBuilderContext b , MethodReference method , Stamp returnStamp , int bci , ValueNode ... args ) {
127- InvokeJavaMethodNode invoke = create (b , null , b .getMethod (), StampPair .createSingle (returnStamp ), bci , args );
126+ private static InvokeStaticJavaMethodNode createWithoutTargetMethod (GraphBuilderContext b , MethodReference method , Stamp returnStamp , int bci , ValueNode ... args ) {
127+ InvokeStaticJavaMethodNode invoke = create (b , null , b .getMethod (), StampPair .createSingle (returnStamp ), bci , args );
128128 invoke .methodReference = method ;
129129 return invoke ;
130130 }
131131
132- private static InvokeJavaMethodNode create (GraphBuilderContext b , ResolvedJavaMethod targetMethod , ResolvedJavaMethod callerMethod ,
132+ private static InvokeStaticJavaMethodNode create (GraphBuilderContext b , ResolvedJavaMethod targetMethod , ResolvedJavaMethod callerMethod ,
133133 StampPair returnStamp , int bci , ValueNode ... args ) {
134134 GraalError .guarantee (b .getInvokeKind () == CallTargetNode .InvokeKind .Static , "can only invoke static methods" );
135- return new InvokeJavaMethodNode (TYPE , targetMethod , callerMethod , returnStamp , bci , args );
135+ return new InvokeStaticJavaMethodNode (TYPE , targetMethod , callerMethod , returnStamp , bci , args );
136136 }
137137
138138 @ Override
@@ -207,7 +207,7 @@ public Map<Object, Object> getDebugProperties(Map<Object, Object> map) {
207207 public static boolean intrinsify (GraphBuilderContext b , @ InjectedNodeParameter Stamp returnStamp , MethodReference method , ValueNode ... args ) {
208208 GraphBuilderContext nonIntrinsicAncestor = b .getNonIntrinsicAncestor ();
209209 int bci = nonIntrinsicAncestor == null ? BytecodeFrame .UNKNOWN_BCI : b .bci ();
210- InvokeJavaMethodNode invoke = InvokeJavaMethodNode .createWithoutTargetMethod (b , method , returnStamp , bci , args );
210+ InvokeStaticJavaMethodNode invoke = InvokeStaticJavaMethodNode .createWithoutTargetMethod (b , method , returnStamp , bci , args );
211211 JavaKind returnKind = returnStamp .getStackKind ();
212212 if (returnKind == JavaKind .Void ) {
213213 b .add (invoke );
0 commit comments