Skip to content

Commit 0415089

Browse files
committed
use ReadAttributeNode to read __module__ for typebuiltins.__repr__
1 parent 97b361e commit 0415089

File tree

1 file changed

+2
-1
lines changed
  • graalpython/com.oracle.graal.python/src/com/oracle/graal/python/builtins/objects/type

1 file changed

+2
-1
lines changed

graalpython/com.oracle.graal.python/src/com/oracle/graal/python/builtins/objects/type/TypeBuiltins.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,8 +111,9 @@ public abstract static class ReprNode extends PythonUnaryBuiltinNode {
111111

112112
@Specialization
113113
public String repr(PythonClass self,
114+
@Cached("create()") ReadAttributeFromObjectNode readModuleNode,
114115
@Cached("create(__GETATTRIBUTE__)") LookupAndCallBinaryNode readQualNameNode) {
115-
Object moduleName = self.getAttribute(__MODULE__);
116+
Object moduleName = readModuleNode.execute(self, __MODULE__);
116117
Object qualName = readQualNameNode.executeObject(self, __QUALNAME__);
117118
return concat(moduleName, qualName);
118119
}

0 commit comments

Comments
 (0)