|
122 | 122 | import com.oracle.graal.python.builtins.objects.function.PBuiltinFunction;
|
123 | 123 | import com.oracle.graal.python.builtins.objects.function.PFunction;
|
124 | 124 | import com.oracle.graal.python.builtins.objects.function.PKeyword;
|
| 125 | +import com.oracle.graal.python.builtins.objects.getsetdescriptor.GetSetDescriptor; |
125 | 126 | import com.oracle.graal.python.builtins.objects.ints.PInt;
|
126 | 127 | import com.oracle.graal.python.builtins.objects.memoryview.PBuffer;
|
127 | 128 | import com.oracle.graal.python.builtins.objects.memoryview.PMemoryView;
|
@@ -1030,6 +1031,18 @@ static Object doDType(PBuiltinFunction object, @SuppressWarnings("unused") Pytho
|
1030 | 1031 | return toSulongNode.execute(enclosingType != null ? enclosingType : getNativeNullNode.execute());
|
1031 | 1032 | }
|
1032 | 1033 |
|
| 1034 | + @Specialization(guards = "eq(D_NAME, key)") |
| 1035 | + static Object doDName(GetSetDescriptor object, @SuppressWarnings("unused") PythonNativeWrapper nativeWrapper, @SuppressWarnings("unused") String key, |
| 1036 | + @Shared("toSulongNode") @Cached ToSulongNode toSulongNode) { |
| 1037 | + return toSulongNode.execute(object.getName()); |
| 1038 | + } |
| 1039 | + |
| 1040 | + @Specialization(guards = "eq(D_TYPE, key)") |
| 1041 | + static Object doDType(GetSetDescriptor object, @SuppressWarnings("unused") PythonNativeWrapper nativeWrapper, @SuppressWarnings("unused") String key, |
| 1042 | + @Shared("toSulongNode") @Cached ToSulongNode toSulongNode) { |
| 1043 | + return toSulongNode.execute(object.getType()); |
| 1044 | + } |
| 1045 | + |
1033 | 1046 | @Specialization(guards = "eq(D_METHOD, key)")
|
1034 | 1047 | static Object doDMethod(PythonObject object, @SuppressWarnings("unused") PythonNativeWrapper nativeWrapper, @SuppressWarnings("unused") String key) {
|
1035 | 1048 | return new PyMethodDefWrapper(object);
|
|
0 commit comments