Skip to content

Commit b179081

Browse files
committed
remove useless assertion
1 parent 2130bfc commit b179081

File tree

1 file changed

+0
-6
lines changed

1 file changed

+0
-6
lines changed

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

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -81,11 +81,6 @@ protected static boolean checkShape(@SuppressWarnings("unused") DynamicObject dy
8181
return cachedObject.getShape() == cachedShape;
8282
}
8383

84-
private static boolean assertFinal(DynamicObject dynamicObject, Object key, Object cachedValue) {
85-
Object other = dynamicObject.get(key) == null ? PNone.NO_VALUE : dynamicObject.get(key);
86-
return cachedValue == other || cachedValue instanceof Number && other instanceof Number && ((Number) cachedValue).doubleValue() == ((Number) other).doubleValue();
87-
}
88-
8984
@SuppressWarnings("unused")
9085
@Specialization(limit = "1", //
9186
guards = {
@@ -110,7 +105,6 @@ protected Object readDirectFinal(DynamicObject dynamicObject, Object key,
110105
@Cached("loc.getFinalAssumption()") Assumption finalAssumption,
111106
@SuppressWarnings("unused") @Cached("singleContextAssumption()") Assumption singleContextAssumption,
112107
@Cached("readFinalValue(dynamicObject, loc)") Object cachedValue) {
113-
assert assertFinal(dynamicObject, attrKey, cachedValue);
114108
return cachedValue;
115109
}
116110

0 commit comments

Comments
 (0)