Skip to content

Commit 8086856

Browse files
committed
Use specialized DynamicObjectLibrary
1 parent a132e0b commit 8086856

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

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

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -353,6 +353,11 @@ public static PythonManagedClass cast(Object object) {
353353
}
354354
}
355355

356+
/**
357+
* Sets the {@link PythonObject#HAS_SLOTS_BUT_NO_DICT_FLAG} shape flag in the
358+
* {@code instanceShape}. This method must not be called after the type has been initialized and
359+
* used.
360+
*/
356361
@TruffleBoundary
357362
public void setHasSlotsButNoDictFlag() {
358363
instanceShape = Shape.newBuilder(instanceShape).shapeFlags(PythonObject.HAS_SLOTS_BUT_NO_DICT_FLAG).build();

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ protected boolean writeToDynamicStorage(PythonObject object, Object key, Object
119119
@CachedLibrary("object") @SuppressWarnings("unused") PythonObjectLibrary lib,
120120
@Cached("create()") WriteAttributeToDynamicObjectNode writeAttributeToDynamicObjectNode,
121121
@Exclusive @Cached("createBinaryProfile()") ConditionProfile isClassProfile,
122-
@CachedLibrary(limit = "1") @SuppressWarnings("unused") DynamicObjectLibrary dyLib,
122+
@CachedLibrary("object") @SuppressWarnings("unused") DynamicObjectLibrary dyLib,
123123
@Exclusive @Cached @SuppressWarnings("unused") IsBuiltinClassProfile exactBuiltinInstanceProfile) {
124124
handlePythonClass(isClassProfile, object, key);
125125
return writeAttributeToDynamicObjectNode.execute(object.getStorage(), key, value);

0 commit comments

Comments
 (0)