File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed
graalpython/com.oracle.graal.python/src/com/oracle/graal/python/nodes/attributes Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change 51
51
import com .oracle .truffle .api .object .Location ;
52
52
import com .oracle .truffle .api .object .Property ;
53
53
import com .oracle .truffle .api .object .Shape ;
54
+ import com .oracle .truffle .api .profiles .ConditionProfile ;
54
55
55
56
public abstract class LookupAttributeInMRONode extends PBaseNode {
56
57
@@ -127,11 +128,12 @@ protected Object lookupConstantMROCached(@SuppressWarnings("unused") PythonClass
127
128
@ Cached ("cachedKlass.getLookupStableAssumption()" ) @ SuppressWarnings ("unused" ) Assumption lookupStable ,
128
129
@ Cached ("create()" ) ReadAttributeFromObjectNode readAttrNode ,
129
130
@ Cached ("findClassInMRO(cachedKlass)" ) PythonClass cachedAttrKlass ,
131
+ @ Cached ("createBinaryProfile()" ) ConditionProfile attributeDeletedProfile ,
130
132
@ Cached ("cachedAttrKlass.getStorage().getShape()" ) @ SuppressWarnings ("unused" ) Shape cachedShape ,
131
133
@ Cached ("getLocationOrNull(cachedShape)" ) @ SuppressWarnings ("unused" ) Location loc ,
132
134
@ Cached ("loc.getFinalAssumption()" ) @ SuppressWarnings ("unused" ) Assumption finalAssumption ) {
133
135
Object value = readAttrNode .execute (cachedAttrKlass , key );
134
- if (value == PNone .NO_VALUE ) {
136
+ if (attributeDeletedProfile . profile ( value == PNone .NO_VALUE ) ) {
135
137
// in case the attribute was deleted
136
138
throw new IllegalStateException ();
137
139
}
You can’t perform that action at this time.
0 commit comments