Skip to content

Commit 0976fd8

Browse files
committed
better toString for BuiltinFunctionRootNode
1 parent 7c6b6c1 commit 0976fd8

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

graalpython/com.oracle.graal.python/src/com/oracle/graal/python/nodes/function/BuiltinFunctionRootNode.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -354,7 +354,9 @@ public Builtin getBuiltin() {
354354
@Override
355355
public String toString() {
356356
CompilerAsserts.neverPartOfCompilation();
357-
return "<builtin function " + name + " at " + Integer.toHexString(hashCode()) + ">";
357+
Class<?> clazz = factory.getNodeClass().getEnclosingClass();
358+
String context = clazz == null ? "" : clazz.getSimpleName() + ".";
359+
return "<builtin function " + context + name + " at " + Integer.toHexString(hashCode()) + ">";
358360
}
359361

360362
@Override

0 commit comments

Comments
 (0)