37
37
import javax .net .ssl .SSLEngine ;
38
38
39
39
import com .oracle .graal .python .PythonLanguage ;
40
+ import com .oracle .graal .python .builtins .CachedLazyCalltargetSupplier ;
40
41
import com .oracle .graal .python .builtins .PythonBuiltinClassType ;
41
42
import com .oracle .graal .python .builtins .modules .PosixModuleBuiltins .PosixFileHandle ;
42
43
import com .oracle .graal .python .builtins .modules .bz2 .BZ2Object ;
239
240
import com .oracle .graal .python .builtins .objects .typing .PTypeVar ;
240
241
import com .oracle .graal .python .builtins .objects .typing .PTypeVarTuple ;
241
242
import com .oracle .graal .python .compiler .BytecodeCodeUnit ;
243
+ import com .oracle .graal .python .nodes .PRootNode ;
242
244
import com .oracle .graal .python .nodes .bytecode .PBytecodeRootNode ;
243
245
import com .oracle .graal .python .nodes .bytecode_dsl .BytecodeDSLCodeUnit ;
244
246
import com .oracle .graal .python .nodes .bytecode_dsl .PBytecodeDSLRootNode ;
@@ -543,6 +545,11 @@ public static PFunction createFunction(PythonLanguage language, TruffleString na
543
545
return trace (language , new PFunction (language , name , qualname , code , globals , defaultValues , kwDefaultValues , closure , codeStableAssumption ));
544
546
}
545
547
548
+ public static PBuiltinFunction createBuiltinFunction (PythonLanguage language , TruffleString name , int numDefaults , Signature signature , int flags , CachedLazyCalltargetSupplier callTargetSupplier ) {
549
+ return trace (language , new PBuiltinFunction (PythonBuiltinClassType .PBuiltinFunction , PythonBuiltinClassType .PBuiltinFunction .getInstanceShape (language ), name , null ,
550
+ PBuiltinFunction .generateDefaults (numDefaults ), null , signature , flags , callTargetSupplier ));
551
+ }
552
+
546
553
public static PBuiltinFunction createBuiltinFunction (PythonLanguage language , TruffleString name , Object type , int numDefaults , int flags , RootCallTarget callTarget ) {
547
554
return trace (language , new PBuiltinFunction (PythonBuiltinClassType .PBuiltinFunction , PythonBuiltinClassType .PBuiltinFunction .getInstanceShape (language ), name , type ,
548
555
PBuiltinFunction .generateDefaults (numDefaults ), null , flags , callTarget ));
@@ -556,13 +563,13 @@ public static PBuiltinFunction createBuiltinFunction(PythonLanguage language, Tr
556
563
public static PBuiltinFunction createWrapperDescriptor (PythonLanguage language , TruffleString name , Object type , int numDefaults , int flags , RootCallTarget callTarget , TpSlot slot ,
557
564
PExternalFunctionWrapper slotWrapper ) {
558
565
return trace (language , new PBuiltinFunction (PythonBuiltinClassType .WrapperDescriptor , PythonBuiltinClassType .WrapperDescriptor .getInstanceShape (language ), name , type ,
559
- PBuiltinFunction .generateDefaults (numDefaults ), null , flags , callTarget , slot , slotWrapper ));
566
+ PBuiltinFunction .generateDefaults (numDefaults ), null , (( PRootNode ) callTarget . getRootNode ()). getSignature (), flags , callTarget , null , slot , slotWrapper ));
560
567
}
561
568
562
569
public static PBuiltinFunction createWrapperDescriptor (PythonLanguage language , TruffleString name , Object type , Object [] defaults , PKeyword [] kw , int flags , RootCallTarget callTarget ,
563
570
TpSlot slot , PExternalFunctionWrapper slotWrapper ) {
564
- return trace (language , new PBuiltinFunction (PythonBuiltinClassType .WrapperDescriptor , PythonBuiltinClassType .WrapperDescriptor .getInstanceShape (language ), name , type , defaults , kw , flags ,
565
- callTarget , slot , slotWrapper ));
571
+ return trace (language , new PBuiltinFunction (PythonBuiltinClassType .WrapperDescriptor , PythonBuiltinClassType .WrapperDescriptor .getInstanceShape (language ), name , type , defaults , kw , (( PRootNode ) callTarget . getRootNode ()). getSignature (), flags ,
572
+ callTarget , null , slot , slotWrapper ));
566
573
}
567
574
568
575
public static PBuiltinMethod createNewWrapper (PythonLanguage language , Object type , Object [] defaults , PKeyword [] kwdefaults , RootCallTarget callTarget , TpSlot slot ) {
@@ -574,7 +581,7 @@ public static PBuiltinMethod createNewWrapper(PythonLanguage language, Object ty
574
581
public static PBuiltinFunction createBuiltinFunction (PythonLanguage language , PBuiltinFunction function , Object klass ) {
575
582
PythonBuiltinClassType type = (PythonBuiltinClassType ) function .getPythonClass ();
576
583
return trace (language , new PBuiltinFunction (type , type .getInstanceShape (language ), function .getName (), klass ,
577
- function .getDefaults (), function .getKwDefaults (), function .getFlags (), function .getCallTarget (),
584
+ function .getDefaults (), function .getKwDefaults (), function .getSignature (), function . getFlags (), function .getCallTarget (), null ,
578
585
function .getSlot (), function .getSlotWrapper ()));
579
586
}
580
587
0 commit comments