Skip to content

Commit 14f72df

Browse files
committed
Remove unused FinishArgNode for ArgBehavior
1 parent 7e69e05 commit 14f72df

File tree

2 files changed

+21
-31
lines changed

2 files changed

+21
-31
lines changed

graalpython/com.oracle.graal.python/src/com/oracle/graal/python/builtins/objects/cext/capi/ExternalFunctionNodes.java

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -184,11 +184,6 @@ public static PKeyword[] createKwDefaults(Object callable, Object closure) {
184184
return new PKeyword[]{new PKeyword(KW_CALLABLE, callable), new PKeyword(KW_CLOSURE, closure)};
185185
}
186186

187-
public abstract static class FinishArgNode extends PNodeWithContext {
188-
189-
public abstract void execute(Object value);
190-
}
191-
192187
/**
193188
* On Windows, "long" is 32 bits, so that we might need to convert int to long for consistency.
194189
*/

graalpython/com.oracle.graal.python/src/com/oracle/graal/python/builtins/objects/cext/capi/transitions/ArgDescriptor.java

Lines changed: 21 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,6 @@
4040
*/
4141
package com.oracle.graal.python.builtins.objects.cext.capi.transitions;
4242

43-
import com.oracle.graal.python.builtins.objects.cext.capi.ExternalFunctionNodes.FinishArgNode;
4443
import com.oracle.graal.python.builtins.objects.cext.capi.ExternalFunctionNodes.FromLongNode;
4544
import com.oracle.graal.python.builtins.objects.cext.capi.ExternalFunctionNodes.FromUInt32Node;
4645
import com.oracle.graal.python.builtins.objects.cext.capi.ExternalFunctionNodes.ToInt32Node;
@@ -74,25 +73,24 @@ enum ArgBehavior {
7473
NativeToPythonNode.getUncached(),
7574
PythonToNativeNewRefNode::create,
7675
NativeToPythonTransferNode::create,
77-
NativeToPythonTransferNode.getUncached(),
78-
null),
79-
PyObjectBorrowed("POINTER", "J", "jlong", "long", ToNativeBorrowedNode::new, NativeToPythonNode::create, NativeToPythonNode.getUncached(), null, null, null, null),
80-
PyObjectAsTruffleString("POINTER", "J", "jlong", "long", null, ToPythonStringNode::create, ToPythonStringNode.getUncached(), null, null, null, null),
81-
PyObjectWrapper("POINTER", "J", "jlong", "long", null, ToPythonWrapperNode::create, ToPythonWrapperNode.getUncached(), null, null, null, null),
82-
Pointer("POINTER", "J", "jlong", "long", null, null, null, null),
83-
WrappedPointer("POINTER", "J", "jlong", "long", null, WrappedPointerToPythonNodeGen::create, WrappedPointerToPythonNodeGen.getUncached(), null),
84-
TruffleStringPointer("POINTER", "J", "jlong", "long", null, CharPtrToPythonNode::create, CharPtrToPythonNode.getUncached(), null),
85-
Char8("SINT8", "C", "jbyte", "byte", null, null, null, null),
86-
Char16("SINT16", "C", "jchar", "char", null, null, null, null),
87-
Int32("SINT32", "I", "jint", "int", ToInt32Node::create, null, null, null),
88-
UInt32("UINT32", "I", "jint", "int", ToInt32Node::create, FromUInt32Node::create, FromUInt32Node.getUncached(), null),
89-
Int64("SINT64", "J", "jlong", "long", ToInt64Node::create, null, null, null),
90-
UInt64("UINT64", "J", "jlong", "long", ToInt64Node::create, null, null, null),
91-
Long("SINT64", "J", "jlong", "long", ToInt64Node::create, FromLongNode::create, FromLongNode.getUncached(), null),
92-
Float32("FLOAT", "F", "jfloat", "float", null, null, null, null),
93-
Float64("DOUBLE", "D", "jdouble", "double", null, null, null, null),
94-
Void("VOID", "V", "void", "void", null, null, null, null),
95-
Unknown("SINT64", "J", "jlong", "long", null, null, null, null);
76+
NativeToPythonTransferNode.getUncached()),
77+
PyObjectBorrowed("POINTER", "J", "jlong", "long", ToNativeBorrowedNode::new, NativeToPythonNode::create, NativeToPythonNode.getUncached(), null, null, null),
78+
PyObjectAsTruffleString("POINTER", "J", "jlong", "long", null, ToPythonStringNode::create, ToPythonStringNode.getUncached(), null, null, null),
79+
PyObjectWrapper("POINTER", "J", "jlong", "long", null, ToPythonWrapperNode::create, ToPythonWrapperNode.getUncached(), null, null, null),
80+
Pointer("POINTER", "J", "jlong", "long", null, null, null),
81+
WrappedPointer("POINTER", "J", "jlong", "long", null, WrappedPointerToPythonNodeGen::create, WrappedPointerToPythonNodeGen.getUncached()),
82+
TruffleStringPointer("POINTER", "J", "jlong", "long", null, CharPtrToPythonNode::create, CharPtrToPythonNode.getUncached()),
83+
Char8("SINT8", "C", "jbyte", "byte", null, null, null),
84+
Char16("SINT16", "C", "jchar", "char", null, null, null),
85+
Int32("SINT32", "I", "jint", "int", ToInt32Node::create, null, null),
86+
UInt32("UINT32", "I", "jint", "int", ToInt32Node::create, FromUInt32Node::create, FromUInt32Node.getUncached()),
87+
Int64("SINT64", "J", "jlong", "long", ToInt64Node::create, null, null),
88+
UInt64("UINT64", "J", "jlong", "long", ToInt64Node::create, null, null),
89+
Long("SINT64", "J", "jlong", "long", ToInt64Node::create, FromLongNode::create, FromLongNode.getUncached()),
90+
Float32("FLOAT", "F", "jfloat", "float", null, null, null),
91+
Float64("DOUBLE", "D", "jdouble", "double", null, null, null),
92+
Void("VOID", "V", "void", "void", null, null, null),
93+
Unknown("SINT64", "J", "jlong", "long", null, null, null);
9694

9795
public final String nfiSignature;
9896
public final String jniSignature;
@@ -104,11 +102,10 @@ enum ArgBehavior {
104102
public final Supplier<CExtToNativeNode> pythonToNativeTransfer;
105103
public final Supplier<CExtToJavaNode> nativeToPythonTransfer;
106104
public final CExtToJavaNode uncachedNativeToPythonTransfer;
107-
public final Supplier<FinishArgNode> finish;
108105

109106
ArgBehavior(String nfiSignature, String jniSignature, String jniType, String javaSignature, Supplier<CExtToNativeNode> pythonToNative, Supplier<CExtToJavaNode> nativeToPython,
110107
CExtToJavaNode uncachedNativeToPython,
111-
Supplier<CExtToNativeNode> pythonToNativeTransfer, Supplier<CExtToJavaNode> nativeToPythonTransfer, CExtToJavaNode uncachedNativeToPythonTransfer, Supplier<FinishArgNode> finish) {
108+
Supplier<CExtToNativeNode> pythonToNativeTransfer, Supplier<CExtToJavaNode> nativeToPythonTransfer, CExtToJavaNode uncachedNativeToPythonTransfer) {
112109
this.nfiSignature = nfiSignature;
113110
this.jniSignature = jniSignature;
114111
this.jniType = jniType;
@@ -119,13 +116,11 @@ enum ArgBehavior {
119116
this.pythonToNativeTransfer = pythonToNativeTransfer;
120117
this.nativeToPythonTransfer = nativeToPythonTransfer;
121118
this.uncachedNativeToPythonTransfer = uncachedNativeToPythonTransfer;
122-
this.finish = finish;
123119
}
124120

125121
ArgBehavior(String nfiSignature, String jniSignature, String jniType, String javaType, Supplier<CExtToNativeNode> pythonToNative, Supplier<CExtToJavaNode> nativeToPython,
126-
CExtToJavaNode uncachedNativeToPython,
127-
Supplier<FinishArgNode> finish) {
128-
this(nfiSignature, jniSignature, jniType, javaType, pythonToNative, nativeToPython, uncachedNativeToPython, null, null, null, finish);
122+
CExtToJavaNode uncachedNativeToPython) {
123+
this(nfiSignature, jniSignature, jniType, javaType, pythonToNative, nativeToPython, uncachedNativeToPython, null, null, null);
129124
}
130125
}
131126

0 commit comments

Comments
 (0)