195195import com .oracle .truffle .api .interop .InteropException ;
196196import com .oracle .truffle .api .interop .InteropLibrary ;
197197import com .oracle .truffle .api .interop .InvalidArrayIndexException ;
198- import com .oracle .truffle .api .interop .TruffleObject ;
199198import com .oracle .truffle .api .interop .UnknownIdentifierException ;
200199import com .oracle .truffle .api .interop .UnsupportedMessageException ;
201200import com .oracle .truffle .api .interop .UnsupportedTypeException ;
@@ -520,7 +519,7 @@ static Object runAbstractObject(@SuppressWarnings("unused") CExtContext cextCont
520519 }
521520
522521 @ Specialization (guards = {"isForeignObjectNode.execute(object)" , "!isNativeWrapper(object)" , "!isNativeNull(object)" })
523- static Object doForeignObject (@ SuppressWarnings ("unused" ) CExtContext cextContext , TruffleObject object ,
522+ static Object doForeignObject (@ SuppressWarnings ("unused" ) CExtContext cextContext , Object object ,
524523 @ SuppressWarnings ("unused" ) @ Cached IsForeignObjectNode isForeignObjectNode ) {
525524 return TruffleObjectNativeWrapper .wrap (object );
526525 }
@@ -785,7 +784,7 @@ static Object runAbstractObject(@SuppressWarnings("unused") CExtContext cextCont
785784 }
786785
787786 @ Specialization (guards = {"isForeignObjectNode.execute(object)" , "!isNativeWrapper(object)" , "!isNativeNull(object)" })
788- static Object doForeignObject (CExtContext cextContext , TruffleObject object ,
787+ static Object doForeignObject (CExtContext cextContext , Object object ,
789788 @ Cached IsForeignObjectNode isForeignObjectNode ) {
790789 // this will always be a new wrapper; it's implicitly always a new reference in any case
791790 return ToSulongNode .doForeignObject (cextContext , object , isForeignObjectNode );
@@ -960,7 +959,7 @@ static Object runAbstractObject(@SuppressWarnings("unused") CExtContext cextCont
960959 }
961960
962961 @ Specialization (guards = {"isForeignObjectNode.execute(object)" , "!isNativeWrapper(object)" , "!isNativeNull(object)" })
963- static Object doForeignObject (CExtContext cextContext , TruffleObject object ,
962+ static Object doForeignObject (CExtContext cextContext , Object object ,
964963 @ Cached IsForeignObjectNode isForeignObjectNode ) {
965964 // this will always be a new wrapper; it's implicitly always a new reference in any case
966965 return ToSulongNode .doForeignObject (cextContext , object , isForeignObjectNode );
@@ -1137,7 +1136,7 @@ protected static boolean isPrimitiveNativeWrapper(PythonNativeWrapper object) {
11371136 public abstract static class AsPythonObjectNode extends AsPythonObjectBaseNode {
11381137
11391138 @ Specialization (guards = {"isForeignObjectNode.execute(object)" , "!isNativeWrapper(object)" , "!isNativeNull(object)" }, limit = "2" )
1140- static PythonAbstractObject doNativeObject (@ SuppressWarnings ("unused" ) CExtContext cextContext , TruffleObject object ,
1139+ static PythonAbstractObject doNativeObject (@ SuppressWarnings ("unused" ) CExtContext cextContext , Object object ,
11411140 @ SuppressWarnings ("unused" ) @ Cached IsForeignObjectNode isForeignObjectNode ,
11421141 @ Cached ConditionProfile newRefProfile ,
11431142 @ Cached ConditionProfile validRefProfile ,
@@ -1163,7 +1162,7 @@ static PythonAbstractObject doNativeObject(@SuppressWarnings("unused") CExtConte
11631162 public abstract static class AsPythonObjectStealingNode extends AsPythonObjectBaseNode {
11641163
11651164 @ Specialization (guards = {"isForeignObjectNode.execute(object)" , "!isNativeWrapper(object)" , "!isNativeNull(object)" }, limit = "1" )
1166- static PythonAbstractObject doNativeObject (@ SuppressWarnings ("unused" ) CExtContext cextContext , TruffleObject object ,
1165+ static PythonAbstractObject doNativeObject (@ SuppressWarnings ("unused" ) CExtContext cextContext , Object object ,
11671166 @ SuppressWarnings ("unused" ) @ Cached IsForeignObjectNode isForeignObjectNode ,
11681167 @ Cached ConditionProfile newRefProfile ,
11691168 @ Cached ConditionProfile validRefProfile ,
@@ -1188,7 +1187,7 @@ static PythonAbstractObject doNativeObject(@SuppressWarnings("unused") CExtConte
11881187 public abstract static class WrapVoidPtrNode extends AsPythonObjectBaseNode {
11891188
11901189 @ Specialization (guards = {"isForeignObjectNode.execute(object)" , "!isNativeWrapper(object)" , "!isNativeNull(object)" }, limit = "1" )
1191- static Object doNativeObject (@ SuppressWarnings ("unused" ) CExtContext cextContext , TruffleObject object ,
1190+ static Object doNativeObject (@ SuppressWarnings ("unused" ) CExtContext cextContext , Object object ,
11921191 @ SuppressWarnings ("unused" ) @ Cached IsForeignObjectNode isForeignObjectNode ) {
11931192 // TODO(fa): should we use a different wrapper for non-'PyObject*' pointers; they cannot
11941193 // be used in the user value space but might be passed-through
@@ -1204,7 +1203,7 @@ static Object doNativeObject(@SuppressWarnings("unused") CExtContext cextContext
12041203 public abstract static class WrapCharPtrNode extends AsPythonObjectBaseNode {
12051204
12061205 @ Specialization (guards = {"isForeignObjectNode.execute(object)" , "!isNativeWrapper(object)" , "!isNativeNull(object)" }, limit = "1" )
1207- static Object doNativeObject (@ SuppressWarnings ("unused" ) CExtContext cextContext , TruffleObject object ,
1206+ static Object doNativeObject (@ SuppressWarnings ("unused" ) CExtContext cextContext , Object object ,
12081207 @ SuppressWarnings ("unused" ) @ Cached IsForeignObjectNode isForeignObjectNode ,
12091208 @ Cached FromCharPointerNode fromCharPointerNode ) {
12101209 return fromCharPointerNode .execute (object );
@@ -3226,20 +3225,20 @@ static long doOther(Object object,
32263225
32273226 @ GenerateUncached
32283227 public abstract static class GetLLVMType extends Node {
3229- public abstract TruffleObject execute (LLVMType llvmType );
3228+ public abstract Object execute (LLVMType llvmType );
32303229
32313230 @ Specialization (guards = "llvmType == cachedType" , limit = "typeCount()" )
3232- TruffleObject doGeneric (@ SuppressWarnings ("unused" ) LLVMType llvmType ,
3231+ Object doGeneric (@ SuppressWarnings ("unused" ) LLVMType llvmType ,
32333232 @ Cached ("llvmType" ) LLVMType cachedType ) {
32343233
32353234 CApiContext cApiContext = PythonContext .get (this ).getCApiContext ();
3236- TruffleObject llvmTypeID = cApiContext .getLLVMTypeID (cachedType );
3235+ Object llvmTypeID = cApiContext .getLLVMTypeID (cachedType );
32373236
32383237 // TODO(fa): get rid of lazy initialization for better sharing
32393238 if (llvmTypeID == null ) {
32403239 CompilerDirectives .transferToInterpreterAndInvalidate ();
32413240 NativeCAPISymbol getterFunctionSymbol = LLVMType .getGetterFunctionName (llvmType );
3242- llvmTypeID = ( TruffleObject ) PCallCapiFunction .getUncached ().call (getterFunctionSymbol );
3241+ llvmTypeID = PCallCapiFunction .getUncached ().call (getterFunctionSymbol );
32433242 cApiContext .setLLVMTypeID (cachedType , llvmTypeID );
32443243 }
32453244 return llvmTypeID ;
@@ -3508,16 +3507,16 @@ private static Object callBuiltin(PythonContext context, String builtinName, Obj
35083507 @ GenerateUncached
35093508 public abstract static class AttachLLVMTypeNode extends Node {
35103509
3511- public abstract TruffleObject execute (TruffleObject ptr );
3510+ public abstract Object execute (Object ptr );
35123511
35133512 @ Specialization (guards = "lib.hasMetaObject(ptr)" , limit = "1" )
3514- static TruffleObject doTyped (TruffleObject ptr ,
3513+ static Object doTyped (Object ptr ,
35153514 @ CachedLibrary ("ptr" ) @ SuppressWarnings ("unused" ) InteropLibrary lib ) {
35163515 return ptr ;
35173516 }
35183517
35193518 @ Specialization (guards = "!lib.hasMetaObject(ptr)" , limit = "1" , replaces = "doTyped" )
3520- static TruffleObject doUntyped (TruffleObject ptr ,
3519+ static Object doUntyped (Object ptr ,
35213520 @ CachedLibrary ("ptr" ) @ SuppressWarnings ("unused" ) InteropLibrary lib ,
35223521 @ Shared ("getSulongTypeNode" ) @ Cached GetSulongTypeNode getSulongTypeNode ,
35233522 @ Shared ("getLLVMType" ) @ Cached GetLLVMType getLLVMType ,
@@ -3529,11 +3528,11 @@ static TruffleObject doUntyped(TruffleObject ptr,
35293528 if (llvmType == null ) {
35303529 llvmType = getLLVMType .execute (LLVMType .PyObject );
35313530 }
3532- return ( TruffleObject ) callPolyglotFromTypedNode .call (FUN_POLYGLOT_FROM_TYPED , ptr , llvmType );
3531+ return callPolyglotFromTypedNode .call (FUN_POLYGLOT_FROM_TYPED , ptr , llvmType );
35333532 }
35343533
35353534 @ Specialization (limit = "1" , replaces = {"doTyped" , "doUntyped" })
3536- static TruffleObject doGeneric (TruffleObject ptr ,
3535+ static Object doGeneric (Object ptr ,
35373536 @ CachedLibrary ("ptr" ) InteropLibrary lib ,
35383537 @ Shared ("getSulongTypeNode" ) @ Cached GetSulongTypeNode getSulongTypeNode ,
35393538 @ Shared ("getLLVMType" ) @ Cached GetLLVMType getLLVMType ,
0 commit comments