|
110 | 110 | import com.oracle.graal.python.lib.PyMappingCheckNode;
|
111 | 111 | import com.oracle.graal.python.lib.PyObjectGetIter;
|
112 | 112 | import com.oracle.graal.python.lib.PyObjectLookupAttr;
|
| 113 | +import com.oracle.graal.python.lib.PyObjectSetAttr; |
113 | 114 | import com.oracle.graal.python.lib.PySequenceCheckNode;
|
114 | 115 | import com.oracle.graal.python.lib.PySequenceDelItemNode;
|
115 | 116 | import com.oracle.graal.python.lib.PySequenceGetItemNode;
|
@@ -231,13 +232,13 @@ public final void clearNativeWrapper() {
|
231 | 232 | public void writeMember(String key, Object value,
|
232 | 233 | @Bind("$node") Node inliningTarget,
|
233 | 234 | @Shared("js2ts") @Cached TruffleString.FromJavaStringNode fromJavaStringNode,
|
234 |
| - @Cached PInteropSetAttributeNode setAttributeNode, |
| 235 | + @Cached PyObjectSetAttr setAttributeNode, |
235 | 236 | // GR-44020: make shared:
|
236 | 237 | @Exclusive @Cached IsBuiltinObjectProfile attrErrorProfile,
|
237 | 238 | @Exclusive @Cached GilNode gil) throws UnsupportedMessageException, UnknownIdentifierException {
|
238 | 239 | boolean mustRelease = gil.acquire();
|
239 | 240 | try {
|
240 |
| - setAttributeNode.execute(this, fromJavaStringNode.execute(key, TS_ENCODING), value); |
| 241 | + setAttributeNode.execute(null, inliningTarget, this, fromJavaStringNode.execute(key, TS_ENCODING), value); |
241 | 242 | } catch (PException e) {
|
242 | 243 | e.expectAttributeError(inliningTarget, attrErrorProfile);
|
243 | 244 | // TODO(fa) not accurate; distinguish between read-only and non-existing
|
@@ -748,13 +749,14 @@ public Object getMembers(boolean includeInternal,
|
748 | 749 | @ExportMessage
|
749 | 750 | public void removeMember(String member,
|
750 | 751 | @Bind("$node") Node inliningTarget,
|
751 |
| - @Cached PInteropDeleteAttributeNode deleteAttributeNode, |
| 752 | + @Cached PyObjectSetAttr deleteAttributeNode, |
| 753 | + @Shared("js2ts") @Cached TruffleString.FromJavaStringNode fromJavaStringNode, |
752 | 754 | // GR-44020: make shared:
|
753 | 755 | @Exclusive @Cached IsBuiltinObjectProfile attrErrorProfile,
|
754 | 756 | @Exclusive @Cached GilNode gil) throws UnsupportedMessageException, UnknownIdentifierException {
|
755 | 757 | boolean mustRelease = gil.acquire();
|
756 | 758 | try {
|
757 |
| - deleteAttributeNode.execute(this, member); |
| 759 | + deleteAttributeNode.delete(null, inliningTarget, this, fromJavaStringNode.execute(member, TS_ENCODING)); |
758 | 760 | } catch (PException e) {
|
759 | 761 | e.expectAttributeError(inliningTarget, attrErrorProfile);
|
760 | 762 | // TODO(fa) not accurate; distinguish between read-only and non-existing
|
|
0 commit comments