Skip to content

Commit 083228b

Browse files
cosminbascalukasstadler
authored andcommitted
SetAttributeNode add missing guard
1 parent 1556948 commit 083228b

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

graalpython/com.oracle.graal.python/src/com/oracle/graal/python/nodes/attributes/SetAttributeNode.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -92,20 +92,20 @@ public PNode getPrimaryNode() {
9292
protected Object doClass(PythonClass cls, Object key, Object value,
9393
@Cached("createIdentityProfile()") ValueProfile setAttributeProfile,
9494
@Cached("create(__SETATTR__)") LookupAttributeInMRONode setAttributeLookup,
95-
@Cached("create()") CallTernaryMethodNode callSetattr) {
95+
@Cached("create()") CallTernaryMethodNode callSetAttribute) {
9696
cls.invalidateAttributeInMROFinalAssumptions(key);
9797
Object descr = setAttributeProfile.profile(setAttributeLookup.execute(cls));
98-
return callSetattr.execute(descr, cls, key, value);
98+
return callSetAttribute.execute(descr, cls, key, value);
9999
}
100100

101-
@Specialization
101+
@Specialization(guards = "!isClass(object)")
102102
protected Object doIt(Object object, Object key, Object value,
103103
@Cached("createIdentityProfile()") ValueProfile setAttributeProfile,
104104
@Cached("create()") GetClassNode getClassNode,
105105
@Cached("create(__SETATTR__)") LookupAttributeInMRONode setAttributeLookup,
106-
@Cached("create()") CallTernaryMethodNode callSetattr) {
106+
@Cached("create()") CallTernaryMethodNode callSetAttribute) {
107107
PythonClass type = getClassNode.execute(object);
108108
Object descr = setAttributeProfile.profile(setAttributeLookup.execute(type));
109-
return callSetattr.execute(descr, object, key, value);
109+
return callSetAttribute.execute(descr, object, key, value);
110110
}
111111
}

0 commit comments

Comments
 (0)