File tree Expand file tree Collapse file tree 1 file changed +12
-0
lines changed
graalpython/com.oracle.graal.python/src/com/oracle/graal/python/builtins/modules Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change 34
34
import com .oracle .graal .python .builtins .PythonBuiltins ;
35
35
import com .oracle .graal .python .builtins .objects .cext .PythonNativeClass ;
36
36
import com .oracle .graal .python .builtins .objects .cext .PythonNativeObject ;
37
+ import com .oracle .graal .python .builtins .objects .list .PList ;
37
38
import com .oracle .graal .python .builtins .objects .tuple .PTuple ;
38
39
import com .oracle .graal .python .nodes .function .PythonBuiltinNode ;
39
40
import com .oracle .truffle .api .CompilerDirectives .TruffleBoundary ;
@@ -104,4 +105,15 @@ public boolean isTracked(@SuppressWarnings("unused") Object object) {
104
105
return true ;
105
106
}
106
107
}
108
+
109
+ @ Builtin (name = "get_referents" , takesVarArgs = true )
110
+ @ GenerateNodeFactory
111
+ abstract static class GcGetReferentsNode extends PythonBuiltinNode {
112
+ @ Specialization
113
+ PList getReferents (@ SuppressWarnings ("unused" ) Object objects ) {
114
+ // TODO: this is just a dummy implementation; for native objects, this should actually
115
+ // use 'tp_traverse'
116
+ return factory ().createList ();
117
+ }
118
+ }
107
119
}
You can’t perform that action at this time.
0 commit comments