|
169 | 169 | import com.oracle.graal.python.nodes.attributes.GetAttributeNode;
|
170 | 170 | import com.oracle.graal.python.nodes.attributes.LookupAttributeInMRONode;
|
171 | 171 | import com.oracle.graal.python.nodes.attributes.LookupInheritedSlotNode;
|
| 172 | +import com.oracle.graal.python.nodes.attributes.ReadAttributeFromDynamicObjectNode; |
172 | 173 | import com.oracle.graal.python.nodes.attributes.ReadAttributeFromObjectNode;
|
173 |
| -import com.oracle.graal.python.nodes.attributes.WriteAttributeToObjectNode; |
| 174 | +import com.oracle.graal.python.nodes.attributes.WriteAttributeToDynamicObjectNode; |
174 | 175 | import com.oracle.graal.python.nodes.call.CallNode;
|
175 | 176 | import com.oracle.graal.python.nodes.call.special.CallUnaryMethodNode;
|
176 | 177 | import com.oracle.graal.python.nodes.classes.IsSubtypeNode;
|
@@ -241,17 +242,17 @@ public abstract static class GetTypeFlagsNode extends Node {
|
241 | 242 | @Specialization
|
242 | 243 | long doBuiltinClassType(PythonBuiltinClassType clazz,
|
243 | 244 | @Bind("this") Node inliningTarget,
|
244 |
| - @Shared("read") @Cached ReadAttributeFromObjectNode readHiddenFlagsNode, |
245 |
| - @Shared("write") @Cached WriteAttributeToObjectNode writeHiddenFlagsNode, |
| 245 | + @Shared("read") @Cached ReadAttributeFromDynamicObjectNode readHiddenFlagsNode, |
| 246 | + @Shared("write") @Cached WriteAttributeToDynamicObjectNode writeHiddenFlagsNode, |
246 | 247 | @Shared("profile") @Cached InlinedCountingConditionProfile profile) {
|
247 | 248 | return doManaged(PythonContext.get(this).getCore().lookupType(clazz), inliningTarget, readHiddenFlagsNode, writeHiddenFlagsNode, profile);
|
248 | 249 | }
|
249 | 250 |
|
250 | 251 | @Specialization
|
251 | 252 | long doManaged(PythonManagedClass clazz,
|
252 | 253 | @Bind("this") Node inliningTarget,
|
253 |
| - @Shared("read") @Cached ReadAttributeFromObjectNode readHiddenFlagsNode, |
254 |
| - @Shared("write") @Cached WriteAttributeToObjectNode writeHiddenFlagsNode, |
| 254 | + @Shared("read") @Cached ReadAttributeFromDynamicObjectNode readHiddenFlagsNode, |
| 255 | + @Shared("write") @Cached WriteAttributeToDynamicObjectNode writeHiddenFlagsNode, |
255 | 256 | @Shared("profile") @Cached InlinedCountingConditionProfile profile) {
|
256 | 257 |
|
257 | 258 | Object flagsObject = readHiddenFlagsNode.execute(clazz, TYPE_FLAGS);
|
@@ -301,7 +302,7 @@ private long computeFlags(PythonManagedClass clazz) {
|
301 | 302 | if (mroEntry instanceof PythonAbstractNativeObject) {
|
302 | 303 | result = setFlags(result, doNative((PythonAbstractNativeObject) mroEntry, GetTypeMemberNodeGen.getUncached()));
|
303 | 304 | } else if (mroEntry != clazz && mroEntry instanceof PythonManagedClass) {
|
304 |
| - long flags = doManaged((PythonManagedClass) mroEntry, null, ReadAttributeFromObjectNode.getUncached(), WriteAttributeToObjectNode.getUncached(), |
| 305 | + long flags = doManaged((PythonManagedClass) mroEntry, null, ReadAttributeFromDynamicObjectNode.getUncached(), WriteAttributeToDynamicObjectNode.getUncached(), |
305 | 306 | InlinedCountingConditionProfile.getUncached());
|
306 | 307 | result = setFlags(result, flags);
|
307 | 308 | }
|
@@ -453,13 +454,13 @@ public abstract static class SetTypeFlagsNode extends Node {
|
453 | 454 |
|
454 | 455 | @Specialization
|
455 | 456 | void doPBCT(PythonBuiltinClassType clazz, long flags,
|
456 |
| - @Shared("write") @Cached WriteAttributeToObjectNode writeHiddenFlagsNode) { |
| 457 | + @Shared("write") @Cached WriteAttributeToDynamicObjectNode writeHiddenFlagsNode) { |
457 | 458 | doManaged(PythonContext.get(this).getCore().lookupType(clazz), flags, writeHiddenFlagsNode);
|
458 | 459 | }
|
459 | 460 |
|
460 | 461 | @Specialization
|
461 | 462 | static void doManaged(PythonManagedClass clazz, long flags,
|
462 |
| - @Shared("write") @Cached WriteAttributeToObjectNode writeHiddenFlagsNode) { |
| 463 | + @Shared("write") @Cached WriteAttributeToDynamicObjectNode writeHiddenFlagsNode) { |
463 | 464 | writeHiddenFlagsNode.execute(clazz, TYPE_FLAGS, flags);
|
464 | 465 | }
|
465 | 466 |
|
@@ -1716,7 +1717,7 @@ public abstract static class IsAcceptableBaseNode extends Node {
|
1716 | 1717 | @Specialization
|
1717 | 1718 | static boolean doUserClass(PythonClass obj,
|
1718 | 1719 | @Bind("this") Node inliningTarget,
|
1719 |
| - @Cached ReadAttributeFromObjectNode readAttributeFromObjectNode, |
| 1720 | + @Cached ReadAttributeFromDynamicObjectNode readAttributeFromObjectNode, |
1720 | 1721 | @Cached InlinedBranchProfile hasHPyFlagsProfile) {
|
1721 | 1722 | // Special case for custom classes created via HPy: They are managed classes but can
|
1722 | 1723 | // have custom flags. The flags may prohibit subtyping.
|
@@ -2569,7 +2570,7 @@ public static void executeUncached(PythonManagedClass cls, long value) {
|
2569 | 2570 |
|
2570 | 2571 | @Specialization
|
2571 | 2572 | void set(PythonManagedClass cls, long value,
|
2572 |
| - @Cached WriteAttributeToObjectNode write) { |
| 2573 | + @Cached WriteAttributeToDynamicObjectNode write) { |
2573 | 2574 | write.execute(cls, TYPE_BASICSIZE, value);
|
2574 | 2575 | }
|
2575 | 2576 | }
|
@@ -2622,7 +2623,7 @@ public static void executeUncached(PythonManagedClass cls, long value) {
|
2622 | 2623 |
|
2623 | 2624 | @Specialization
|
2624 | 2625 | void set(PythonManagedClass cls, long value,
|
2625 |
| - @Cached WriteAttributeToObjectNode write) { |
| 2626 | + @Cached WriteAttributeToDynamicObjectNode write) { |
2626 | 2627 | write.execute(cls, TYPE_ITEMSIZE, value);
|
2627 | 2628 | }
|
2628 | 2629 | }
|
@@ -2657,7 +2658,7 @@ public static void executeUncached(PythonManagedClass cls, long value) {
|
2657 | 2658 |
|
2658 | 2659 | @Specialization
|
2659 | 2660 | void set(PythonManagedClass cls, long value,
|
2660 |
| - @Cached WriteAttributeToObjectNode write) { |
| 2661 | + @Cached WriteAttributeToDynamicObjectNode write) { |
2661 | 2662 | write.execute(cls, TYPE_DICTOFFSET, value);
|
2662 | 2663 | }
|
2663 | 2664 | }
|
|
0 commit comments