187187import com .oracle .graal .python .builtins .objects .traceback .PTraceback ;
188188import com .oracle .graal .python .builtins .objects .tuple .PTuple ;
189189import 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 ;
191191import com .oracle .graal .python .builtins .objects .type .PythonAbstractClass ;
192192import com .oracle .graal .python .builtins .objects .type .PythonBuiltinClass ;
193193import com .oracle .graal .python .builtins .objects .type .PythonClass ;
@@ -4032,20 +4032,20 @@ public void call(@SuppressWarnings("unused") PythonContext context) {
40324032 }
40334033
40344034 // directly called without landing function
4035- @ Builtin (name = "PyStructSequence_InitType2" , minNumOfPositionalArgs = 5 )
4035+ @ Builtin (name = "PyStructSequence_InitType2" , minNumOfPositionalArgs = 4 )
40364036 @ GenerateNodeFactory
40374037 abstract static class PyStructSequenceInitType2 extends NativeBuiltin {
40384038
40394039 @ 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 ,
40414041 @ CachedLanguage PythonLanguage language ,
40424042 @ Cached AsPythonObjectNode asPythonObjectNode ,
40434043 @ CachedLibrary ("fieldNamesObj" ) InteropLibrary lib ,
40444044 @ 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 );
40464046 }
40474047
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 ,
40494049 PythonLanguage language ,
40504050 InteropLibrary lib ,
40514051 WriteAttributeToObjectNode clearNewNode ) {
@@ -4065,7 +4065,7 @@ static int initializeStructType(Object klass, String typeName, String typeDoc, O
40654065 fieldDocs [i ] = cast (lib .readArrayElement (fieldDocsObj , i ));
40664066 }
40674067 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 );
40694069 StructSequence .initType (language , klass , d );
40704070 return 0 ;
40714071 } catch (UnsupportedMessageException | InvalidArrayIndexException e ) {
@@ -4103,7 +4103,7 @@ Object doGeneric(VirtualFrame frame, String typeName, String typeDoc, Object fie
41034103 PTuple bases = factory ().createTuple (new Object []{PythonBuiltinClassType .PTuple });
41044104 PDict namespace = factory ().createDict (new PKeyword []{new PKeyword (SpecialAttributeNames .__DOC__ , typeDoc )});
41054105 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 );
41074107 return toNewRefNode .execute (cls );
41084108 } catch (PException e ) {
41094109 transformToNative (frame , e );
0 commit comments