|
93 | 93 | import com.oracle.graal.python.builtins.objects.common.SequenceStorageNodes.GetInternalObjectArrayNode;
|
94 | 94 | import com.oracle.graal.python.builtins.objects.dict.PDict;
|
95 | 95 | import com.oracle.graal.python.builtins.objects.function.PFunction;
|
| 96 | +import com.oracle.graal.python.builtins.objects.mappingproxy.PMappingproxy; |
96 | 97 | import com.oracle.graal.python.builtins.objects.object.PythonObjectLibrary;
|
97 | 98 | import com.oracle.graal.python.builtins.objects.tuple.PTuple;
|
98 | 99 | import com.oracle.graal.python.builtins.objects.type.TypeNodesFactory.GetBaseClassNodeGen;
|
@@ -894,6 +895,9 @@ private String getTypeName(Object clazz) {
|
894 | 895 | private Object getSlotsFromDict(VirtualFrame frame, Object type) {
|
895 | 896 | Object dict = getObjectLibrary().lookupAttribute(type, frame, __DICT__);
|
896 | 897 | if (dict != PNone.NO_VALUE) {
|
| 898 | + if (dict instanceof PMappingproxy) { |
| 899 | + dict = ((PMappingproxy) dict).getMapping(); |
| 900 | + } |
897 | 901 | HashingStorage storage = getDictStorageNode().execute((PHashingCollection) dict);
|
898 | 902 | return getHashingStorageLibrary().getItem(storage, __SLOTS__);
|
899 | 903 | }
|
@@ -1054,6 +1058,9 @@ protected Object getSlotsFromDict(Object type, LookupSpecialMethodNode.Dynamic l
|
1054 | 1058 | Object getAttr = lookupGetAttribute.execute(type, __GETATTRIBUTE__, type, false);
|
1055 | 1059 | Object dict = callGetAttr.executeObject(getAttr, type, __DICT__);
|
1056 | 1060 | if (dict != PNone.NO_VALUE) {
|
| 1061 | + if (dict instanceof PMappingproxy) { |
| 1062 | + dict = ((PMappingproxy) dict).getMapping(); |
| 1063 | + } |
1057 | 1064 | HashingStorage storage = getDictStorageNode.execute((PHashingCollection) dict);
|
1058 | 1065 | return lib.getItem(storage, __SLOTS__);
|
1059 | 1066 | }
|
|
0 commit comments