110110import com .oracle .graal .python .builtins .objects .cext .structs .CStructAccess ;
111111import com .oracle .graal .python .builtins .objects .cext .structs .CStructs ;
112112import com .oracle .graal .python .builtins .objects .common .SequenceStorageNodes ;
113- import com .oracle .graal .python .builtins .objects .common .SequenceStorageNodes .ToArrayNode ;
114113import com .oracle .graal .python .builtins .objects .complex .PComplex ;
115114import com .oracle .graal .python .builtins .objects .floats .PFloat ;
116115import com .oracle .graal .python .builtins .objects .function .PBuiltinFunction ;
122121import com .oracle .graal .python .builtins .objects .module .PythonModule ;
123122import com .oracle .graal .python .builtins .objects .object .PythonObject ;
124123import com .oracle .graal .python .builtins .objects .str .PString ;
125- import com .oracle .graal .python .builtins .objects .tuple .PTuple ;
126124import com .oracle .graal .python .builtins .objects .type .PythonAbstractClass ;
127125import com .oracle .graal .python .builtins .objects .type .PythonBuiltinClass ;
128126import com .oracle .graal .python .builtins .objects .type .PythonClass ;
@@ -2069,7 +2067,6 @@ abstract static class ReleaseNativeWrapperNode extends Node {
20692067 @ Specialization
20702068 static void doNativeWrapper (PythonAbstractObjectNativeWrapper nativeWrapper ,
20712069 @ Bind ("this" ) Node inliningTarget ,
2072- @ Cached TraverseNativeWrapperNode traverseNativeWrapperNode ,
20732070 @ Cached SubRefCntNode subRefCntNode ) {
20742071 // in the cached case, refCntNode acts as a branch profile
20752072 // if (subRefCntNode.dec(nativeWrapper) == 0) {
@@ -2084,40 +2081,6 @@ static void doOther(Object object) {
20842081 }
20852082 }
20862083
2087- /**
2088- * Traverses the items of a tuple and applies {@link ReleaseNativeWrapperNode} on the items if
2089- * the tuple is up to be released.
2090- */
2091- @ GenerateInline
2092- @ GenerateCached (false )
2093- abstract static class TraverseNativeWrapperNode extends Node {
2094-
2095- public abstract void execute (Node inliningTarget , Object containerObject );
2096-
2097- @ Specialization
2098- static void doTuple (Node inliningTarget , PTuple tuple ,
2099- @ Cached ToArrayNode toArrayNode ,
2100- @ Cached SubRefCntNode subRefCntNode ) {
2101-
2102- Object [] values = toArrayNode .execute (inliningTarget , tuple .getSequenceStorage ());
2103- for (int i = 0 ; i < values .length ; i ++) {
2104- Object value = values [i ];
2105- if (value instanceof PythonObject ) {
2106- PythonNativeWrapper nativeWrapper = ((PythonObject ) value ).getNativeWrapper ();
2107- // only traverse if refCnt != 0; this will break the cycle
2108- if (nativeWrapper != null ) {
2109- subRefCntNode .dec (inliningTarget , nativeWrapper );
2110- }
2111- }
2112- }
2113- }
2114-
2115- @ Fallback
2116- static void doOther (@ SuppressWarnings ("unused" ) Object other ) {
2117- // do nothing
2118- }
2119- }
2120-
21212084 @ GenerateUncached
21222085 @ GenerateInline
21232086 @ GenerateCached (false )
0 commit comments