187
187
import com .oracle .graal .python .builtins .objects .traceback .PTraceback ;
188
188
import com .oracle .graal .python .builtins .objects .tuple .PTuple ;
189
189
import com .oracle .graal .python .builtins .objects .tuple .StructSequence ;
190
- import com .oracle .graal .python .builtins .objects .tuple .StructSequence .StructSequenceDescriptor ;
190
+ import com .oracle .graal .python .builtins .objects .tuple .StructSequence .Descriptor ;
191
191
import com .oracle .graal .python .builtins .objects .type .PythonAbstractClass ;
192
192
import com .oracle .graal .python .builtins .objects .type .PythonBuiltinClass ;
193
193
import com .oracle .graal .python .builtins .objects .type .PythonClass ;
@@ -4032,20 +4032,20 @@ public void call(@SuppressWarnings("unused") PythonContext context) {
4032
4032
}
4033
4033
4034
4034
// directly called without landing function
4035
- @ Builtin (name = "PyStructSequence_InitType2" , minNumOfPositionalArgs = 5 )
4035
+ @ Builtin (name = "PyStructSequence_InitType2" , minNumOfPositionalArgs = 4 )
4036
4036
@ GenerateNodeFactory
4037
4037
abstract static class PyStructSequenceInitType2 extends NativeBuiltin {
4038
4038
4039
4039
@ Specialization (limit = "1" )
4040
- static int doGeneric (Object klass , String typeName , Object fieldNamesObj , Object fieldDocsObj , int nInSequence ,
4040
+ static int doGeneric (Object klass , Object fieldNamesObj , Object fieldDocsObj , int nInSequence ,
4041
4041
@ CachedLanguage PythonLanguage language ,
4042
4042
@ Cached AsPythonObjectNode asPythonObjectNode ,
4043
4043
@ CachedLibrary ("fieldNamesObj" ) InteropLibrary lib ,
4044
4044
@ Cached (parameters = "true" ) WriteAttributeToObjectNode clearNewNode ) {
4045
- return initializeStructType (asPythonObjectNode .execute (klass ), typeName , null , fieldNamesObj , fieldDocsObj , nInSequence , language , lib , clearNewNode );
4045
+ return initializeStructType (asPythonObjectNode .execute (klass ), fieldNamesObj , fieldDocsObj , nInSequence , language , lib , clearNewNode );
4046
4046
}
4047
4047
4048
- static int initializeStructType (Object klass , String typeName , String typeDoc , Object fieldNamesObj , Object fieldDocsObj , int nInSequence ,
4048
+ static int initializeStructType (Object klass , Object fieldNamesObj , Object fieldDocsObj , int nInSequence ,
4049
4049
PythonLanguage language ,
4050
4050
InteropLibrary lib ,
4051
4051
WriteAttributeToObjectNode clearNewNode ) {
@@ -4065,7 +4065,7 @@ static int initializeStructType(Object klass, String typeName, String typeDoc, O
4065
4065
fieldDocs [i ] = cast (lib .readArrayElement (fieldDocsObj , i ));
4066
4066
}
4067
4067
clearNewNode .execute (klass , __NEW__ , PNone .NO_VALUE );
4068
- StructSequenceDescriptor d = new StructSequenceDescriptor ( typeName , typeDoc , nInSequence , fieldNames , fieldDocs );
4068
+ Descriptor d = new Descriptor ( null , nInSequence , fieldNames , fieldDocs );
4069
4069
StructSequence .initType (language , klass , d );
4070
4070
return 0 ;
4071
4071
} catch (UnsupportedMessageException | InvalidArrayIndexException e ) {
@@ -4103,7 +4103,7 @@ Object doGeneric(VirtualFrame frame, String typeName, String typeDoc, Object fie
4103
4103
PTuple bases = factory ().createTuple (new Object []{PythonBuiltinClassType .PTuple });
4104
4104
PDict namespace = factory ().createDict (new PKeyword []{new PKeyword (SpecialAttributeNames .__DOC__ , typeDoc )});
4105
4105
Object cls = callTypeNewNode .execute (typeBuiltin , typeName , bases , namespace );
4106
- PyStructSequenceInitType2 .initializeStructType (cls , typeName , null , fieldNamesObj , fieldDocsObj , nInSequence , language , lib , clearNewNode );
4106
+ PyStructSequenceInitType2 .initializeStructType (cls , fieldNamesObj , fieldDocsObj , nInSequence , language , lib , clearNewNode );
4107
4107
return toNewRefNode .execute (cls );
4108
4108
} catch (PException e ) {
4109
4109
transformToNative (frame , e );
0 commit comments