3737import javax .net .ssl .SSLEngine ;
3838
3939import com .oracle .graal .python .PythonLanguage ;
40+ import com .oracle .graal .python .builtins .CachedLazyCalltargetSupplier ;
4041import com .oracle .graal .python .builtins .PythonBuiltinClassType ;
4142import com .oracle .graal .python .builtins .modules .PosixModuleBuiltins .PosixFileHandle ;
4243import com .oracle .graal .python .builtins .modules .bz2 .BZ2Object ;
239240import com .oracle .graal .python .builtins .objects .typing .PTypeVar ;
240241import com .oracle .graal .python .builtins .objects .typing .PTypeVarTuple ;
241242import com .oracle .graal .python .compiler .BytecodeCodeUnit ;
243+ import com .oracle .graal .python .nodes .PRootNode ;
242244import com .oracle .graal .python .nodes .bytecode .PBytecodeRootNode ;
243245import com .oracle .graal .python .nodes .bytecode_dsl .BytecodeDSLCodeUnit ;
244246import com .oracle .graal .python .nodes .bytecode_dsl .PBytecodeDSLRootNode ;
@@ -543,6 +545,11 @@ public static PFunction createFunction(PythonLanguage language, TruffleString na
543545 return trace (language , new PFunction (language , name , qualname , code , globals , defaultValues , kwDefaultValues , closure , codeStableAssumption ));
544546 }
545547
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+
546553 public static PBuiltinFunction createBuiltinFunction (PythonLanguage language , TruffleString name , Object type , int numDefaults , int flags , RootCallTarget callTarget ) {
547554 return trace (language , new PBuiltinFunction (PythonBuiltinClassType .PBuiltinFunction , PythonBuiltinClassType .PBuiltinFunction .getInstanceShape (language ), name , type ,
548555 PBuiltinFunction .generateDefaults (numDefaults ), null , flags , callTarget ));
@@ -556,13 +563,13 @@ public static PBuiltinFunction createBuiltinFunction(PythonLanguage language, Tr
556563 public static PBuiltinFunction createWrapperDescriptor (PythonLanguage language , TruffleString name , Object type , int numDefaults , int flags , RootCallTarget callTarget , TpSlot slot ,
557564 PExternalFunctionWrapper slotWrapper ) {
558565 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 ));
560567 }
561568
562569 public static PBuiltinFunction createWrapperDescriptor (PythonLanguage language , TruffleString name , Object type , Object [] defaults , PKeyword [] kw , int flags , RootCallTarget callTarget ,
563570 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 ));
566573 }
567574
568575 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
574581 public static PBuiltinFunction createBuiltinFunction (PythonLanguage language , PBuiltinFunction function , Object klass ) {
575582 PythonBuiltinClassType type = (PythonBuiltinClassType ) function .getPythonClass ();
576583 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 ,
578585 function .getSlot (), function .getSlotWrapper ()));
579586 }
580587
0 commit comments