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 35
35
import com .oracle .graal .python .builtins .objects .PNone ;
36
36
import com .oracle .graal .python .builtins .objects .cext .PythonNativeClass ;
37
37
import com .oracle .graal .python .builtins .objects .cext .PythonNativeObject ;
38
+ import com .oracle .graal .python .builtins .objects .list .PList ;
38
39
import com .oracle .graal .python .builtins .objects .tuple .PTuple ;
39
40
import com .oracle .graal .python .nodes .function .PythonBuiltinNode ;
40
41
import com .oracle .truffle .api .CompilerDirectives .TruffleBoundary ;
@@ -131,4 +132,15 @@ public boolean isTracked(@SuppressWarnings("unused") Object object) {
131
132
return true ;
132
133
}
133
134
}
135
+
136
+ @ Builtin (name = "get_referents" , takesVarArgs = true )
137
+ @ GenerateNodeFactory
138
+ abstract static class GcGetReferentsNode extends PythonBuiltinNode {
139
+ @ Specialization
140
+ PList getReferents (@ SuppressWarnings ("unused" ) Object objects ) {
141
+ // TODO: this is just a dummy implementation; for native objects, this should actually
142
+ // use 'tp_traverse'
143
+ return factory ().createList ();
144
+ }
145
+ }
134
146
}
You can’t perform that action at this time.
0 commit comments